Class Statistics

java.lang.Object
com.aoapps.lang.math.Statistics

public final class Statistics extends Object
Some basic statistics algorithms.
Author:
AO Industries, Inc.
  • Method Details

    • mean

      public static double mean(Collection<? extends Number> samples)
      Computes the average of a set of samples. null values 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. null values will be ignored, not contributing to the deviation in any way. This does not use Bessel's correction.