- java.lang.Object
-
- com.aoapps.lang.math.Statistics
-
public final class Statistics extends Object
Some basic statistics algorithms.- Author:
- AO Industries, Inc.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublemean(Collection<? extends Number> samples)Computes the average of a set of samples.static doublestandardDeviation(double mean, Collection<? extends Number> samples)Computes the standard deviation of a set of samples.
-
-
-
Method Detail
-
mean
public static double mean(Collection<? extends Number> samples)
Computes the average of a set of samples.nullvalues will be ignored, not contributing to the average in any way.- Parameters:
samples- must have at least one sample- Returns:
- Double.NaN if there are no samples
-
standardDeviation
public static double standardDeviation(double mean, Collection<? extends Number> samples)Computes the standard deviation of a set of samples.nullvalues will be ignored, not contributing to the deviation in any way. This does not use Bessel's correction.
-
-