Class KolmogorovSmirnovTest.OneResult

java.lang.Object
org.apache.commons.statistics.inference.KolmogorovSmirnovTest.OneResult
All Implemented Interfaces:
SignificanceResult
Direct Known Subclasses:
KolmogorovSmirnovTest.TwoResult
Enclosing class:
KolmogorovSmirnovTest

public static class KolmogorovSmirnovTest.OneResult extends Object
Result for the one-sample Kolmogorov-Smirnov test.

This class is immutable.

Since:
1.1
  • 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
    • getStatistic

      public double getStatistic()
      Description copied from interface: SignificanceResult
      Returns the test statistic.
      Specified by:
      getStatistic in interface SignificanceResult
      Returns:
      the statistic
    • getPValue

      public double getPValue()
      Description copied from interface: SignificanceResult
      Returns the test statistic p-value.

      The number returned is the smallest significance level at which one can reject the null hypothesis.

      Specified by:
      getPValue in interface SignificanceResult
      Returns:
      the p-value