org.apache.commons.math.stat.inference
Interface WilcoxonSignedRankTest

All Known Implementing Classes:
WilcoxonSignedRankTestImpl

public interface WilcoxonSignedRankTest

An interface for Wilcoxon signed-rank test.

Version:
$Id: WilcoxonSignedRankTest.java 1131229 2011-06-03 20:49:25Z luc $

Method Summary
 double wilcoxonSignedRank(double[] x, double[] y)
          Computes the Wilcoxon signed ranked statistic comparing mean for two related samples or repeated measurements on a single sample.
 double wilcoxonSignedRankTest(double[] x, double[] y, boolean exactPValue)
          Returns the observed significance level, or p-value, associated with a Wilcoxon signed ranked statistic comparing mean for two related samples or repeated measurements on a single sample.
 

Method Detail

wilcoxonSignedRank

double wilcoxonSignedRank(double[] x,
                          double[] y)
                          throws java.lang.IllegalArgumentException
Computes the Wilcoxon signed ranked statistic comparing mean for two related samples or repeated measurements on a single sample.

This statistic can be used to perform a Wilcoxon signed ranked test evaluating the null hypothesis that the two related samples or repeated measurements on a single sample has equal mean.

Let Xi denote the i'th individual of the first sample and Yi the related i'th individual in the second sample. Let Zi = Yi - Xi.

Preconditions:

Parameters:
x - the first sample
y - the second sample
Returns:
wilcoxonSignedRank statistic
Throws:
java.lang.IllegalArgumentException - if preconditions are not met

wilcoxonSignedRankTest

double wilcoxonSignedRankTest(double[] x,
                              double[] y,
                              boolean exactPValue)
                              throws java.lang.IllegalArgumentException,
                                     MathException
Returns the observed significance level, or p-value, associated with a Wilcoxon signed ranked statistic comparing mean for two related samples or repeated measurements on a single sample.

Let Xi denote the i'th individual of the first sample and Yi the related i'th individual in the second sample. Let Zi = Yi - Xi.

Preconditions:

Parameters:
x - the first sample
y - the second sample
exactPValue - if the exact p-value is wanted (only works for x.length <= 30, if true and x.length > 30, this is ignored because calculations may take too long)
Returns:
p-value
Throws:
java.lang.IllegalArgumentException - if preconditions are not met
MathException - if an error occurs computing the p-value


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.