gov.sandia.cognition.statistics.method
Class KolmogorovSmirnovConfidence.Statistic

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.method.AbstractConfidenceStatistic
          extended by gov.sandia.cognition.statistics.method.KolmogorovSmirnovConfidence.Statistic
All Implemented Interfaces:
ConfidenceStatistic, CloneableSerializable, Serializable, Cloneable
Enclosing class:
KolmogorovSmirnovConfidence

public static class KolmogorovSmirnovConfidence.Statistic
extends AbstractConfidenceStatistic

Computes the ConfidenceStatistic associated with a K-S test

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.method.AbstractConfidenceStatistic
nullHypothesisProbability
 
Constructor Summary
KolmogorovSmirnovConfidence.Statistic(double Ne, double D)
          Creates a new instance of Statistic
 
Method Summary
 double getD()
          Setter for D
 double getNe()
          Getter for Ne
 double getTestStatistic()
          Gets the statistic from which we compute the null-hypothesis probability.
static double KSsignificance(double Ne, double D)
          Computes the significance of the K-S test from the given degrees of freedom and D-statistic.
protected  void setD(double D)
          Setter for D
protected  void setNe(double Ne)
          Setter for Ne
 
Methods inherited from class gov.sandia.cognition.statistics.method.AbstractConfidenceStatistic
getNullHypothesisProbability, setNullHypothesisProbability, toString
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

KolmogorovSmirnovConfidence.Statistic

public KolmogorovSmirnovConfidence.Statistic(double Ne,
                                             double D)
Creates a new instance of Statistic

Parameters:
D - This is the D-statistic used in the K-S CDF, usually known as the D-statistic, which is the maximum difference between the two distributions. I use the two-tail version of D.
Ne - This is the degrees of freedom in the K-S distribution for the CDF calculation.
Method Detail

KSsignificance

@PublicationReference(author={"William H. Press","Saul A. Teukolsky","William T. Vetterling","Brian P. Flannery"},
                      title="Numerical Recipes in C, Second Edition",
                      type=Book,
                      year=1992,
                      pages=624,
                      notes={"Section 14.3","Equation 14.3.9"})
public static double KSsignificance(double Ne,
                                                                                          double D)
Computes the significance of the K-S test from the given degrees of freedom and D-statistic. This approximation is from Numerical Recipes in C, p. 624

Parameters:
Ne - Number of degrees of freedom in the data
D - This is the D-statistic used in the K-S CDF, usually known as the D-statistic, which is the maximum difference between the two distributions. I use the two-tail version of D.
Returns:
Probability of the null hypothesis

getD

public double getD()
Setter for D

Returns:
This is the D-statistic used in the K-S CDF, usually known as the D-statistic, which is the maximum difference between the two distributions. I use the two-tail version of D.

setD

protected void setD(double D)
Setter for D

Parameters:
D - This is the D-statistic used in the K-S CDF, usually known as the D-statistic, which is the maximum difference between the two distributions. I use the two-tail version of D. 0.0 <= D <= 1.0

getNe

public double getNe()
Getter for Ne

Returns:
This is the degrees of freedom in the K-S distribution for the CDF calculation.

setNe

protected void setNe(double Ne)
Setter for Ne

Parameters:
Ne - This is the degrees of freedom in the K-S distribution for the CDF calculation.

getTestStatistic

public double getTestStatistic()
Description copied from interface: ConfidenceStatistic
Gets the statistic from which we compute the null-hypothesis probability. In an ANOVA, this would be the "F" statistic. In a t-test, this would be the "t" value. And so forth.

Returns:
Confidence statistic used to compute the null-hypothesis probability.