You are on page 1of 3

Calculation of p-value for Wilcoxon Signed-Rank test

The null hypothesis for the Signed-Rank test is that


the distributions of eye-itch scores are equivalent for
each treatment.
The probabilities of a certain magnitude being positive
or negative are equivalent (p = ).
Under H0 the probability for any arrangement of signs
of the ranks is ( )n
The p-value is just k()n, where k is the number of
arrangements of signs that yield a statistic as or more
extreme than the observed statistic
ranks of magnitudes of observations

obs data
Other
arrangements
of signs that
result in SPR
as or more
extreme

3 3
- +
- + - - - -

3
+
-

3
+
-

3 6.5 6.5
+ -

8
-

sum of
positive
ranks

3
0
3
3
3
3

In our eye-itch data, there are 6 possible arrangements of


the signs that would yield a sum of the positive ranks equal
to or less than that observed (note we include the observed
arrangement).
The one-sided p-value would be 6()8 = 0.0234.
The two-sided p-value is 2 0.0234 = 0.0468.

P-value for Wilcoxon Rank-Sum test


The null hypothesis the distributions of each group is
the same
Under H0 both samples come from the same
distribution so the probability of any n1 of the n1+n2
ranks is equally likely.
Can compute the distribution of all possible sums of
the ranks in group 1, then compare the observed
statistic to this distribution
distribution of possible sums of ranks of controls

p = 0.009

36.5

p = 0.008

50

102.5

116

rank sums

This distribution was created by computer sampling.


If there are no ties in the data, then distribution
calculation is easier (and tables are available in some
texts)

Note distribution looks normal. See coursepack for


computation of Normal approximation p-value.

You might also like