Class BaseSignificanceResult

java.lang.Object
org.apache.commons.statistics.inference.BaseSignificanceResult
All Implemented Interfaces:
SignificanceResult
Direct Known Subclasses:
KolmogorovSmirnovTest.OneResult, MannWhitneyUTest.Result, OneWayAnova.Result, TTest.Result, UnconditionedExactTest.Result, WilcoxonSignedRankTest.Result

class BaseSignificanceResult extends Object implements SignificanceResult
Base implementation for the result of a test for significance.
Since:
1.1
  • Field Details

    • statistic

      private final double statistic
      Test statistics.
    • p

      private final double p
      p-value.
  • Constructor Details

    • BaseSignificanceResult

      BaseSignificanceResult(double statistic, double p)
      Create an instance.
      Parameters:
      statistic - Test statistic.
      p - Result p-value.
  • Method Details

    • 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