gov.sandia.cognition.statistics.distribution
Class KolmogorovDistribution

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.AbstractDistribution<NumberType>
          extended by gov.sandia.cognition.statistics.AbstractClosedFormUnivariateDistribution<Double>
              extended by gov.sandia.cognition.statistics.distribution.KolmogorovDistribution
All Implemented Interfaces:
Vectorizable, ClosedFormDistribution<Double>, ClosedFormUnivariateDistribution<Double>, Distribution<Double>, DistributionWithMean<Double>, UnivariateDistribution<Double>, CloneableSerializable, Serializable, Cloneable
Direct Known Subclasses:
KolmogorovDistribution.CDF

@PublicationReference(author="Wikipedia",
                      title="Kolmogorov-Smirnov test, Kolmogorov distribution",
                      type=WebPage,
                      year=2009,
                      url="http://en.wikipedia.org/wiki/Kolmogorov_distribution#Kolmogorov_distribution")
public class KolmogorovDistribution
extends AbstractClosedFormUnivariateDistribution<Double>

Contains the Cumulative Distribution Function description for the "D" statistic used within the Kolmogorov-Smirnov test.

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

Nested Class Summary
static class KolmogorovDistribution.CDF
          Contains the Cumulative Distribution Function description for the "D" statistic used within the Kolmogorov-Smirnov test.
 
Field Summary
static double MEAN
          Value of the mean, found empirically, as I can't seem to find the answer in any reference I can get my hands on, 0.868481392844716.
static double VARIANCE
          Value of the variance, found empirically, as I can't seem to find the answer in any reference I can get my hands on, 0.06759934611527044.
 
Constructor Summary
KolmogorovDistribution()
          Creates a new instance of CumulativeDistribution
 
Method Summary
 void convertFromVector(Vector parameters)
          Converts the object from a Vector of parameters.
 Vector convertToVector()
          Converts the object to a vector.
 KolmogorovDistribution.CDF getCDF()
          Gets the CDF of a scalar distribution.
 Double getMaxSupport()
          Gets the minimum support (domain or input) of the distribution.
 Double getMean()
          Gets the arithmetic mean, or "first central moment" or "expectation", of the distribution.
 Double getMinSupport()
          Gets the minimum support (domain or input) of the distribution.
 double getVariance()
          Gets the variance of the distribution.
 ArrayList<Double> sample(Random random, int numSamples)
          Draws multiple random samples from the distribution.
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractClosedFormUnivariateDistribution
clone
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractDistribution
sample
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample
 

Field Detail

MEAN

public static final double MEAN
Value of the mean, found empirically, as I can't seem to find the answer in any reference I can get my hands on, 0.868481392844716.

See Also:
Constant Field Values

VARIANCE

public static final double VARIANCE
Value of the variance, found empirically, as I can't seem to find the answer in any reference I can get my hands on, 0.06759934611527044.

See Also:
Constant Field Values
Constructor Detail

KolmogorovDistribution

public KolmogorovDistribution()
Creates a new instance of CumulativeDistribution

Method Detail

getMean

public Double getMean()
Description copied from interface: DistributionWithMean
Gets the arithmetic mean, or "first central moment" or "expectation", of the distribution.

Returns:
Mean of the distribution.

sample

public ArrayList<Double> sample(Random random,
                                int numSamples)
Description copied from interface: Distribution
Draws multiple random samples from the distribution. It is generally more efficient to use this multiple-sample method than multiple calls of the single-sample method. (But not always.)

Parameters:
random - Random-number generator to use in order to generate random numbers.
numSamples - Number of samples to draw from the distribution.
Returns:
Samples drawn according to this distribution.

getVariance

public double getVariance()
Description copied from interface: UnivariateDistribution
Gets the variance of the distribution. This is sometimes called the second central moment by more pedantic people, which is equivalent to the square of the standard deviation.

Returns:
Variance of the distribution.

getCDF

public KolmogorovDistribution.CDF getCDF()
Description copied from interface: UnivariateDistribution
Gets the CDF of a scalar distribution.

Returns:
CDF of the scalar distribution.

convertToVector

public Vector convertToVector()
Description copied from interface: Vectorizable
Converts the object to a vector.

Returns:
The Vector form of the object.

convertFromVector

public void convertFromVector(Vector parameters)
Description copied from interface: Vectorizable
Converts the object from a Vector of parameters.

Parameters:
parameters - The parameters to incorporate.

getMinSupport

public Double getMinSupport()
Description copied from interface: UnivariateDistribution
Gets the minimum support (domain or input) of the distribution.

Returns:
Minimum support.

getMaxSupport

public Double getMaxSupport()
Description copied from interface: UnivariateDistribution
Gets the minimum support (domain or input) of the distribution.

Returns:
Minimum support.