Package smile.stat
Interface Hypothesis.KS
- Enclosing interface:
Hypothesis
public static interface Hypothesis.KS
The Kolmogorov-Smirnov test (K-S test).
-
Method Summary
Modifier and TypeMethodDescriptionstatic KSTest
test
(double[] x, double[] y) The two-sample KS test for the null hypothesis that the data sets are drawn from the same distribution.static KSTest
test
(double[] x, Distribution dist) The one-sample KS test for the null hypothesis that the data set x is drawn from the given distribution.
-
Method Details
-
test
The one-sample KS test for the null hypothesis that the data set x is drawn from the given distribution. Small values of p-value show that the cumulative distribution function of x is significantly different from the given distribution. The array x is modified by being sorted into ascending order.- Parameters:
x
- the sample values.dist
- the distribution.- Returns:
- the test results.
-
test
The two-sample KS test for the null hypothesis that the data sets are drawn from the same distribution. Small values of p-value show that the cumulative distribution function of x is significantly different from that of y. The arrays x and y are modified by being sorted into ascending order.- Parameters:
x
- the sample values.y
- the sample values.- Returns:
- the test results.
-