Mann–Whitney U test (Wilcoxon rank-sum)
A rank-based test comparing two independent groups; it tests whether values in one group tend to be larger than in the other.
- Sum of the ranks of sample 1 in the pooled sample (average ranks for ties).
- Group sizes.
- Continuity correction ½ (default on).
- Size of each group of tied values.
- .
When to use
Two independent groups with an ordinal outcome, or a quantitative outcome with small samples and strong skew or outliers (e.g. waiting times, delays).
Assumptions
- Independent observations within and between groups.
- Ordinal or continuous outcome. Exact p-values need no ties; with ties the engine uses the tie-corrected normal approximation.
- To read it as a test of medians, the two distributions must have the same shape (one shifted relative to the other).
How to interpret
H₀: the two distributions are identical, so . Report the rank-biserial correlation and group medians.
Common mistakes
- Describing it as "comparing means".
- Claiming a difference in medians when the shapes differ (the test responds to any tendency for one group to be larger, including spread differences).
- Using it for paired data (use the signed-rank test).
Example
x: 3, 5, 7, 9, 11; y: 1, 2, 4, 6. Pooled ranks of x: 3, 5, 7, 8, 9, so and (of 20 pairs, x is larger in 17). Exact two-sided ; rank-biserial . A large effect, but with 9 observations the evidence is weak.