Tabnine Logo
StatisticalSummary.getN
Code IndexAdd Tabnine to your IDE (free)

How to use
getN
method
in
org.apache.commons.math.stat.descriptive.StatisticalSummary

Best Java code snippets using org.apache.commons.math.stat.descriptive.StatisticalSummary.getN (Showing top 20 results out of 315)

origin: org.apache.commons/math

/** Check sample data.
 * @param stat statistical summary
 * @exception IllegalArgumentException if there is not enough sample data
 */
private void checkSampleData(final StatisticalSummary stat)
  throws IllegalArgumentException {
  if ((stat == null) || (stat.getN() < 2)) {
    throw MathRuntimeException.createIllegalArgumentException(
       INSUFFICIENT_DATA_MESSAGE,
       (stat == null) ? 0 : stat.getN());
  }
}
origin: org.apache.commons/commons-math

/** Check sample data.
 * @param stat statistical summary
 * @exception IllegalArgumentException if there is not enough sample data
 */
private void checkSampleData(final StatisticalSummary stat)
  throws IllegalArgumentException {
  if ((stat == null) || (stat.getN() < 2)) {
    throw MathRuntimeException.createIllegalArgumentException(
       LocalizedFormats.INSUFFICIENT_DATA_FOR_T_STATISTIC,
       (stat == null) ? 0 : stat.getN());
  }
}
origin: commons-math/commons-math

/**
 * Computes a <a href="http://www.itl.nist.gov/div898/handbook/prc/section2/prc22.htm#formula">
 * t statistic </a> to use in comparing the mean of the dataset described by 
 * <code>sampleStats</code> to <code>mu</code>.
 * <p>
 * This statistic can be used to perform a one sample t-test for the mean.
 * </p><p>
 * <strong>Preconditions</strong>: <ul>
 * <li><code>observed.getN() > = 2</code>.
 * </li></ul></p>
 *
 * @param mu comparison constant
 * @param sampleStats DescriptiveStatistics holding sample summary statitstics
 * @return t statistic
 * @throws IllegalArgumentException if the precondition is not met
 */
public double t(double mu, StatisticalSummary sampleStats)
throws IllegalArgumentException {
  if ((sampleStats == null) || (sampleStats.getN() < 2)) {
    throw new IllegalArgumentException("insufficient data for t statistic");
  }
  return t(sampleStats.getMean(), mu, sampleStats.getVariance(),
      sampleStats.getN());
}
origin: commons-math/commons-math

throws IllegalArgumentException, MathException {
  if ((sampleStats1 == null) || (sampleStats2 == null ||
      Math.min(sampleStats1.getN(), sampleStats2.getN()) < 2)) {
    throw new IllegalArgumentException("insufficient data for t statistic");
      sampleStats2.getVariance(), (double) sampleStats1.getN(), 
      (double) sampleStats2.getN());
origin: commons-math/commons-math

throws IllegalArgumentException, MathException {
  if ((sampleStats1 == null) || (sampleStats2 == null ||
      Math.min(sampleStats1.getN(), sampleStats2.getN()) < 2)) {
    throw new IllegalArgumentException("insufficient data for t statistic");
      sampleStats2.getVariance(), (double) sampleStats1.getN(), 
      (double) sampleStats2.getN());
origin: commons-math/commons-math

if ((sampleStats == null) || (sampleStats.getN() < 2)) {
  throw new IllegalArgumentException("insufficient data for t statistic");
    sampleStats.getN());
origin: commons-math/commons-math

if ((sampleStats1 == null) ||
    (sampleStats2 == null ||
        Math.min(sampleStats1.getN(), sampleStats2.getN()) < 2)) {
  throw new IllegalArgumentException("insufficient data for t statistic");
    (double) sampleStats1.getN(), (double) sampleStats2.getN());
origin: commons-math/commons-math

if ((sampleStats1 == null) ||
    (sampleStats2 == null ||
        Math.min(sampleStats1.getN(), sampleStats2.getN()) < 2)) {
  throw new IllegalArgumentException("insufficient data for t statistic");
    (double) sampleStats1.getN(), (double) sampleStats2.getN());
origin: org.apache.commons/commons-math

/**
 * Computes a <a href="http://www.itl.nist.gov/div898/handbook/prc/section2/prc22.htm#formula">
 * t statistic </a> to use in comparing the mean of the dataset described by
 * <code>sampleStats</code> to <code>mu</code>.
 * <p>
 * This statistic can be used to perform a one sample t-test for the mean.
 * </p><p>
 * <strong>Preconditions</strong>: <ul>
 * <li><code>observed.getN() > = 2</code>.
 * </li></ul></p>
 *
 * @param mu comparison constant
 * @param sampleStats DescriptiveStatistics holding sample summary statitstics
 * @return t statistic
 * @throws IllegalArgumentException if the precondition is not met
 */
public double t(double mu, StatisticalSummary sampleStats)
throws IllegalArgumentException {
  checkSampleData(sampleStats);
  return t(sampleStats.getMean(), mu, sampleStats.getVariance(),
      sampleStats.getN());
}
origin: org.apache.commons/commons-math

checkSampleData(sampleStats2);
return tTest(sampleStats1.getMean(), sampleStats2.getMean(), sampleStats1.getVariance(),
    sampleStats2.getVariance(), sampleStats1.getN(),
    sampleStats2.getN());
origin: org.apache.commons/commons-math

return homoscedasticTTest(sampleStats1.getMean(),
    sampleStats2.getMean(), sampleStats1.getVariance(),
    sampleStats2.getVariance(), sampleStats1.getN(),
    sampleStats2.getN());
origin: org.apache.commons/math

/**
 * Computes a <a href="http://www.itl.nist.gov/div898/handbook/prc/section2/prc22.htm#formula">
 * t statistic </a> to use in comparing the mean of the dataset described by
 * <code>sampleStats</code> to <code>mu</code>.
 * <p>
 * This statistic can be used to perform a one sample t-test for the mean.
 * </p><p>
 * <strong>Preconditions</strong>: <ul>
 * <li><code>observed.getN() > = 2</code>.
 * </li></ul></p>
 *
 * @param mu comparison constant
 * @param sampleStats DescriptiveStatistics holding sample summary statitstics
 * @return t statistic
 * @throws IllegalArgumentException if the precondition is not met
 */
public double t(double mu, StatisticalSummary sampleStats)
throws IllegalArgumentException {
  checkSampleData(sampleStats);
  return t(sampleStats.getMean(), mu, sampleStats.getVariance(),
      sampleStats.getN());
}
origin: org.apache.commons/math

return homoscedasticT(sampleStats1.getMean(), sampleStats2.getMean(),
    sampleStats1.getVariance(), sampleStats2.getVariance(),
    sampleStats1.getN(), sampleStats2.getN());
origin: org.apache.commons/commons-math

return t(sampleStats1.getMean(), sampleStats2.getMean(),
    sampleStats1.getVariance(), sampleStats2.getVariance(),
    sampleStats1.getN(), sampleStats2.getN());
origin: org.apache.commons/math

return homoscedasticTTest(sampleStats1.getMean(),
    sampleStats2.getMean(), sampleStats1.getVariance(),
    sampleStats2.getVariance(), sampleStats1.getN(),
    sampleStats2.getN());
origin: org.apache.commons/commons-math

return homoscedasticT(sampleStats1.getMean(), sampleStats2.getMean(),
    sampleStats1.getVariance(), sampleStats2.getVariance(),
    sampleStats1.getN(), sampleStats2.getN());
origin: org.apache.commons/math

return t(sampleStats1.getMean(), sampleStats2.getMean(),
    sampleStats1.getVariance(), sampleStats2.getVariance(),
    sampleStats1.getN(), sampleStats2.getN());
origin: org.apache.commons/math

checkSampleData(sampleStats2);
return tTest(sampleStats1.getMean(), sampleStats2.getMean(), sampleStats1.getVariance(),
    sampleStats2.getVariance(), sampleStats1.getN(),
    sampleStats2.getN());
origin: org.apache.commons/commons-math

checkSampleData(sampleStats);
return tTest(sampleStats.getMean(), mu, sampleStats.getVariance(),
    sampleStats.getN());
origin: org.apache.commons/math

checkSampleData(sampleStats);
return tTest(sampleStats.getMean(), mu, sampleStats.getVariance(),
    sampleStats.getN());
org.apache.commons.math.stat.descriptiveStatisticalSummarygetN

Javadoc

Returns the number of available values

Popular methods of StatisticalSummary

  • getMean
    Returns the arithmetic mean [http://www.xycoon.com/arithmetic_mean.htm] of the available values
  • getStandardDeviation
    Returns the standard deviation of the available values.
  • getVariance
    Returns the variance of the available values.
  • getMax
    Returns the maximum of the available values
  • getMin
    Returns the minimum of the available values
  • getSum
    Returns the sum of the values that have been added to Univariate.

Popular in Java

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now