SuanShu, a Java numerical and statistical library



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

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

KolmogorovSmirnov2Samples

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

Parameters:
sample1 - a sample
sample2 - another sample
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.