Package org.hipparchus.stat.descriptive
Interface StatisticalSummary
- All Known Implementing Classes:
DescriptiveStatistics
,StatisticalSummaryValues
,StreamingStatistics
public interface StatisticalSummary
Reporting interface for basic univariate statistics.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StatisticalSummary
aggregate
(Iterable<? extends StatisticalSummary> statistics) Computes aggregated statistical summaries.static StatisticalSummary
aggregate
(StatisticalSummary... statistics) Computes aggregated statistical summaries.double
getMax()
Returns the maximum of the available valuesdouble
getMean()
Returns the arithmetic mean of the available valuesdouble
getMin()
Returns the minimum of the available valueslong
getN()
Returns the number of available valuesdouble
Returns the standard deviation of the available values.double
getSum()
Returns the sum of the values that have been added to Univariate.double
Returns the variance of the available values.
-
Method Details
-
aggregate
Computes aggregated statistical summaries.This method can be used to combine statistics computed over partitions or subsamples - i.e., the returned StatisticalSummary should contain the same values that would have been obtained by computing a single StatisticalSummary over the combined dataset.
- Parameters:
statistics
- StatisticalSummary instances to aggregate- Returns:
- summary statistics for the combined dataset
- Throws:
NullArgumentException
- if the input is null
-
aggregate
Computes aggregated statistical summaries.This method can be used to combine statistics computed over partitions or subsamples - i.e., the returned StatisticalSummary should contain the same values that would have been obtained by computing a single StatisticalSummary over the combined dataset.
- Parameters:
statistics
- iterable of StatisticalSummary instances to aggregate- Returns:
- summary statistics for the combined dataset
- Throws:
NullArgumentException
- if the input is null
-
getMean
double getMean()Returns the arithmetic mean of the available values- Returns:
- The mean or Double.NaN if no values have been added.
-
getVariance
double getVariance()Returns the variance of the available values.- Returns:
- The variance, Double.NaN if no values have been added or 0.0 for a single value set.
-
getStandardDeviation
double getStandardDeviation()Returns the standard deviation of the available values.- Returns:
- The standard deviation, Double.NaN if no values have been added or 0.0 for a single value set.
-
getMax
double getMax()Returns the maximum of the available values- Returns:
- The max or Double.NaN if no values have been added.
-
getMin
double getMin()Returns the minimum of the available values- Returns:
- The min or Double.NaN if no values have been added.
-
getN
long getN()Returns the number of available values- Returns:
- The number of available values
-
getSum
double getSum()Returns the sum of the values that have been added to Univariate.- Returns:
- The sum or Double.NaN if no values have been added
-