Mann-Whitney U

Mann-Whitney U

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. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. 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. In a less general formulation, the Wilcoxon-Mann-Whitney two-sample test may be thought of as testing the null hypothesis that the probability of an observation from one population exceeding an observation from the second population is 0.5. This formulation requires the additional assumption that the distributions of the two populations are identical except for possibly a shift (i.e. f_1(x)=f_2(x+delta)). Another alternative interpretation is that the test assesses whether the Hodges-Lehmann estimate of the difference in central tendency between the two populations is zero. The Hodges-Lehmann estimate for this two-sample problem is the median of all possible differences between an observation in the first sample and an observation in the second sample. It is commonly thought that the MWW test tests for differences in medians but this is not strictly true.

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 to performing an ordinary parametric two-sample "t" test on the data after ranking over the combined samples.

Calculations

The test involves the calculation of a statistic, usually called "U", whose distribution under the null hypothesis is known. In the case of small samples, the distribution is tabulated, but for sample sizes above ~20 there is a good approximation using the normal distribution. Some books tabulate statistics equivalent to "U", such as the sum of ranks in one of the samples.

The "U" test is included in most modern statistical packages. It is also easily calculated by hand, especially for small samples. There are two ways of doing this.

For small samples a direct method is recommended. It is very quick, and gives an insight into the meaning of the "U" statistic.
# Choose the sample for which the ranks seem to be smaller (The only reason to do this is to make computation easier). Call this "sample 1," and call the other sample "sample 2."
# Taking each observation in sample 2, count the number of observations in sample 1 that are smaller than it (count a half for any that are equal to it).
# The total of these counts is "U".

For larger samples, a formula can be used:
# Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they are in.
# Add up the ranks for the observations which came from sample 1. The sum of ranks in sample 2 follows by calculation, since the sum of all the ranks equals "N"("N" + 1)/2 where "N" is the total number of observations.
# "U" is then given by:

:::U_1=R_1 - {n_1(n_1+1) over 2} ,!

::where "n"1 is the two sample size for sample 1, and "R"1 is the sum of the ranks in sample 1.

::Note that there is no specification as to which sample is considered sample 1. An equally valid formula for "U" is:::U_2=R_2 - {n_2(n_2+1) over 2}. ,!

::The smaller value of "U"1 and "U"2 is the one used when consulting significance tables. The sum of the two values is given by:::U_1 + U_2 = R_1 - {n_1(n_1+1) over 2} + R_2 - {n_2(n_2+1) over 2}. ,!

:: Knowing that "R"1 + "R"2 = "N"("N" + 1)/2 and "N" = "n"1 + "n"2 , and doing some algebra, we find that the sum is:::U_1 + U_2 = n_1 n_2. ,!

The maximum value of "U" is the product of the sample sizes for the two samples. In such a case, the "other" "U" would be 0.

Example

Suppose that Aesop is dissatisfied with his classic experiment in which one tortoise was found to beat one hare in a race, and decides to carry out a significance test to discover whether the results could be extended to tortoises and hares in general. He collects a sample of 6 tortoises and 6 hares, and makes them all run his race. The order in which they reach the finishing post (their rank order) is as follows, writing T for a tortoise and H for a hare::T H H H H H T T T T T HWhat is the value of "U"?
* Using the direct method, we take each tortoise in turn, and count the number of hares it beats, getting 6, 1, 1, 1, 1, 1. So "U" = 6 + 1 + 1 + 1 + 1 + 1 = 11. Alternatively, we could take each hare in turn, and count the number of tortoises it beats. In this case, we get 5, 5, 5, 5, 5, 0, which means "U" = 25. Note that the sum of these two values for "U" is 36, which is 6 × 6.
* Using the indirect method::: the sum of the ranks achieved by the tortoises is 1 + 7 + 8 + 9 + 10 + 11 = 46.:: Therefore "U" = 46 − 6×7/2 = 46 − 21 = 25.:: the sum of the ranks achieved by the hares is 2 + 3 + 4 + 5 + 6 + 12 = 32, leading to "U" = 32 - 21 = 11.

Approximation

For large samples, the normal approximation:

:z=(U-m_U)/sigma_{U},!

can be used, where "z" is a standard normal deviate whose significance can be checked in tables of the normal distribution. "m""U" and σ"U" are the mean and standard deviation of "U" if the null hypothesis is true, and are given by

:m_U=n_1 cdot n_2 /2.,!

:sigma_U=sqrt{n_1 n_2 (n_1+n_2+1) over 12}.,!

All the formulae here are made more complicated in the presence of tied ranks, but if the number of these is small (and especially if there are no large tie bands) these can be ignored when doing calculations by hand. The computer statistical packages will use them as a matter of routine.

Note that since "U"1 + "U"2 = "n"1 "n"2, the mean "n"1 "n"2/2 used in the normal approximation is the mean of the two values of "U". Therefore, you can use "U" and get the same result, the only difference being between a left-tailed test and a right-tailed test.

Relation to other tests

Comparison to Student's t-test

The "U" test is useful in the same situations as the independent samples Student's "t"-test, and the question arises of which should be preferred. ;Ordinal data: "U" remains the logical choice when the data are ordinal but not interval scaled, so that the spacing between adjacent values cannot be assumed to be constant.;Robustness: It is much less likely than the "t" test to give a spuriously significant result because of one or two outliers–it is more robust.;Efficiency: When normality holds, "MWW" has an (asymptotic) Pitman efficiency of 3/pi or about 0.95 when compared to the "t" testFact|date=September 2008. For distributions sufficiently far from normal and for sufficiently large sample sizes, the "MWW" can be considerably more efficient than the "t"W. J. Conover, Practical Nonparametric statistics, 2nd Edition 1980 John Wiley & Sons, pp. 225-226] .

Overall, the robustness makes the "MWW" more widely applicable than the "t" test, and for large samples from the normal distribution, the efficiency loss compared to the "t" test is only 5%, so one can recommend "MWW" as the default test for comparing interval or ordinal measurements "with similar distributions".

The relation between efficiency and power in concrete situations isn't trivial though. For small sample sizes one should investigate the power of the "MWW" vs "t".

Different distributions

The "U" test should "not" be used when the distributions of the two samples are very different, as it can give erroneously significant results.

On the other hand, the "U" test is often recommended for situations where the distributions of the two samples are very different. This is an error: it tests whether the two samples come from a common distribution, and Monte Carlo methods have shown that it is capable of giving erroneously significant results in some situations where samples are drawn from distributions with the same mean and different variances.

Alternatives

In that situation, the unequal variances version of the "t" test is likely to give more reliable results, "if normality holds."

Alternatively, some authors (e.g. Conover) suggest transforming the data to ranks (if they are not already ranks) and then performing the "t" test on the transformed data, the version of the "t" test used depending on whether or not the population variances are suspected to be different.

The Brown-Forsythe test has been suggested as an appropriate non-parametric equivalent to the F test for equal variances.

Kendall's τ

The "U" test is related to a number of other non-parametric statistical procedures. For example, it is equivalent to Kendall's τ correlation coefficient if one of the variables is binary (that is, it can only take two values).

ρ statistic

A statistic called ρ that is linearly related to "U" and widely used in studies of categorization (discrimination learning involving concepts) is calculated by dividing "U" by its maximum value for the given sample sizes, which is simply "n"1 × "n"2. ρ is thus a non-parametric measure of the overlap between two distributions; it can take values between 0 and 1, and it is an estimate of scriptstyle P(Y > X) + 0.5 P(Y = X), where "X" and "Y" are randomly chosen observations from the two distributions. Both extreme values represent complete separation of the distributions, while a ρ of 0.5 represents complete overlap. This statistic was first proposed by Richard Herrnstein (see Herrnstein et al, 1976) ρ is also known as the area under the receiver operating characteristic (ROC) curve.

Example statement of results

Outcomes of the two treatments were compared using the Wilcoxon-Mann-Whitney two-sample rank-sum test.The treatment effect (difference between treatments) was quantified using the Hodges-Lehmann (HL) estimator, which is consistent with the Wilcoxon test (ref. 5 below). This estimator (HLΔ) is the median of all possible differences in outcomes between a subject in group B and a subject in group A. A non-parametric 0.95 confidence interval for HLΔ accompanies these estimates as does ρ, an estimate of the probability that a randomly chosen subject from population B has a higher weight than a randomly chosen subject from population A.

The median [quartiles] weight for subjects on treatment A and B respectively are 147 [121, 177] and 151 [130, 180] pounds. Treatment A decreased weight by HLΔ = 5 lbs. (0.95 CL [2, 9] lbs., 2"P" = 0.02, ρ = 0.58).

ee also

*Table of Critical Values ( [http://www.stat.auckland.ac.nz/~wild/ChanceEnc/Ch10.wilcoxon.pdf pdf] ), page 9
*Wilcoxon signed-rank test
*Kruskal-Wallis one-way analysis of variance

References

* Conover, W. J. (1980). "Practical Nonparametric Statistics" (3rd Ed.)
* Herrnstein, R. J., Loveland, D. H., & Cable, C. (1976). Natural concepts in pigeons. "Journal of Experimental Psychology: Animal Behavior Processes, 2", 285-302.
* Hollander, M. and Wolfe, D. A. (1999). "Nonparametric Statistical Methods" (2nd Ed.).
* Lehmann, E. L. (1975). "NONPARAMETRICS: Statistical Methods Based On Ranks".
* Mann, H. B., & Whitney, D. R. (1947). "On a test of whether one of two random variables is stochastically larger than the other". "Annals of Mathematical Statistics, 18", 50-60.
* Wilcoxon, F. (1945). "Individual comparisons by ranking methods". "Biometrics Bulletin, 1", 80-83.

Implementations

* [http://faculty.vassar.edu/lowry/utest.html Online implementation] using javascript
* [http://www.alglib.net/statistics/hypothesistesting/mannwhitneyu.php ALGLIB] includes implementation of the Mann-Whitney U test in C++, C#, Delphi, Visual Basic, etc.
* R includes an implementation of the test (there referred to as the Wilcoxon two-sample test) as wilcox.test.
* Analyse-it


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Mann–Whitney U — In statistics, the Mann–Whitney U test (also called the Mann–Whitney–Wilcoxon (MWW) or Wilcoxon rank sum test) is a non parametric statistical hypothesis test for assessing whether one of two samples of independent observations tends to have… …   Wikipedia

  • Mann-Whitney — Der Mann Whitney Test ( Mann Whitney U Test oder kurz U Test ) ist ein parameterfreier statistischer Test. Der U Test ist ein Homogenitätstest. Er dient zur Überprüfung der Signifikanz der Übereinstimmung zweier Verteilungen, also ob zwei… …   Deutsch Wikipedia

  • Mann-Whitney test — Mann Whitney U test, Mann Whitney Wilcoxon test rank sum t …   Medical dictionary

  • Mann-Whitney-Test — Der Mann Whitney Test ( Mann Whitney U Test oder kurz U Test ) ist ein parameterfreier statistischer Test. Der U Test ist ein Homogenitätstest. Er dient zur Überprüfung der Signifikanz der Übereinstimmung zweier Verteilungen, also ob zwei… …   Deutsch Wikipedia

  • Mann-Whitney-U-Test — Der Mann Whitney Test ( Mann Whitney U Test oder kurz U Test ) ist ein parameterfreier statistischer Test. Der U Test ist ein Homogenitätstest. Er dient zur Überprüfung der Signifikanz der Übereinstimmung zweier Verteilungen, also ob zwei… …   Deutsch Wikipedia

  • Mann-Whitney test — Mann Whit·ney test (manґ hwitґne) [Henry Berthold Mann, Austrian born American mathematician, 1905–2000; Donald Ransom Whitney, American statistician, 1915–2007] rank sum test; see under test …   Medical dictionary

  • Mann–Whitney — …   Useful english dictionary

  • Wilcoxon-Mann-Whitney-Test — Der Wilcoxon Mann Whitney Test (auch: „Mann Whitney U Test“, „U Test“,„Wilcoxon Rangsummentest“) ist ein parameterfreier statistischer Test. Der U Test ist ein Homogenitätstest. Er dient zur Überprüfung der Signifikanz der Übereinstimmung zweier… …   Deutsch Wikipedia

  • Prueba U de Mann-Whitney — En estadística la prueba U de Mann Whitney (también llamada de Mann Whitney Wilcoxon, prueba de suma de rangos Wilcoxon, o prueba de Wilcoxon Mann Whitney) es una prueba no paramétrica aplicada a dos muestras independientes. Es, de hecho, la… …   Wikipedia Español

  • Mann-Whitney U test — see significance …   Medical dictionary

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”