SuanShu, a Java numerical and statistical library

Class KolmogorovSmirnov2Samples

  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.KolmogorovSmirnov2Samples

public class KolmogorovSmirnov2Samples
extends KolmogorovSmirnov

The two-sample Kolmogorov-Smirnov test (two-sample KS test) tests for the equality of the distributions of two samples.

See Also:
"Jean Dickinson Gibbons, Subhabrata Chakraborti, "Section 6.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
KolmogorovSmirnov2Samples(double[] sample1, double[] sample2, KolmogorovSmirnov.Side side)
          Construct a two-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


public KolmogorovSmirnov2Samples(double[] sample1,
                                 double[] sample2,
                                 KolmogorovSmirnov.Side side)
Construct a two-sample Kolmogorov-Smirnov test.

sample1 - a sample
sample2 - another sample
side - one-sided or two-sided test
Method Detail


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

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


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

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

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