Class KolmogorovSmirnov1Sample
- java.lang.Object
-
- dev.nm.stat.test.HypothesisTest
-
- dev.nm.stat.test.distribution.kolmogorov.KolmogorovSmirnov
-
- dev.nm.stat.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.
-
-
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 KolmogorovSmirnov1Sample(double[] sample, ProbabilityDistribution F, KolmogorovSmirnov.Side side)Construct a one-sample Kolmogorov-Smirnov test.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublepValue()Get the p-value for the test statistics.doublestatistics()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
-
KolmogorovSmirnov1Sample
public KolmogorovSmirnov1Sample(double[] sample, ProbabilityDistribution F, KolmogorovSmirnov.Side side)Construct a one-sample Kolmogorov-Smirnov test.- Parameters:
sample- a sampleF- the reference probability distribution to test againstside- one-sided or two-sided test
-
-
Method Detail
-
statistics
public double statistics()
Description copied from class:HypothesisTestGet the test statistics.- Specified by:
statisticsin classHypothesisTest- Returns:
- the test statistics
- See Also:
- Wikipedia: Test statistic
-
pValue
public double pValue()
Description copied from class:HypothesisTestGet the p-value for the test statistics.- Specified by:
pValuein classHypothesisTest- Returns:
- the p-value
- See Also:
- Wikipedia: P-value
-
-