Skip navigation links

Package org.hipparchus.stat.descriptive

Generic univariate and multivariate summary statistic objects.

See: Description

Package org.hipparchus.stat.descriptive Description

Generic univariate and multivariate summary statistic objects.

UnivariateStatistic API Usage Examples:

UnivariateStatistic:

/∗ evaluation approach ∗/
double[] values = new double[] { 1, 2, 3, 4, 5 };
UnivariateStatistic stat = new Mean();
out.println("mean = " + stat.evaluate(values));

StorelessUnivariateStatistic:

/∗ incremental approach ∗/
double[] values = new double[] { 1, 2, 3, 4, 5 };
StorelessUnivariateStatistic stat = new Mean();
out.println("mean before adding a value is NaN = " + stat.getResult());
for (int i = 0; i < values.length; i++) {
    stat.increment(values[i]);
    out.println("current mean = " + stat2.getResult());
}
stat.clear();
out.println("mean after clear is NaN = " + stat.getResult());
Skip navigation links

Copyright © 2016 Hipparchus.org. All rights reserved.