Class WilcoxonSignedRankTest.Result
- java.lang.Object
-
- org.apache.commons.statistics.inference.WilcoxonSignedRankTest.Result
-
- All Implemented Interfaces:
SignificanceResult
- Enclosing class:
- WilcoxonSignedRankTest
public static final class WilcoxonSignedRankTest.Result extends Object
Result for the Wilcoxon signed-rank test.This class is immutable.
- Since:
- 1.1
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getPValue()
Returns the test statistic p-value.double
getStatistic()
Returns the test statistic.boolean
hasTiedValues()
Returntrue
if the data had tied values (with equal ranks).boolean
hasZeroValues()
Returntrue
if the data had zero values.-
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
-
-
-
-
Method Detail
-
hasTiedValues
public boolean hasTiedValues()
Returntrue
if the data had tied values (with equal ranks).Note: The exact computation cannot be used when there are tied values. The p-value uses the asymptotic approximation using a tie correction.
- Returns:
true
if there were tied values
-
hasZeroValues
public boolean hasZeroValues()
Returntrue
if the data had zero values. This occurs when the differences between sample values matched the expected location shift:z = x - y == mu
.Note: The exact computation cannot be used when there are zero values. The p-value uses the asymptotic approximation.
- Returns:
true
if there were zero values
-
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
-
-