The reader should recall that the procedures discussed in Chapter 5 for testing the null hypothesis that ?? = ??0are valid only if the population is approximately normal or if the sample is large. If n??~) = 0.5 andP (X??~)=P(X Chapter 9 Nonparametric Tests 9.1 Sign Test The reader should recall that the procedures discussed in Chapter 5 for testing the null hypothesis that ? = ?0are valid only if the population is approximately normal or if the sample is large. If n<30 and="" the="" population="" is="" decidedly="" nonnormal,="" we="" must="" resort="" to="" a="" nonparametric="" test.="" the="" sign="" test="" is="" used="" to="" test="" hypotheses="" on="" a="" population="" median.="" in="" the="" case="" of="" many="" of="" the="" nonparametric="" procedures,="" the="" mean="" is="" replaced="" by="" the="" median="" as="" the="" pertinent="" location="" parameter="" under="" test.="" the="" population="" counterpart,="" denoted="" by?,="" has="" an="" analogous="" definition.="" given="" a="" random="" variable="" x,�̃�="" is="" defined="" such="" that="" p(x="">�̃�) ≤ 0.5 andP (X<�̃�) ≤="" 0.5.="" in="" the="" continuous="" case,="" p(x="">�̃�)=P(X<�̃�)=0 .5.="" the="" appropriate="" test="" statistic="" for="" the="" sign="" test="" is="" the="" binomial="" random="" variable="" x,="" representing="" the="" number="" of="" plus="" signs="" in="" our="" random="" sample.="" if="" the="" null="" hypothesis="" that="" �̃�="?0" is="" true,="" the="" probability="" that="" a="" sample="" value="" results="" in="" either="" a="" plus="" or="" a="" minus="" sign="" is="" equal="" to="" 1/2.="" therefore,="" to="" test="" the="" null="" hypothesis="" that�̃�="�̃�0," we="" actually="" test="" the="" null="" hypothesis="" that="" the="" number="" of="" plus="" signs="" is="" a="" value="" of="" a="" random="" variable="" having="" the="" binomial="" distribution="" with="" the="" parameter="" p="1" 2.="" p-values="" for="" both="" one-sided="" and="" two-sided="" alternatives="" can="" then="" be="" calculated="" using="" this="" binomial="" distribution.="" for="" example,="" in="" testing="" 0:="" �̃�="�̃�0," 1:="" �̃�="">�̃�)=0>< �̃�0,="" we="" shall="" reject="" 0="" in="" favor="" of="" 1="" only="" if="" the="" proportion="" of="" plus="" signs="" is="" suffi="" ciently="" less="" than="" 1/2,="" that="" is,="" when="" the="" value="" of="" our="" random="" variable="" is="" small.="" hence,="" if="" the="" computed="" p-value="" =="" (?="" ≤="" ℎ??="" =="" 1="" 2)="" is="" less="" than="" or="" equal="" to="" some="" preselected="" significance="" level="" α,="" we="" reject="" 0="" in="" favor="" of="" 1.="" for="" example,="" when="" n="15" and?="3," we="" findthat="" =="" (?="" ≤="" ℎ??="" =="" 1="" 2="" )="∑" (?;="" 15,="" 1="" 2="" )="" 3="" =0="∑" (="" 15="" )="" (="" 1="" 2="" )="" (="" 1="" 2="" )="" 15−?3="" =0="∑" (="" 15="" )="" (="" 1="" 2="" )="" 153="" =0="(" 1="" 2="" )="" 15="" ((="" 15="" 0="" )="" +="" (="" 15="" 1="" )="" +="" (="" 15="" 2="" )="" +="" (="" 15="" 3="" ))="0.0000305(1" +="" 15="" +="" 105="" +="" 455)="0.0176" so="" the="" null="" hypothesis="" �̃�="�̃�0" can="" certainly="" be="" rejected="" at="" the="" 0.05level="" of="" significance="" but="" not="" at="" the="" 0.01="" level.="" to="" test="" the="" hypothesis="" 0:="" �̃�="�̃�0," 1:="" �̃�=""> �̃�0, we reject ?0 in favor of ?1 only if the proportion of plus signs is suffi ciently greater than 1/2, that is, when the value ? of our random variable is small. Hence, if the computed P-value ? = ?(? ≥ ? ?ℎ?? ? = 1 /2) is less than ?, we reject ?0 in favor of ?1. Finally, to test the hypothesis ?0: �̃� = �̃�0, ?1: �̃� ≠ �̃�0, we reject ?0 in favor of ?1when the proportion of plus signs is significantly less than or greater than 1/2. This, of course, is equivalent to x being sufficiently small or sufficiently large. Therefore, if ? < 2="" and="" the="" computedp-value="" =="" 2?(?="" ≤="" ℎ??="" =="" 1="" 2)="" is="" less="" than="" or="" equal="" to="" α,="" or="" if?=""> ?/2 and the computed P-value ? = 2?(? ≥ ? ?ℎ?? ? = 1 /2) is less than or equal to α, we reject ?0 in favor of ?1. Example 9.1 The following data represent the number of hours that a rechargeable hedge trimmer operates before a recharge is required: 1.5,2.2,0.9,1.3,2.0,1.6,1.8,1.5,2.0,1.2,1.7. Use the sign test to test the hypothesis, at the 0.05 level of significance, that this particular trimmer operates a median of 1.8hours before requiring a recharge. Solution 1. ?0: �̃� = 1.8. 2. ?1: �̃� ≠ 1.8. 3. ? = 0 .05. 4. Test statistic: Binomial variable X with ? = 1 /2. 5. Computations: Replacing each value by the symbol “+” if it exceeds 1.8 and by the symbol “−” if it is less than 1.8 and discarding the one measurement that equals 1.8, we obtain the sequence 1.5 − , 2.2 + , 0.9 − , 1.3 − , 2.0 + , 1.6 − , 1.8 , 1.5 − , 2.0 + , 1.2 − , 1.7 − for which n = 10, x = 3, and n/2 = 5. Therefore, the computed P-value is ? = 2?(? ≤ 3 ?ℎ?? ? = 1 /2) = 2 ∑ ? (?; 10, 1 2 ) 3 ?=0 = 2 ∑ ( 10 ? ) ( 1 2 ) ? ( 1 2 ) 10−?3 ?=0 = 2 ∑ ( 10 ? ) ( 1 2 ) 103 ?=0 = ( 1 2 ) 10 (( 10 0 ) + ( 10 1 ) + ( 10 2 ) + ( 10 3 )) = 2 × 0.0000977(1 + 10 + 45 + 120) = 0.3438 > 0.05 6. Decision: Do not reject the null hypothesis and conclude that the median operating time is not significantly different from 1.8 hours. We can also use the sign test to test the null hypothesis �̃�1 − �̃�2 = ?0for paired observations. Here we replace each diff erence, ??, with a plus or minus sign depending on whether the adjusted difference, ?? − ?0, is positive or negative. Throughout this section, we have assumed that the populations are symmetric. However, even if populations are skewed, we can carry out the same test procedure, but the hypotheses refer to the population medians rather than the means. 9.2 Signed-Rank Test The reader should note that the sign test utilizes only the plus and minus signs of the differences between the observations and �̃�0 in the one-sample case, or the plus and minus signs of the differences between the pairs of observations in the paired-sample case; it does not take into consideration the magnitudes of these differences. A test utilizing both direction and magnitude, proposed in 1945 by Frank Wilcoxon, is now commonly referred to as the Wilcoxon signed- rank test. The analyst can extract more information from the data in a nonparametric fashion if it is reasonable to invoke an additional restriction on the distribution from which the data were taken. The Wilcoxon signed-rank test applies in the case of a symmetric continuous distribution. Under this condition, we can test the null hypothesis �̃� = �̃�0. We first subtract �̃�0 from each sample value, discarding all differences equal to zero. The remaining differences are then ranked without regard to sign. A rank of 1 is assigned to the smallest absolute difference (i.e., without sign), a rank of 2 to the next smallest, and so on. When the absolute value of two or more differences is the same, assign to each the average of the ranks that would have been assigned if the differences were distinguishable. For example, if the fifth and sixth smallest differences are equal in absolute value, each is assigned a rank of 5.5. If the hypothesis �̃� = �̃�0 is true, the total of the ranks corresponding to the positive differences should nearly equal the total of the ranks corresponding to the negative differences. Let us represent these totals by ?+and?−, respectively. We designate the smaller of ?+and?−by w. In selecting repeated samples, we would expect ?+and?−, and therefore w, to vary. Thus, we may think of ?+,?− and ? as values of the corresponding random variables ?+,?−andW. The null hypothesis �̃� = �̃�0 can be rejected in favor of the alternative �̃� < �̃�0="" only="" if="" +is="" small="" and="" −="" is="" large.="" likewise,="" the="" alternative="" �̃�=""> �̃�0 can be accepted only if ?+is large and ?−is small. For a two-sided alternative, we may reject ?0 in favor of ?1if either ?+or?−, and hence w, is sufficiently small. Therefore, no matter what the alternative hypothesismay be, we reject the null hypothesis when the value of the appropriate statistic ?+,?−, or W is sufficiently small. Two Samples with Paired Observations To test the null hypothesis that we are sampling two continuous symmetric populations with �̃�1 − �̃�2 for the paired-sample case, we rank the differences of the paired observations without regard to sign and proceed as in the single-sample case. The various test procedures for both the single- and paired-sample cases are summarized in Table 9.2. Table 9.2: Signed-Rank Test ?? ?? Compute �̃� = �̃�0 { �̃� < �̃�0="" �̃�=""> �̃�0 �̃� ≠ �̃�0 ?+ ?− ? �̃�1 = �̃�2 { �̃�1 < �̃�2="" �̃�1=""> �̃�2 �̃�1 ≠ �̃�2 ?+ ?− ? It is not difficult to show that whenever n<5 and="" the="" level="" of="" significance="" does="" not="" exceed="" 0.05="" for="" a="" one-tailed="" test="" or="" 0.10="" for="" a="" two-tailed="" test,="" all="" possible="" values="" of="" +,?−,="" orw="" will="" lead="" to="" the="" acceptance="" of="" the="" null="" hypothesis.="" however,="" when="" 5="" ≤="" n="" ≤="" 30,="" table="" signed-rank="" test="" shows="" approximate="" critical="" values="" of="" +="" and="" −="" for="" levels="" of="" significance="" equal="" to="" 0.01,="" 0.025,="" and="" 0.05="" for="" a="" one-="" tailed="" test="" and="" critical="" values="" of="" w="" for="" levels="" of="" significance="" equal="" to="" 0.02,="" 0.05,="" and="" 0.10="" for="" a="" two-tailed="" test.="" the="" null="" hypothesis="" is="" rejected="" if="" the="" computed="" value="" +,?−,="" or="" w="" is="" less="" than="" or="" equal="" to="" the="" appropriate="" tabled="" value.="" for="" example,="" when="" n="12," table="" signed-="" rank="" test="" shows="" that="" a="" value="" of="" +="" ≤="" 17="" is="" required="" for="" the="" one-="" sided="" alternative="" �̃�="">5>< �̃�0 to be significant at the 0.05 level. example 9.2:rework example 9.1 by using the signed-rank test. 1. ?0: �̃�0="" to="" be="" significant="" at="" the="" 0.05="" level.="" example="" 9.2:rework="" example="" 9.1="" by="" using="" the="" signed-rank="" test.="" 1.=""> �̃�0 to be significant at the 0.05 level. example 9.2:rework example 9.1 by using the signed-rank test. 1. ?0:>�̃�)>30>