SuanShu, a Java numerical and statistical library



com.numericalmethod.suanshu.stats.test.distribution.kolmogorov
Class KolmogorovSmirnov1Sample

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.test.HypothesisTest
      extended by com.numericalmethod.suanshu.stats.test.distribution.kolmogorov.KolmogorovSmirnov
          extended by com.numericalmethod.suanshu.stats.test.distribution.kolmogorov.KolmogorovSmirnov1Sample

public class KolmogorovSmirnov1Sample
extends KolmogorovSmirnov

The one-sample Kolmogorov-Smirnov test (one-sample KS test) compares a sample with a reference probability distribution. This class computes the one-sample Kolmogorov-Smirnov statistic.

See Also:
"Jean Dickinson Gibbons, Subhabrata Chakraborti, "Section 4.3," Nonparametric Statistical Inference, 4th edition."

Nested Class Summary
 
Nested classes/interfaces inherited from class com.numericalmethod.suanshu.stats.test.distribution.kolmogorov.KolmogorovSmirnov
KolmogorovSmirnov.Side, KolmogorovSmirnov.Type
 
Constructor Summary
KolmogorovSmirnov1Sample(double[] sample, ProbabilityDistribution F, KolmogorovSmirnov.Side side)
          Construct a one-sample Kolmogorov-Smirnov test.
 
Method Summary
 double pValue()
          Get the p-value for the test statistics.
 double statistics()
          Get the test statistics.
 
Methods inherited from class com.numericalmethod.suanshu.stats.test.distribution.kolmogorov.KolmogorovSmirnov
getAlternativeHypothesis, getNullHypothesis
 
Methods inherited from class com.numericalmethod.suanshu.stats.test.HypothesisTest
isNullRejected, nGroups, nObs, oneSidedPvalue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KolmogorovSmirnov1Sample

public KolmogorovSmirnov1Sample(double[] sample,
                                ProbabilityDistribution F,
                                KolmogorovSmirnov.Side side)
Construct a one-sample Kolmogorov-Smirnov test.

Parameters:
sample - a sample
F - the reference probability distribution to test against
side - one-sided or two-sided test
Method Detail

statistics

public double statistics()
Description copied from class: HypothesisTest
Get the test statistics.

Specified by:
statistics in class HypothesisTest
Returns:
the test statistics
See Also:
Wikipedia: Test statistic

pValue

public double pValue()
Description copied from class: HypothesisTest
Get the p-value for the test statistics.

Specified by:
pValue in class HypothesisTest
Returns:
the p-value
See Also:
Wikipedia: P-value


Copyright © 2010-2014 Numerical Method Incorporation Limited. All Rights Reserved.