# Package org.apache.commons.math3.stat.descriptive

package org.apache.commons.math3.stat.descriptive
Generic univariate 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());`

Related Packages
Package
Description
org.apache.commons.math3.stat
Data storage, manipulation and summary routines.
org.apache.commons.math3.stat.descriptive.moment
Summary statistics based on moments.
org.apache.commons.math3.stat.descriptive.rank
Summary statistics based on ranks.
org.apache.commons.math3.stat.descriptive.summary
Other summary statistics.
Class
Description
AbstractStorelessUnivariateStatistic
Abstract implementation of the `StorelessUnivariateStatistic` interface.
AbstractUnivariateStatistic
Abstract base class for all implementations of the `UnivariateStatistic` interface.
AggregateSummaryStatistics
An aggregator for `SummaryStatistics` from several data sets or data set partitions.
DescriptiveStatistics
Maintains a dataset of values of a single variable and computes descriptive statistics based on stored data.
MultivariateSummaryStatistics
Computes summary statistics for a stream of n-tuples added using the `addValue` method.
StatisticalMultivariateSummary
Reporting interface for basic multivariate statistics.
StatisticalSummary
Reporting interface for basic univariate statistics.
StatisticalSummaryValues
Value object representing the results of a univariate statistical summary.
StorelessUnivariateStatistic
Extends the definition of `UnivariateStatistic` with `StorelessUnivariateStatistic.increment(double)` and `StorelessUnivariateStatistic.incrementAll(double[])` methods for adding values and updating internal state.
SummaryStatistics
Computes summary statistics for a stream of data values added using the `addValue` method.
SynchronizedDescriptiveStatistics
Implementation of `DescriptiveStatistics` that is safe to use in a multithreaded environment.
SynchronizedMultivariateSummaryStatistics
Implementation of `MultivariateSummaryStatistics` that is safe to use in a multithreaded environment.
SynchronizedSummaryStatistics
Implementation of `SummaryStatistics` that is safe to use in a multithreaded environment.
UnivariateStatistic
Base interface implemented by all statistics.
WeightedEvaluation
Weighted evaluation for statistics.