Package pamMaths

Class STD

java.lang.Object
pamMaths.STD

public class STD extends Object
Calculate the mean and standard deviation of an double array.
Author:
Doug Gillespie
  • Constructor Summary

    Constructors
    Constructor
    Description
    STD()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Get the data previously set with calls to STD and Mean funcs
    double
    Get the mean value calculated in a previous call to getSTD(double[] data) or getMean(double[] data)
    double
    getMean(double[] data)
    Calculate the mean and standard deviation using new data
    double
    Get the median of the dataset MO 2015/05/17
    double
    getMedian(double[] data)
    Get the median of the dataset passed to this method.
    double
    Get the skew as per page 612 or numerical recipes.
    double
    getSkew(double mean, double sig)
     
    double
    Get the standard deviation calculated in a previous call to getSTD(double[] data) or getMean(double[] data)
    double
    getSTD(double[] data)
    Calculate the mean and standard deviation using new data
    double
    Get the variance of the dataset already loaded in this class MO 2015/05/17
    double
    getVariance(double[] data)
    Get the variance of the dataset passed to this method.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • STD

      public STD()
  • Method Details

    • getSTD

      public double getSTD(double[] data)
      Calculate the mean and standard deviation using new data
      Parameters:
      data - data array
      Returns:
      standard deviation
    • getSTD

      public double getSTD()
      Get the standard deviation calculated in a previous call to getSTD(double[] data) or getMean(double[] data)
      Returns:
      standard deviation
    • getMean

      public double getMean(double[] data)
      Calculate the mean and standard deviation using new data
      Parameters:
      data - data array
      Returns:
      mean value
    • getMean

      public double getMean()
      Get the mean value calculated in a previous call to getSTD(double[] data) or getMean(double[] data)
      Returns:
      mean
    • getData

      public double[] getData()
      Get the data previously set with calls to STD and Mean funcs
      Returns:
      data array
    • getSkew

      public double getSkew()
      Get the skew as per page 612 or numerical recipes.
      Returns:
      the skew of the data
    • getSkew

      public double getSkew(double mean, double sig)
    • getMedian

      public double getMedian()
      Get the median of the dataset MO 2015/05/17
      Returns:
      the median value
    • getMedian

      public double getMedian(double[] data)
      Get the median of the dataset passed to this method. Note that the dataset passed will replace any dataset that is currently loaded into this object, and mean and stddev will be recalculated. The median flag will also be reset, requiring a recalculation the next time it's requested. MO 2015/05/17
      Parameters:
      data - the data array to test
      Returns:
      the median value
    • getVariance

      public double getVariance()
      Get the variance of the dataset already loaded in this class MO 2015/05/17
      Returns:
      the variance of the data
    • getVariance

      public double getVariance(double[] data)
      Get the variance of the dataset passed to this method. Note that the dataset passed will replace any dataset that is currently loaded into this object, and mean and stddev will be recalculated. The median flag will also be reset, requiring a recalculation the next time it's requested. MO 2015/05/17
      Parameters:
      data - the data array to test
      Returns:
      the variance