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 TypeMethodDescriptiondouble
Returns the test statistic p-value.double
Returns the test statistic.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
-
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:SignificanceResult
Returns the test statistic.- Specified by:
getStatistic
in interfaceSignificanceResult
- 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 interfaceSignificanceResult
- Returns:
- the p-value
-