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

public static final class WilcoxonSignedRankTest.Result extends BaseSignificanceResult
Result for the Wilcoxon signed-rank test.

This class is immutable.

Since:
1.1
  • Field Details

    • tiedValues

      private final boolean tiedValues
      Flag indicating the data had tied values.
    • zeroValues

      private final boolean zeroValues
      Flag 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()
      Return true 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()
      Return true 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