public class WilcoxonSignedRankTest extends Object
Constructor and Description 

WilcoxonSignedRankTest()
Create a test instance where NaN's are left in place and ties get the
average of applicable ranks.

WilcoxonSignedRankTest(NaNStrategy nanStrategy,
TiesStrategy tiesStrategy)
Create a test instance using the given strategies for NaN's and ties.

Modifier and Type  Method and Description 

double 
wilcoxonSignedRank(double[] x,
double[] y)
Computes the
Wilcoxon signed ranked statistic comparing means 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
pvalue, associated with a
Wilcoxon signed ranked statistic comparing mean for two related
samples or repeated measurements on a single sample.

public WilcoxonSignedRankTest()
public WilcoxonSignedRankTest(NaNStrategy nanStrategy, TiesStrategy tiesStrategy)
nanStrategy
 specifies the strategy that should be used for
Double.NaN'stiesStrategy
 specifies the strategy that should be used for tiespublic double wilcoxonSignedRank(double[] x, double[] y) throws MathIllegalArgumentException, NullArgumentException
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 have equal mean.
Let X_{i} denote the i'th individual of the first sample and Y_{i} the related i'th individual in the second sample. Let Z_{i} = Y_{i}  X_{i}.
Preconditions:
x
 the first sampley
 the second sampleNullArgumentException
 if x
or y
are null
.MathIllegalArgumentException
 if x
or y
are
zerolength.MathIllegalArgumentException
 if x
and y
do not
have the same length.public double wilcoxonSignedRankTest(double[] x, double[] y, boolean exactPValue) throws MathIllegalArgumentException, NullArgumentException, MathIllegalStateException
Let X_{i} denote the i'th individual of the first sample and Y_{i} the related i'th individual in the second sample. Let Z_{i} = Y_{i}  X_{i}.
Preconditions:
exactPValue
is false, the normal approximation is used
to estimate the pvalue including a continuity correction factor.
wilcoxonSignedRankTest(x, y, true)
should give the same results
as wilcox.test(x, y, alternative = "two.sided", mu = 0,
paired = TRUE, exact = FALSE, correct = TRUE)
in R (as long as
there are no tied pairs in the data).x
 the first sampley
 the second sampleexactPValue
 if the exact pvalue is wanted (only works for
x.length <= 30, if true and x.length > 30, MathIllegalArgumentException is thrown)NullArgumentException
 if x
or y
are null
.MathIllegalArgumentException
 if x
or y
are
zerolength or for all i, x[i] == y[i]MathIllegalArgumentException
 if x
and y
do not
have the same length.MathIllegalArgumentException
 if exactPValue
is
true
and x.length
> 30MathIllegalStateException
 if the pvalue can not be computed due
to a convergence errorMathIllegalStateException
 if the maximum number of iterations is
exceededCopyright © 2016–2020 Hipparchus.org. All rights reserved.