- Introduced by
- H. B. Mann & D. R. Whitney
- Year
- 1947
- Type
- Nonparametric two-group comparison
What does it do?
The Mann-Whitney U test is the nonparametric alternative to the independent samples t-test, comparing two independent groups by ranking all observations together rather than relying on their means.
It was introduced by H. B. Mann and D. R. Whitney in 1947 and does not require the data to be normally distributed.
The intuition behind the method
Sometimes your outcome is ordinal, skewed, or measured on a small sample, so comparing averages is unsafe. Instead of working with raw values, the test pools both groups, ranks every observation from smallest to largest, and asks whether one group tends to sit higher in the combined ranking. If the two groups were truly alike, their ranks would be intermingled; if one group's values are stochastically larger, its ranks cluster toward the top.
History
H. B. Mann and D. R. Whitney published the test in 1947 as a procedure for testing whether one of two random variables is stochastically larger than the other, under continuous distribution functions. The paper's abstract notes that Wilcoxon had proposed an equivalent test in 1945, though he gave only a few points of its distribution. This shared origin is why the test is also known as the Wilcoxon rank-sum test.
When to use it
Choose this test to compare exactly two independent groups when the outcome is at least ordinal and normality cannot be assumed, for example skewed continuous measurements, Likert-type ratings, or small samples where the t-test's assumptions are doubtful. Observations must be independent of one another. The original paper tabulated the exact distribution of U for samples up to 8 in each group; at that size the distribution is already nearly normal, while smaller samples are better handled with an exact or permutation test. Do not use it for paired or repeated measurements, where the Wilcoxon signed-rank test applies, or for more than two groups, where Kruskal-Wallis is the related rank-based option. If the question is specifically about means and the t-test's assumptions hold, the t-test answers that question more directly.
Limitations and considerations
- Reading the result as a difference in medians requires the two groups to have similar distribution shapes; otherwise the test reflects a general stochastic difference between the groups.
- The normal approximation to U is unreliable for very small samples, so the p-value should be treated with caution in that case.
- Compares exactly two independent groups; it cannot be applied directly to paired or repeated measurements or to three or more groups.
- The test is derived for continuous distributions, so heavily tied values reduce the information carried by the ranks; they require midranks and a tie-corrected approximation for the p-value.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Rank-based, so no normality assumption is needed and an extreme raw value contributes only its rank, which limits the influence of outliers.
- Because only the ordering of observations enters the statistic, the result does not change under any strictly monotone transformation of the outcome.
- Applicable to ordinal outcomes such as Likert-type responses, where a difference in group means is not a meaningful quantity.
Applications
- Comparing a skewed continuous outcome between a treatment and a control group when normality is doubtful.
- Comparing ordinal ratings, such as Likert-scale responses, between two independent groups.
- Comparing small-sample biomedical or behavioural measurements where the t-test's assumptions are questionable.
- Comparing count or score data between two independent cohorts without assuming a particular distribution.
How it works
How it works
Under the null hypothesis a randomly drawn value from one group is equally likely to exceed a value from the other group, so neither group is stochastically larger. The alternative states that one group tends to produce larger values than the other.
Formula
H_0:\ P(X>Y)=P(Y>X) \quad H_1:\ P(X>Y)\neq P(Y>X)
All observations from both groups are pooled and ranked from smallest to largest. Tied values receive the average of the rank positions they occupy (their midrank). The rank sum R₁ of the first group is converted into the U statistic by subtracting n₁(n₁+1)/2, and the reported U is the smaller of the two group values. For larger samples the distribution of U is approximated by a normal curve. Under H₀ its mean is n₁n₂/2 and, without ties, its variance is n₁n₂(N+1)/12; when ties are present a tie-corrected variance is used. The standardised value Z = (U₁ − n₁n₂/2)/σ_U is then used to obtain the p-value, with |Z| used for a two-tailed test.
Formula
U_1 = R_1 - \dfrac{n_1(n_1+1)}{2},\quad U = \min(U_1,U_2)Reject H₀ if the two-tailed p-value falls below the chosen significance level, conventionally 0.05. A two-tailed test is the default; a one-tailed test is appropriate only when its direction was specified before the data were examined. A significant result indicates that values in one group tend to be stochastically larger than values in the other, which is a broader statement than a difference in means or medians. The effect size is reported as r = |Z| / √N, and a confidence interval for r should be reported with a stated computation method.
Formula
\text{reject } H_0 \text{ if } p < 0.05;\quad r = \dfrac{|Z|}{\sqrt{N}}Common pitfalls
- Claiming a difference in medians when the two distributions clearly differ in shape. The test then indicates a general stochastic difference, not a median difference.
- Relying on the normal-approximation p-value for very small samples. An exact or permutation approach is more defensible there.
- Reporting only the p-value. With large samples a small effect can be statistically significant, so the effect size r is needed alongside it, with a confidence interval computed by a stated method, to judge practical importance.
- Using the test on paired observations. Pairing violates the independence assumption, and the signed-rank test is the appropriate choice.
Frequently asked questions
Does the test compare medians or distributions?
Strictly it tests whether one group is stochastically larger than the other. It can be read as a median comparison only when the two groups share a similar distribution shape; otherwise it reflects a broader difference between the distributions.
How does it relate to the Wilcoxon rank-sum test?
They refer to the same procedure. Mann and Whitney (1947) formulated the U statistic, and the abstract of their paper states that Wilcoxon had proposed an equivalent test in 1945, so the two names describe one test.
What is the minimum sample size?
The original paper tabulated the exact distribution of U for samples up to 8 in each group, and at n = m = 8 it is already almost normal. For smaller samples an exact or permutation test is the safer choice.
How do I report an effect size?
Convert the test statistic to a standardised Z and report r = |Z| / √N, where N is the total sample size. Report a confidence interval for r alongside it, computed with a stated method, since a statistically significant result from a large sample may still reflect a small effect.
Related methods
Sources
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(1), 50–60.
Open DOI referenceField, A. (2013). Discovering Statistics Using IBM SPSS Statistics (4th ed.). SAGE.
ISBN: 978-1446249185