@Status(stage=PRODUCTION, unitTests=COMPLETE) @Review(by="Kees Schotanus", at="2009-09-28") @Wish(value="Add Kurtosis") @Wish(value="Add linear regression") @ThreadSafety(level=IMMUTABLE) public final class CStatistics extends Object
Modifier and Type | Method and Description |
---|---|
static CStatistics |
computeStatistics(boolean sample,
double... data)
Computes the mathematical statistics for the supplied values.
|
double |
getAverage()
Gets the average value of the data.
|
double[] |
getData()
Gets (a copy of) the statistical data.
|
double |
getMaximum()
Gets the maximum value from the data.
|
double |
getMedian()
Gets the median value of the data.
|
double |
getMinimum()
Gets the minimum value from the data.
|
double |
getSkewness()
Computes the skewness (symmetry) of the data.
|
double |
getStandardDeviation()
Gets the standard deviation of the data.
|
double |
getSum()
Gets the sum of all the values in the data.
|
double |
getVariance()
Gets the variance of the data.
|
public static CStatistics computeStatistics(boolean sample, double... data)
sample
- Determines whether the data is a sample or a complete
population.data
- The input values to compute the statistics for.NullPointerException
- When the supplied values is null.IllegalArgumentException
- When the supplied values is empty.public double[] getData()
public double getMinimum()
public double getMaximum()
public double getSum()
public double getAverage()
public double getMedian()
public double getVariance()
public double getStandardDeviation()
public double getSkewness()
Copyright © 2008–2018. All rights reserved.