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
Base implementation for the result of a test for significance.
- Since:
- 1.1
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the test statistic p-value.doubleReturns the test statistic.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SignificanceResult
reject
-
Field Details
-
statistic
private final double statisticTest statistics. -
p
private final double pp-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:SignificanceResultReturns the test statistic.- Specified by:
getStatisticin interfaceSignificanceResult- Returns:
- the statistic
-
getPValue
public double getPValue()Description copied from interface:SignificanceResultReturns the test statistic p-value.The number returned is the smallest significance level at which one can reject the null hypothesis.
- Specified by:
getPValuein interfaceSignificanceResult- Returns:
- the p-value
-