The sign test represents data by using only plus and minus signs, all other information being ignored. The Wilcoxon signed-rank test does make some use of the sizes of the differences between the observed values and the hypothesized median. However, the distribution needs to be continuous and reasonably symmetric.
Procedure
(i) State for the data the null and alternative hypotheses, H0and H1.
(ii) Know whether the stated significance level,α, is for a one-tailed or a two-tailed test (see (ii) in the procedure for the sign test on page 614).
(iii) Find the difference of each piece of data compared with the null hypothesis (see Prob- lems 8 and 9) or assign plus and minus signs to the difference for paired observations (see Problem 10).
(iv) Rank the differences, ignoring whether they are positive or negative.
(v) The Wilcoxon signed-rank statistic T is calculated as the sum of the ranks of either the positive differences or the negative differences—whichever is the smaller for a two-tailed test, and the one which would be
Ch63-H8152.tex 11/7/2006 13: 11 Page 617
CHI-SQUARE AND DISTRIBUTION-FREE TESTS 617
J
Table 63.4 Critical values for the Wilcoxon signed-rank test
α1=5% 212% 1% 12% α1=5% 212% 1% 12%
n α2=10% 5% 2% 1% n α2=10% 5% 2% 1%
1 — — — — 26 110 98 84 75
2 — — — — 27 119 107 92 83
3 — — — — 28 130 116 101 91
4 — — — — 29 140 126 110 100
5 0 — — — 30 151 137 120 109
6 2 0 — — 31 163 147 130 118
7 3 2 0 — 32 175 159 140 128
8 5 3 1 0 33 187 170 151 138
9 8 5 3 1 34 200 182 162 148
10 10 8 5 3 35 213 195 173 159
11 13 10 7 5 36 227 208 185 171
12 17 13 9 7 37 241 221 198 182
13 21 17 12 9 38 256 235 211 194
14 25 21 15 12 39 271 249 224 207
15 30 25 19 15 40 286 264 238 220
16 35 29 23 19 41 302 279 252 233
17 41 34 27 23 42 319 294 266 247
18 47 40 32 27 43 336 310 281 261
19 53 46 37 32 44 353 327 296 276
20 60 52 43 37 45 371 343 312 291
21 67 58 49 42 46 389 361 328 307
22 75 65 55 48 47 407 378 345 322
23 83 73 62 54 48 426 396 362 339
24 91 81 69 61 49 446 415 379 355
25 100 89 76 68 50 466 434 397 373
expected to have the smaller value when H1 is true for a one-tailed test.
(vi) Use Table 63.4 for given values of n, andα1or α2 to read the critical region of T . For exam- ple, if, say, n=16 and α1=5%, then from Table 63.4, T≤35. Thus if T in part (v) is greater than 35 we accept the null hypothesis H0and if T is less than or equal to 35 we accept the alternative hypothesis H1.
This procedure for the Wilcoxon signed-rank test is demonstrated in the following Problems.
Problem 8. A manager of a manufacturer is concerned about suspected slow progress in dealing with orders. He wants at least half of the orders received to be processed within a work- ing day (i.e. 7 hours). A little later he decides to time 17 orders selected at random, to check if
his request had been met. The times spent by the 17 orders being processed were as follows:
434h 934h 1512h 11 h 814h 612h 9 h 834h 1034h 312h 821h 912h 1514h 13 h 8 h 734h 634h
Use the Wilcoxon signed-rank test at a signif- icance level of 5% to check if the managers request for quicker processing is being met.
(This is the same as Problem 5 where the sign test was used).
Using the procedure:
(i) The hypotheses are H0: t=7 h and H1: t>7 h, where t is time.
(ii) Since H1is t>7 h, a one-tail test is assumed, i.e.α1=5%.
618 STATISTICS AND PROBABILITY
(iii) Taking the difference between the time taken for each order and 7 h gives:
−214h +234h +812h +4 h +114h
−12h +2 h +134h +334h −312h +112h +212h +814h +6 h +1 h +34h −14h
(iv) These differences may now be ranked from 1 to 17, ignoring whether they are positive or negative:
Rank 1 2 3 4 5 6
Difference −14 −12 34 1 114 112
Rank 7 8 9 10 11 12
Difference 143 2 −214 212 234 −312
Rank 13 14 15 16 17
Difference 343 4 6 814 812 (v) The Wilcoxon signed-rank statistic T is calcu-
lated as the sum of the ranks of the negative differences for a one-tailed test.
The sum of the ranks for the negative values is:
T=1+2+9+12=24.
(vi) Table 63.4 gives the critical values of T for the Wilcoxon signed-rank test. For n=17 and a significance levelα1=5%, T ≤41.
Hence the conclusion is that since T=24 the result is within the 5% critical region. There is therefore strong evidence to support H1, the alternative hypothesis, that the median processing time is greater than 7 hours.
Problem 9. The following data represents the number of hours that a portable car vacuum cleaner operates before recharging is required.
Operating
time (h) 1.4 2.3 0.8 1.4 1.8 1.5 1.9 1.4 2.1 1.1 1.6 Use the Wilcoxon signed-rank test to test the hypothesis, at a 5% level of significance, that this particular vacuum cleaner operates, on average, 1.7 hours before needing a recharge.
(This is the same as Problem 6 where the sign test was used).
Using the procedure:
(i) H0: t=1.7 h and H1: t=1.7 h.
(ii) Significance level,α2=5% (since this is a two- tailed test).
(iii) Taking the difference between each operating time and 1.7 h gives:
−0.3 h +0.6 h −0.9 h −0.3 h +0.1 h −0.2 h +0.2 h −0.3 h +0.4 h −0.6 h −0.1 h
(iv) These differences may now be ranked from 1 to 11 (ignoring whether they are positive or negative).
Some of the differences are equal to each other. For example, there are two 0.1’s (ignor- ing signs) that would occupy positions 1 and 2 when ordered. We average these as far as rankings are concerned i.e. each is assigned a ranking of1+2
2 i.e. 1.5. Similarly the two 0.2 values in positions 3 and 4 when ordered are each assigned rankings of 3+4
2 i.e. 3.5, and the three 0.3 values in positions 5, 6, and 7 are each assigned a ranking of5+6+7
3 i.e. 6, and so on. The rankings are therefore:
Rank 1.5 1.5 3.5 3.5
Difference +0.1 −0.1 −0.2 +0.2
Rank 6 6 6 8
Difference −0.3 −0.3 −0.3 +0.4
Rank 9.5 9.5 11
Difference +0.6 −0.6 −0.9
(v) There are 4 positive terms and 7 negative terms. Taking the smaller number, the four positive terms have rankings of 1.5, 3.5, 8 and 9.5. Summing the positive ranks gives:
T=1.5+3.5+8+9.5=22.5.
(vi) From Table 63.4, when n=11 and α2=5%, T≤10.
Since T=22.5 falls in the acceptance region (i.e. in this case is greater than 10), the null
Ch63-H8152.tex 11/7/2006 13: 11 Page 619
CHI-SQUARE AND DISTRIBUTION-FREE TESTS 619
J
hypothesis is accepted, i.e. the average oper- ating time is not significantly different from 1.7 h.
[Note that if, say, a piece of the given data was 1.7 h, such that the difference was zero, that data is ignored and n would be 10 instead of 11 in this case.]
Problem 10. An engineer is investigating two different types of metering devices, A and B, for an electronic fuel injection system to determine if they differ in their fuel mileage performance.
The system is installed on 12 different cars, and a test is run with each metering system in turn on each car. The observed fuel mileage data (in miles/gallon) is shown below:
A 18.7 20.3 20.8 18.3 16.4 16.8 B 17.6 21.2 19.1 17.5 16.9 16.4 A 17.2 19.1 17.9 19.8 18.2 19.1 B 17.7 19.2 17.5 21.4 17.6 18.8 Use the Wilcoxon signed-rank test, at a level of significance of 5%, to determine whether there is any difference between the two systems.
(This is the same as Problem 7 where the sign test was used)
Using the procedure:
(i) H0: FA=FBand H1: FA=FBwhere FAand FBare the fuels in miles/gallon for systems A and B respectively.
(ii) α2=5% (since it is a two-tailed test).
(iii) The difference between the observations is determined and a + or a − sign assigned to each as shown below:
(A−B) +1.1 −0.9 +1.7 +0.8
−0.5 +0.4 −0.5 −0.1 +0.4 −1.6 +0.6 +0.3 (iv) The differences are now ranked from 1 to 12
(ignoring whether they are positive or nega- tive). When ordered, 0.4 occupies positions 3 and 4; their average is 3.5 and both are assigned this value when ranked. Similarly 0.5 occupies positions 5 and 6 and their average of 5.5 is assigned to each when ranked.
Rank 1 2 3.5 3.5
Difference −0.1 +0.3 +0.4 +0.4
Rank 5.5 5.5 7 8
Difference −0.5 −0.5 +0.6 +0.8
Rank 9 10 11 12
Difference −0.9 +1.1 −1.6 +1.7 (v) There are 7 ‘+signs’ and 5 ‘−signs’. Taking
the smaller number, the negative signs have rankings of 1, 5.5, 5.5, 9 and 11.
Summing the negative ranks gives:
T=1+5.5+5.5+9+11=32.
(vi) From Table 63.4, when n=12 and α2=5%, T≤13.
Since from (iv), T is not equal or less than 13, the null hypothesis cannot be rejected, i.e.
the two metering devices produce the same fuel mileage performance.
Now try the following exercise.
Exercise 229 Further problems on the Wilcoxon signed-rank test
1. The time to repair an electronic instrument is a random variable. The repair times (in hours) for 16 instruments are as follows:
218 275 264 210 161 374 178 265 150 360 185 171 215 100 474 248 Use the Wilcoxon signed-rank test, at a 5%
level of significance, to test the hypothesis that the mean repair time is 220 hours.
H0: t=220 h, H1: t=220 h, T =74.From Table 63.4, T ≤29, hence H0is accepted
2. 18 samples of serum are analyzed for their sodium content. The results, expressed as ppm are as follows:
169 151 166 155 149 154 164 151 147 142 168 152 149 129 153 154 149 143
620 STATISTICS AND PROBABILITY
At a level of significance of 5%, use the Wilcoxon signed-rank test to test the null hypothesis that the average value for the method of analysis used is 150 ppm.
⎡
⎢⎣
H0: s=150, H1: s=150, T=38.From Table 63.4, T≤40, hence alternative hypothesis H1is accepted
⎤
⎥⎦
3. A paint supplier claims that a new additive will reduce the drying time of their acrylic paint. To test his claim, 12 pieces of wood are painted, one half of each piece with paint containing the regular additive and the other half with paint containing the new additive.
The drying time (in hours) were measured as follows:
New
additive 4.5 5.5 3.9 3.6 4.1 6.3 Regular
additive 4.7 5.9 3.9 3.8 4.4 6.5 New
additive 5.9 6.7 5.1 3.6 4.0 3.0 Regular
additive 6.9 6.5 5.3 3.6 3.9 3.9 Use the Wilcoxon signed-rank test at a sig- nificance level of 5% to test the hypothesis that there is no difference, on average, in the drying times of the new and regular additive paints.
⎡
⎢⎢
⎢⎢
⎣
H0: N =R, H1: N =R, T =5 From Table 63.4, with n=10 (since two differences are zero), T≤8, Hence there is a
significant difference in the drying times
⎤
⎥⎥
⎥⎥
⎦