Download presentation
Presentation is loading. Please wait.
1
Lecture 15 Wilcoxon Tests
Outline of Today Wilcoxon Signed Test for Median Wilcoxon Signed Test for Paired Experiment 11/22/2018 SA3202, Lecture 15
2
Wilcoxon’s Signed Rank Test for the Median
Wilcoxon’s signed rank test is a more powerful alternative to the sign test ( for testing the median or comparing two related distributions). The problem Given a sample X1, X2, …, Xn ~F, continuous and symmetric, consider testing the hypothesis H0: =a (the median is a). For sign test, let Di=Xi-a, i=1,2,…,n. Note that the sign test is based on only the signs of these differences, but not their magnitudes. The Wilcoxon Signed Rank Test takes both the signs and magnitudes of the differences di into account ( but requires an extra assumption of symmetry). 11/22/2018 SA3202, Lecture 15
3
Step 2 We rank the absolute values of the difference |Xi-a|. Let
Procedure Step 1 As with the sign test, we ignore zero differences, and adjust the sample size accordingly. In what follows, n is really just the adjust sample size. Step 2 We rank the absolute values of the difference |Xi-a|. Let Sp=Sum of ranks for Positive differences Sm=Sum of ranks for Negative differences 11/22/2018 SA3202, Lecture 15
4
Sp+Sm=Sum of all the ranks=
Null Distribution Due to symmetry, under H0, Sp and Sm have the same distribution: Sp+Sm=Sum of all the ranks= E(Sp)=E(Sm)= When H0 is true, we expect Sp and Sm to be about n(n+1)/4, whereas H0 is false, one of them, depending on the H1, tends to be smaller than n(n+1)/4. Thus, we may use Sp or Sm as test statistic 11/22/2018 SA3202, Lecture 15
5
Pr(Sp <=T0)=Pr(Sp>=n(n+1)/2-T0)
Remarks Remark 1 When the critical table just gives the lower quantiles of the distribution Sp or Sm, the upper quantiles may be found using symmetry: Under H0, Sp and Sm have the same symmetric distributions, with mean n(n+1)/4 Pr(Sp <=T0)=Pr(Sp>=n(n+1)/2-T0) Pr(Sm<=T0)=Pr(Sm>=n(n+1)/2-T0) Remark 2 The problem of finding the upper quantiles may be avoided by using the following procedure: 1. For H1: >a, reject H0 when Sm is too small 2. For H1: <a, reject H0 when Sp is too small 3. For H1: a, reject H0 when either Sp or Sm is too small 11/22/2018 SA3202, Lecture 15
6
E(Sp)=n(n+1)/4, Var(Sp)=n(n+1)(2n+1)/24 So Sp+.5- n(n+1)/4
Large Sample Test For large sample sizes (n>=25), we use normal approximation: Under H0, Sp (or Sm) is asymptotically normal with E(Sp)=n(n+1)/4, Var(Sp)=n(n+1)(2n+1)/24 So Sp+.5- n(n+1)/4 ~AN(0,1) {n(n+1)(2n+1)/24}^(1/2) 11/22/2018 SA3202, Lecture 15
7
Wilcoxon’s Signed Rank Test for a Paired Experiment
Suppose that we have n pairs of observations of the form (Xi, Yi) and that we wish to test H0: X~Y against H1: X~Y+theta As before, we use the difference Di=Xi-Yi, i=1,2,…,n. Under H0, the distribution of Di is symmetric about 0. The procedure is then to rank the absolute values of these differences and use the statistics: Sp=Sum of ranks for Positive differences Sm=Sum of ranks for Negative differences For H1: theta>0, we reject H0 when Sm is too small theta<0, we reject H0 when Sp is too small theta 0, we reject H0 when either Sp or Sm is too small 11/22/2018 SA3202, Lecture 15
8
Example The following table shows the density of six pairs of cakes, using two different mixes A and B. We wish to test H0: there is no difference between A and B against a two-sided alternative A B A-B Rank We then have Sm=18, Sp=3. For a two-sided test of size 10%, the critical region is min(Sp,Sm)<=2. Thus, H0 is not rejected. 11/22/2018 SA3202, Lecture 15
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.