3. Wilcoxon signed rank testWilcoxon signed rank test
To test difference between paired
data
4. Orginal test:
The original Wilcoxon's proposal used a
different statistic. Denoted by Siegel as
the T statistic, it is the smaller of the two
sums of ranks of given sign; in the example
given below, therefore, T would equal
3+4+5+6=18. Low values of T are required
for significance. As will be obvious from
the example below, T is easier to calculate by
hand than W and the test is equivalent to the
two-sided test described above; however, the
distribution of the statistic under has to be
adjusted
5. STEP 1STEP 1
ď‚—Exclude any differences which are zero
ď‚—Put the rest of differences in ascending order
ď‚—Ignore their signs
ď‚—Assign them ranks
ď‚—If any differences are equal, average their
ranks
6. STEP 2STEP 2
ď‚—Count up the ranks of +ives as T+
Count up the ranks of –ives as T-
7. STEP 3STEP 3
ď‚—If there is no difference between drug (T+) and
placebo (T-), then T+ & T- would be similar
ď‚—If there were a difference
one sum would be much smaller and
the other much larger than expected
ď‚—The smaller sum is denoted as T
ď‚—T = smaller of T+ and T-
8. STEP 4STEP 4
ď‚—Compare the value obtained with the
critical values (5%, 2% and 1% ) in table
ď‚—N is the number of differences that
were ranked (not the total number of
differences)
ď‚—So the zero differences are excluded
9. PatientPatient
Hours of sleepHours of sleep
DifferenceDifference
RankRank
Ignoring signIgnoring sign
DrugDrug PlaceboPlacebo
11 6.16.1 5.25.2 0.90.9 3.5*3.5*
22 7.07.0 7.97.9 -0.9-0.9 3.5*3.5*
33 8.28.2 3.93.9 4.34.3 1010
44 7.67.6 4.74.7 2.92.9 77
55 6.56.5 5.35.3 1.21.2 55
66 8.48.4 5.45.4 3.03.0 88
77 6.96.9 4.24.2 2.72.7 66
88 6.76.7 6.16.1 0.60.6 22
99 7.47.4 3.83.8 3.63.6 99
1010 5.85.8 6.36.3 -0.5-0.5 11
3rd
& 4th
ranks are tied hence averaged
T= smaller of T+ (50.5) and T- (4.5)
Here T=4.5 significant at 2% level indicating the drug (hypnotic) is
more effective than placebo
10. Wilcoxon rank sum testWilcoxon rank sum test
ď‚—To compare two groups
ď‚—Consists of 3 basic steps
12. Step 1Step 1
ď‚—Rank the data of both the groups in
ascending order
ď‚—If any values are equal average
their ranks
13. Step 2Step 2
ď‚—Add up the ranks in group with
smaller sample size
ď‚—If the two groups are of the same
size either one may be picked
ď‚—T= sum of ranks in group with
smaller sample size
14. Step 3Step 3
ď‚—Compare this sum with the critical ranges
given in table
ď‚—Look up the rows corresponding to the
sample sizes of the two groups
ď‚—A range will be shown for the 5%
significance level
16. Limitation[edit]
As demonstrated in the example, when the
difference between the groups is zero, the
observations are discarded. This is of
particular concern if the samples are taken
from a discrete distribution. In these
scenarios the modification to the Wilcoxon
test by Pratt 1959, provides an alternative
which incorporates the zero differences.[4]
[5]
 This modification is more robust for data
on an ordinal scale