Class KolmogorovSmirnov2Samples
- java.lang.Object
-
- dev.nm.stat.test.HypothesisTest
-
- dev.nm.stat.test.distribution.kolmogorov.KolmogorovSmirnov
-
- dev.nm.stat.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class dev.nm.stat.test.distribution.kolmogorov.KolmogorovSmirnov
KolmogorovSmirnov.Side, KolmogorovSmirnov.Type
-
-
Constructor Summary
Constructors Constructor Description KolmogorovSmirnov2Samples(double[] sample1, double[] sample2, KolmogorovSmirnov.Side side)
Construct a two-sample Kolmogorov-Smirnov test.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
pValue()
Get the p-value for the test statistics.double
statistics()
Get the test statistics.-
Methods inherited from class dev.nm.stat.test.distribution.kolmogorov.KolmogorovSmirnov
getAlternativeHypothesis, getNullHypothesis
-
Methods inherited from class dev.nm.stat.test.HypothesisTest
isNullRejected, nGroups, nObs, oneSidedPvalue
-
-
-
-
Constructor Detail
-
KolmogorovSmirnov2Samples
public KolmogorovSmirnov2Samples(double[] sample1, double[] sample2, KolmogorovSmirnov.Side side)
Construct a two-sample Kolmogorov-Smirnov test.- Parameters:
sample1
- a samplesample2
- another sampleside
- 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 classHypothesisTest
- 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 classHypothesisTest
- Returns:
- the p-value
- See Also:
- Wikipedia: P-value
-
-