Class WilcoxonSignedRankTest.Result
java.lang.Object
org.apache.commons.statistics.inference.BaseSignificanceResult
org.apache.commons.statistics.inference.WilcoxonSignedRankTest.Result
- All Implemented Interfaces:
SignificanceResult
- Enclosing class:
WilcoxonSignedRankTest
Result for the Wilcoxon signed-rank test.
This class is immutable.
- Since:
- 1.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanFlag indicating the data had tied values.private final booleanFlag indicating the data had zero values. -
Constructor Summary
ConstructorsConstructorDescriptionResult(double statistic, boolean tiedValues, boolean zeroValues, double p) Create an instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturntrueif the data had tied values (with equal ranks).booleanReturntrueif the data had zero values.Methods inherited from class org.apache.commons.statistics.inference.BaseSignificanceResult
getPValue, getStatisticMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.statistics.inference.SignificanceResult
reject
-
Field Details
-
tiedValues
private final boolean tiedValuesFlag indicating the data had tied values. -
zeroValues
private final boolean zeroValuesFlag indicating the data had zero values.
-
-
Constructor Details
-
Result
Result(double statistic, boolean tiedValues, boolean zeroValues, double p) Create an instance.- Parameters:
statistic- Test statistic.tiedValues- Flag indicating the data had tied values.zeroValues- Flag indicating the data had zero values.p- Result p-value.
-
-
Method Details
-
hasTiedValues
public boolean hasTiedValues()Returntrueif 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:
trueif there were tied values
-
hasZeroValues
public boolean hasZeroValues()Returntrueif 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:
trueif there were zero values
-