Ch10.wilcoxon Rank-Sum Test

时间:2025-04-23

Wilcoxon秩和检验教程

1

The Wilcoxon Rank-Sum Test The Wilcoxon rank-sum test is a nonparametric alternative to the two-sample t -test which is based solely on the order in which the observations from the two samples fall.We will use the following as a running example.Example 1In a genetic inheritance study discussed by Margolin [1988],samples of individuals from several ethnic groups were taken.Blood samples were collected from each individual and several variables measured.For a detailed discussion of the study and a definition of the variable,see Exer-cises 10.1.3in the text.We shall compare the groups labeled “Native Amer-ican”and “Caucasian”with respect to the variable MSCE (mean sister chro-matid exchange).The data is as follows:

Native American:8.509.488.658.168.837.768.63Caucasian:8.278.208.258.149.008.107.208.32

7.707.58.0

8.59.09.5Native American

Caucasian

Figure 1:Comparing MSCE measurements.

Looking at the dot plots for the two groups,several questions come to mind.Firstly,do the data come from Normal distributions?Unfortunately we can’t say much about the distributions as the samples are too small.However there does not seem to be any clear lack of symmetry.Secondly,are the two distributions similar in shape?Again it is hard to say much with such small samples,though the Caucasian data seems to have longer tails.Finally,is there any difference in the centers of location?The plots suggest a difference with Native American values being larger on average.We shall now put this type of problem in a more general context and come back to this example later.

Suppose,more generally,that we have samples of observations from each of two populations A and B containing n A and n B observations respectively.We wish to test the hypothesis that the distribution of X -measurements in population A is the same as that in B ,which we will write symbolically as H 0:A =B .The departures from H 0that the Wilcoxon test tries to detect are location shifts.If we expect to detect that the distribution of A is shifted to the right of distribution B as in Fig.2(b),we will write this as H 1:A >B .The other two possibilities are H 1:A <B (A is shifted to the left of B ),and the two sided-alternative,which we will write as H 1:A =B ,for situations in which we have no strong prior reason for expecting a shift in a particular direction.by Chris Wild, University of Auckland

Wilcoxon秩和检验教程

2

Figure2:Illustration of H0:A=B versus H1:A>B.

The Wilcoxon test is based upon ranking the n A+n B observations of the combined sample.Each observation has a rank:the smallest has rank1,the 2nd smallest rank2,and so on.The Wilcoxon rank-sum test statistic is the sum of the ranks for observations from one of the samples.Let us use sample

A here and use w A to denote the observed rank sum and W A to represent the

corresponding random variable.

w A=sum of the ranks for observations from A.

Example1cont.We have sorted the combined data set into ascending or-der and used vertical displacement as well as ethnic group labels to make very clear which sample an observation comes from(“NA”for the Native American group and“Ca”for the Caucasian group).The rank of an observation in the combined sample appears immediately below the label.

7.768.168.508.638.658.839.48

7.207.708.108.148.208.258.278.329.00

Race Ca Ca NA Ca Ca NA Ca Ca Ca Ca NA NA NA NA Ca NA Rank:12345678910111213141516 The sum of the ranks for the Native American group is

=3+6+11+12+13+14+16=75.

w

NA

How do we obtain the P-value corresponding to the rank-sum test statistic w A?To answer this question we mustfirst consider how rank sums behave under H0,and how they behave under H1.Fig.3depicts two situations using samples of size n A=n B=5and plotting sample A observations with a“•”

and sample B observations with an“o”.

Suppose that H0:A=B is true.In this case,all n=n A+n B observations are being drawn from the same distribution and we might expect behavior somewhat like Fig.3(a)in which the pattern of black and white circles is random.The set of ranks for n observations are the numbers1,2,...,n.

Wilcoxon秩和检验教程

3

When n A of our n observations from a distribution are labeled A and n B observations from the same distribution are labeled B,then as far as the behavior of the ranks(and thus w A)is concerned,it is just as if we randomly labeled n A of the numbers1,2,...,n with A’s and the rest with B’s.The distribution of a rank sum,W A,under such conditions has been worked out and computer programs and sets of Tables are available for this distribution.

•o o•o••o•o o o o o•o••••

Rank1234567891012345678910

(a)(b)

Figure3:Behaviour of ranks.

Suppose that H1:A>B is true:In this case we would expect behavior more like that in Fig.3(b)which results in sample A containing more of the larger ranks.Evidence against H0which confirms H1:A>B is thus provided by an observed rank sum w A which is unusually large according to the distribution

of rank sums when H0is true.Thus the P-value for the test is

(H1:A>B)P-value=pr(W A≥w A),

where the probability is calculated using the distribution that W A would have

if H0was true.Suppose,on the other hand,that the alternative H1:A<B

is true.In this case we would expect the A observations to tend to be smaller than the B observations,resulting in a small rank sum w A.The P-value for the alternative H1:A<B is therefore

(H1:A<B)P-value=pr(W A≤w A).

Note that in testing one-sided alternatives,the direction of the inequality used in the calculation of the P-value is the same as the direction defining the alternative,e.g.A>B and W A≥w A.

For the two-sided test,i.e. …… 此处隐藏:16030字,全部文档内容请下载后查看。喜欢就下载吧 ……

Ch10.wilcoxon Rank-Sum Test.doc 将本文的Word文档下载到电脑

    精彩图片

    热门精选

    大家正在看

    × 游客快捷下载通道(下载后可以自由复制和排版)

    限时特价:7 元/份 原价:20元

    支付方式:

    开通VIP包月会员 特价:29元/月

    注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
    微信:fanwen365 QQ:370150219