1 / 33

Wilcoxon rank sum test or the Mann-Whitney U test

It is one of the best-known non-parametric significance tests. It was proposed initially by Wilcoxon (1945), for equal sample sizes, and extended to arbitrary sample sizes and in other ways by Mann and Whitney (1947). MWW is virtually identical in performing an ordinary parametric two-sample t tes

louis
Télécharger la présentation

Wilcoxon rank sum test or the Mann-Whitney U test

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. Wilcoxon rank sum test (or the Mann-Whitney U test) In statistics, the Mann-Whitney U test (also called the Mann-Whitney-Wilcoxon (MWW), Wilcoxon rank-sum test, or Wilcoxon-Mann-Whitney test) is a non-parametric test for assessing whether two samples of observations come from the same distribution. It requires the two samples to be independent, and the observations to be ordinal or continuous measurements, i.e. one can at least say, of any two observations, which is the greater.

    2. It is one of the best-known non-parametric significance tests. It was proposed initially by Wilcoxon (1945), for equal sample sizes, and extended to arbitrary sample sizes and in other ways by Mann and Whitney (1947). MWW is virtually identical in performing an ordinary parametric two-sample t test on the data after ranking over the combined samples.

    3. Here, we do NOT have paired data, but rather n1 values from group 1 and n2 values from group 2. Assumptions: Independence within and between groups, same distributions in both groups We want to test whether the values in the groups are samples from different distributions.

    4. A- For small sample size n< 20 : -Rank in an ascending order all values for the two groups together as if they were from the same group. *If ANY OF THE VALUES ARE EQUAL AVARAGE THEIR RANKS. -Let T be the sum of the ranks of the values from group hasing smaller sum of ranks . Under the assumption that the values come from the same distribution, the distribution of T is known. The expectation and variance under the null hypothesis are simple functions of n1 (smaller sample size )and n2.

    5. -The calculated T value represents the lower limit of the range of all tested values. Where the sum of ranks in the large sample size group is the upper limit. -By comparing the calculated T with the tabulated one at n1,n2 values, we can predict the value of P and the range of significance. (table A8) -If the calculated T < tabulated or P < tabulated the difference is significant.

    6. Wilcoxon Rank Sum Test Example Youre a production planner. You want to see if the operating rates for 2 factories is the same. For factory 1, the rates (% of capacity) are 71, 82, 77, 92, 88. For factory 2, the rates are 85, 82, 94 & 97. Do the factory rates have the same probability distributions at the 0.10 level?

    7. Wilcoxon Rank Sum Test Solution H0: Identical Distrib. Ha: Shifted Left or Right ? = n1 = n2 = Critical Value(s):

    8. Wilcoxon Rank Sum Test Computation Table

    9. Wilcoxon Rank Sum Table (Portion)

    10. Wilcoxon Rank Sum Test Solution H0: Identical Distrib. Ha: Shifted Left or Right ? = .10 n1 = 4 n2 = 5 Critical Value(s):

    11. Since the sum of ranks from the largest sample size is the upper limit (19.5) is smaller than tabulated value the difference us significant. Ex 2 : In medical statistics P.347

    12. Mann-Whitney test assumptions are as follows : 1-The two samples of size n and m are independent 2-The measurement scale is at least ordinal. 3-The variable of interest is continuous. 4-Populations difference is with respect to their median. H0: if M1=M2 HA: M1>M2 OR M1<M2----------- One sided test M1 does not equal M2-----Two sided test

    13. Procedure -The observations in both groups are arranged and ranked in a descending manner as before. -The smaller sum of ranks (S) in n group is calculated. -T value is calculated from the following formula: T=S-n(n+1)/2

    14. Example

    15. T=16- 5(5+1)/2 = 1 Form a special table (L table ) we can find tabulated T at specified P value. Through n and m values. (n is n1 .; m is n2) -If the calculated T < or = tabulated T OR if the calculated T at P value < or = the specified P the difference is significant. - Tabulated T at p=.05 is 3 T = 1 at is at p =.01 So, In this example H0 is rejected and the difference is significant.

    16. B- For large samples n or m >20 The normal approximation is applied : Z = T m n / 2 sq.root (nm (n + m +1)/ 12 The calculated Z value is compared with the tabulated one in normal distribution table at the specified P value . *Smaller p is a significant difference. Ex : in handout P;679

    17. MethodII (the modified Wilcoxon-Mann-Whitney test) Depends upon the calculation of a measure known as U which for either sample is equal to the difference between the maximum possible value of T for the sample versus the actually observed T value . Thus for sampleA it would be : UA= TA [max] TA = n a n b +na (na+1) / 2 TA and for sampleB : UB= TB[max] TB = na nb +nb(nb+1) /2 TB

    18. TA =the sum of the na ranks in groupA TB =the sum of the nb ranks in groupB TA [max]= na nb +na(na+1) / 2 TB [max]= na nb +nb(nb+1) / 2

    19. Example Twenty-one persons seeking treatment for claustrophobia are independently and randomly sorted into two groups, the first of size na=11 and the second of sizenb=10. The members of the first group each individually receive TreatmentA over a period of 15weeks, while those of the second group receive TreatmentB. The investigators' directional hypothesis is that TreatmentA will prove the more effective

    20. At the end of the experimental treatment period, the subjects are individually placed in a series of claustrophobia test situations, knowing that their reactions to these situations are being recorded on videotape. Subsequently three clinical experts, uninvolved in the experimental treatment and not knowing which subject received which treatment, independently view the videotapes and rate each subject according to the degree of claustrophobic tendency shown in the test situations. Each judge's rating takes place along a 10-point scale, with 1="very low" and 10="very high"; and the final measure for each subject is the simple average of the ratings of the three judges for that subject.

    21. The following table shows the average ratings for each subject in each of the two groups.

    23. It begins by assembling the measures from samplesA andB into a single set of size N=na +nb. These measures are then rank-ordered from lowest (rank#1) to highest (rank#N), with tied ranks included where appropriate. For the present set of data, this process would yield the following result.

    24. Raw rank from sample measure

    25. Our final bit of mechanics is just a dab of symbolic notation. TA =the sum of the na ranks in groupA TB =the sum of the nb ranks in groupB TA [max]= nanb +na(na+1) / 2 TB [max]= nanb +nb(nb+1) / 2

    26. For the present example: TA =96.5[with n a =11] TB =134.5[with n b =10] TA [max]= (11)(10) +11(12) / 2=176 TB [max]= (11)(10) +10(11) / 2=165 UA=17696.5=79.5 or UB=165134.5=30.5

    27. UA and UB are assigned as the upper and lower limits of the observed U value . N/B : The group hasing larger n is the A group and its U represents the upper limit. By comparing the critical values of observed UA and UB at na and nb with the tabulated intervals we can conclude that :

    28. ** If the calculated U is deviated from the tabulated U (if UB is smaller and / or UA is larger ) , the difference is significant and vice versa. **We may also find the level of significance P that match the calculated U intervals - To be significant difference P calculated has to be < or = to the tabulated P value. For one or two tailed tests.

    29. In our example ,the tabulated intervals for U were 31 , 79 at na =11 , nb=10 at p=0.05 ( for directional test ) . The calculated U intervals were 30.5,79.5 which will be at P < 0.05 . So, treatment A will significantly improve claustrophobia than treatment B

    30. Test for approximation can be done as follows : -If want to measure approximation to normal distribution at P = 0.05 Z= Tobs - UT 0.05 o T Tobs as the observed value of either TA or TB UT as the the mean of the corresponding sampling distribution ofT o T as the standard deviation of that sampling distribution

    31. correction for continuity: .5 when Tobs>T +.5 when Tobs<T o T = sqrt [nanb(N+1) / 12] N= total sum of ranks in A and B

    32. In our example : -The observed value of TA=96.5 belongs to a sampling distribution whose mean is equal to 121 where UTA =n a (N+1) / 2 = 11(21+1) /2 =121 -The observed value of TB=134.5 belongs to a sampling distribution whose mean is equal to110 UTB =n b (N+1) / 2 = 10 (21+1) /2 =110 o T = sqrt [10x11(21+1) / 12] = 14.2

    33. ZA= (96.5-121)+0.05 = -24 = -1.69 14.2 ZB= (134.5-110)-0.05 = +24 = +1.69 14.2 14.2 So, the CI of calculated Z are -1.69 These values are compared with tabulated ones at P =0.05 for directional test.

    34. If calculated critical z values > or = tabulated the null hypothesis is not true and there is no approximation because P value will be < tabulated . In our example: The tabulated CI for z at 0.05 are 1.645 and matches a P value =0. 0455 So , Treatment A is more potent than B

More Related