Class KolmogorovSmirnovTest.OneResult
java.lang.Object
org.apache.commons.statistics.inference.BaseSignificanceResult
org.apache.commons.statistics.inference.KolmogorovSmirnovTest.OneResult
- All Implemented Interfaces:
SignificanceResult
- Direct Known Subclasses:
KolmogorovSmirnovTest.TwoResult
- Enclosing class:
KolmogorovSmirnovTest
Result for the one-sample Kolmogorov-Smirnov test.
This class is immutable.
- Since:
- 1.1
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.commons.statistics.inference.BaseSignificanceResult
getPValue, getStatistic
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.commons.statistics.inference.SignificanceResult
reject
-
Field Details
-
sign
private final int signSign of the statistic.
-
-
Constructor Details
-
OneResult
OneResult(double statistic, int sign, double p) Create an instance.- Parameters:
statistic
- Test statistic.sign
- Sign of the statistic.p
- Result p-value.
-
-
Method Details
-
getSign
public int getSign()Gets the sign of the statistic. This is 1 for \(D^+\) and -1 for \(D^-\). For a two sided-test this is zero if the magnitude of \(D^+\) and \(D^-\) was equal; otherwise the sign indicates the larger of \(D^+\) or \(D^-\).- Returns:
- the sign
-