gov.sandia.cognition.math
Class UnivariateSummaryStatistics

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.math.UnivariateSummaryStatistics
All Implemented Interfaces:
CloneableSerializable, Serializable, Cloneable

public class UnivariateSummaryStatistics
extends AbstractCloneableSerializable

A Bayesian-style synopsis of a Collection of scalar data.

Since:
3.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Field Summary
static double CONFIDENCE_REGION
          Region of the confidence interval, 0.95.
 
Constructor Summary
protected UnivariateSummaryStatistics(double min, double max, double[] quintiles, double confidenceLower, double confidenceUpper, double median, int numSamples, double mean, double variance, double skewness, double kurtosis)
          Creates a new set of scalar summary statistics.
 
Method Summary
 UnivariateSummaryStatistics clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
static UnivariateSummaryStatistics create(Collection<? extends Number> data)
          Creates a new instance of UnivariateSummaryStatistics from a Collection of scalar values.
 double getConfidenceLower()
          Getter for confidenceLower
 double getConfidenceUpper()
          Getter for confidenceUpper
 double getKurtosis()
          Getter for Kurtosis
 double getMax()
          Getter for max
 double getMean()
          Getter for mean
 double getMedian()
          Getter for median
 double getMin()
          Getter for min
 int getNumSamples()
          Getter for numSamples
 double[] getQuintiles()
          Getter for quintiles
 double getSkewness()
          Getter for skewness
 double getVariance()
          Getter for variance
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONFIDENCE_REGION

public static final double CONFIDENCE_REGION
Region of the confidence interval, 0.95.

See Also:
Constant Field Values
Constructor Detail

UnivariateSummaryStatistics

protected UnivariateSummaryStatistics(double min,
                                      double max,
                                      double[] quintiles,
                                      double confidenceLower,
                                      double confidenceUpper,
                                      double median,
                                      int numSamples,
                                      double mean,
                                      double variance,
                                      double skewness,
                                      double kurtosis)
Creates a new set of scalar summary statistics.

Parameters:
min - The minimum.
max - The maximum.
quintiles - The quintiles.
confidenceLower - The lower bound of the confidence.
confidenceUpper - The upper bound of the confidence.
median - The median.
numSamples - The number of samples.
mean - The mean.
variance - The variance.
skewness - The skewness.
kurtosis - The kurtosis.
Method Detail

clone

public UnivariateSummaryStatistics clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class AbstractCloneableSerializable
Returns:
A clone of this object.

create

public static UnivariateSummaryStatistics create(Collection<? extends Number> data)
Creates a new instance of UnivariateSummaryStatistics from a Collection of scalar values.

Parameters:
data - Data from which to cull the results
Returns:
UnivariateSummaryStatistics describing the data

toString

public String toString()
Overrides:
toString in class Object

getMean

public double getMean()
Getter for mean

Returns:
Mean

getVariance

public double getVariance()
Getter for variance

Returns:
Variance

getSkewness

public double getSkewness()
Getter for skewness

Returns:
Skewness

getKurtosis

public double getKurtosis()
Getter for Kurtosis

Returns:
Excess kurtosis

getNumSamples

public int getNumSamples()
Getter for numSamples

Returns:
Number of samples

getMedian

public double getMedian()
Getter for median

Returns:
Median

getMin

public double getMin()
Getter for min

Returns:
Min

getMax

public double getMax()
Getter for max

Returns:
Max

getQuintiles

public double[] getQuintiles()
Getter for quintiles

Returns:
Quintile boundaries

getConfidenceLower

public double getConfidenceLower()
Getter for confidenceLower

Returns:
Lower 95% confidence region (alpha=0.025)

getConfidenceUpper

public double getConfidenceUpper()
Getter for confidenceUpper

Returns:
Upper 95% confidence region (alpha=0.975)