Class KolmogorovSmirnov
- java.lang.Object
-
- dev.nm.stat.test.HypothesisTest
-
- dev.nm.stat.test.distribution.kolmogorov.KolmogorovSmirnov
-
- Direct Known Subclasses:
KolmogorovSmirnov1Sample
,KolmogorovSmirnov2Samples
public abstract class KolmogorovSmirnov extends HypothesisTest
The Kolmogorov-Smirnov test (KS test) compares a sample with a reference probability distribution (one-sample KS test), or to compare two samples (two-sample KS test). The Kolmogorov-Smirnov statistic quantifies the distance between the empirical distribution function of the sample and the cumulative distribution function of the reference distribution (one-sample KS test), or between the empirical distribution functions of two samples (two-sample KS test). The null distribution of this statistic is calculated under the null hypothesis that the sample is drawn from the reference distribution (in the one-sample case), or that the samples are drawn from the same distribution (in the two-sample case). In each case, the distributions considered under the null hypothesis are continuous distributions but are otherwise unrestricted. The test-statistics is either Dn, Dn+, or Dn-, depending on the side to compute. By R convention, when the exact p-value is not available, we use the limiting distribution. The exact p-value is not available in the case of ties for the one-sample case. The R equivalent function isks.test
.- See Also:
- Jean Dickinson Gibbons, Subhabrata Chakraborti, Nonparametric Statistical Inference. 4th edition. CRC.
- Wikipedia: Kolmogorov-Smirnov test
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KolmogorovSmirnov.Side
the available types of the Kolmogorov-Smirnov statisticstatic class
KolmogorovSmirnov.Type
the available types of the Kolmogorov-Smirnov tests
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlternativeHypothesis()
Get the description of the alternative hypothesis.String
getNullHypothesis()
Get a description of the null hypothesis.-
Methods inherited from class dev.nm.stat.test.HypothesisTest
isNullRejected, nGroups, nObs, oneSidedPvalue, pValue, statistics
-
-
-
-
Method Detail
-
getNullHypothesis
public String getNullHypothesis()
Description copied from class:HypothesisTest
Get a description of the null hypothesis.- Specified by:
getNullHypothesis
in classHypothesisTest
- Returns:
- the null hypothesis description
- See Also:
- Wikipedia: Null hypothesis
-
getAlternativeHypothesis
public String getAlternativeHypothesis()
Description copied from class:HypothesisTest
Get the description of the alternative hypothesis.- Specified by:
getAlternativeHypothesis
in classHypothesisTest
- Returns:
- the alternative hypothesis description
- See Also:
- Wikipedia: Alternative hypothesis
-
-