Example: tourism industry

Statistics: 2.3 The Mann-Whitney U Test - statstutor

Statistics: The Mann-Whitney U TestRosie Shier. IntroductionThe Mann-Whitney U test is a non-parametric test that can be used in place of anunpaired t-test. It is used to test the null hypothesis that two samples come from thesame population ( have the same median) or, alternatively, whether observations in onesample tend to be larger than observations in the other. Although it is a non-parametrictest it does assume that the two distributions are similar in Carrying out the Mann-Whitney U testSuppose we have a sample ofnxobservations{x1, x2, .. xn}in one group ( from onepopulation) and a sample ofnyobservations{y1, y2, .. yn}in another group ( fromanother population).The Mann-Whitney test is based on a comparison of every observationxiin the firstsample with every observationyjin the other sample.

The exact test and the normal approximation give similar results. We would conclude ... 3 Carrying out the Mann-Whitney U test in SPSS — Choose Analyze — Select Nonparametric Tests — Select 2 Independent Samples — Highlight your test variable (in our example this would be age) and click on the arrow

Tags:

  Tests, Spss, Exact

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Statistics: 2.3 The Mann-Whitney U Test - statstutor

1 Statistics: The Mann-Whitney U TestRosie Shier. IntroductionThe Mann-Whitney U test is a non-parametric test that can be used in place of anunpaired t-test. It is used to test the null hypothesis that two samples come from thesame population ( have the same median) or, alternatively, whether observations in onesample tend to be larger than observations in the other. Although it is a non-parametrictest it does assume that the two distributions are similar in Carrying out the Mann-Whitney U testSuppose we have a sample ofnxobservations{x1, x2, .. xn}in one group ( from onepopulation) and a sample ofnyobservations{y1, y2, .. yn}in another group ( fromanother population).The Mann-Whitney test is based on a comparison of every observationxiin the firstsample with every observationyjin the other sample.

2 The total number of pairwisecomparisons that can be made the samples have the same median then eachxihas an equal chance ( probability12) of being greater or smaller than , under the null hypothesisH0:P(xi> yj) =12and under the alternative hypothesisH1:P(xi> yj)6=12We count the number of times anxifrom sample 1 is greater than ayjfrom sample number is denoted byUx. Similarly, the number of times anxifrom sample 1 issmaller than ayjfrom sample 2 is denoted byUy. Under the null hypothesis we wouldexpectUxandUyto be approximately for carrying out the test:1. Arrange allthe observations in order of Under each observation, write downXorY(or some other relevant symbol) toindicate which sample they are Under eachxwrite down the number ofys which are to the left of it ( smallerthan it); this indicatesxi> yj.

3 Under eachywrite down the number ofxs whichare to the left of it ( smaller than it); this indicatesyj> xi14. Add up the total number of timesxi> yj denote byUx. Add up the total numberof timesyj> xi denote byUy. Check thatUx+Uy= CalculateU=min(Ux, Uy)6. Use statistical tables for the Mann-Whitney U test to find the probability of ob-serving a value ofUor lower. If the test is one-sided, this is your p-value; if the testis a two-sided test, double this probabililty to obtain the : If the number of observations is such thatnxnyis large enough (>20), a normalapproximation can be used with U=nxny2, U= nxny(N+ 1)12, whereN=nx+ with ties: It is possible that two or more observations nay be the same. If thisis the case we can still calculateUby allocating half the tie to theXvalue and half thetie to theYvalue.

4 However, if this is the case then the normal approximation must beused with an adjustment to the standard deviation. This becomes: U= nxnyN(N 1) N3 N12 g j=1t3j tj12 whereN=nx+nyg= the number of groups of tiestj= the number of tied ranks in group jNote that the Mann-Whitney U test is statistically equivalent to the Wilcoxon rank sum test(not to be confused with the Wilcoxonsignedrank sum test, which is for paired data).Example:The following data shows the age at diagnosis of type II diabetes in young adults. Is theage at diagnosis different for males and females?Males: 19 22 16 29 24 Females: 20 11 17 12 Solution:1. Arrange in order of magnitudeAge11 12 16 17 19 20 22 24 29M/FF F M F M F M M MM > F234 4 4F > M0 0122. Affix M or F to each observation (see above).

5 3. Under each M write the number of Fs to the left of it; under each F write thenumber of Ms to the left of it (see above). 2 + 3 + 4 + 4 + 4 = 17UF= 0 + 0 + 1 + 2 = (UM, UF) = 36. Using tables for the Mann-Whitney U test we get a two-sided p-value ofp= If we use a normal approximation we get:z=U nxny2 nxny(N+ 1)12=3 10 50/3= This gives a two-sided p-value ofp= exact test and the normal approximation give similar results. We would concludethat there is no real evidence that the age at diagnosis is different for males and females,although the results are borderline and the lack of statistical significance in this case mayjust be due to the very small sample. The actual median age at diagnosis is yearsfor females and 22 for males, which is quite a substantial difference.

6 In this case it wouldbe advisable to conduct a larger Carrying out the Mann-Whitney U test in spss ChooseAnalyze SelectNonparametric tests Select2 Independent Samples Highlight your test variable (in our example this would be age) and click on the arrowto move this into theTest Variable Listbox Highlight the grouping variable and click on the arrow to move this into theGroupingVariablebox. Click onDefine Groupsand type in the codes that indicate which group an obser-vation belongs to (in our example, the codes which indicate whether a subject is male orfemale). Click onContinue UnderTest Typemake sure thatMann-Whitney Uis selected If you want exact probabilities, click onExact, chooseExact, thenContinue Click onOKThe output will look like this:RanksSexNMean RankSum of RanksAge StatisticsAgeMann-Whitney Sig.

7 (2-tailed) Sig. [2*(1-tailed Sig.)] Sig. (2-tailed) Sig. (1-tailed) are interested in the exact p-value ( exact Sig (2-tailed) ) and the p-value basedon the normal approximation ( Asymp Sig (2-tailed ). If the normal approximation isappropriate then these should be roughly)


Related search queries