Mann-Whitney U-test Explained: How to Make, Read and Report It
The Mann-Whitney U test compares two independent groups using ranks. It is a common alternative to the independent-samples t-test when the outcome is ordinal, strongly skewed or the sample is small.
What it tests
It tests whether values in one group tend to be larger than in the other (a difference in stochastic dominance, with P(X > Y) ≠ .50). It compares medians only if the two distributions have the same shape and spread. Assumptions: independent observations, an ordinal or continuous outcome and two independent groups.
Calculation
U1 = R1 − n1(n1 + 1)/2 U1 + U2 = n1n2 rrb = 1 − 2U / (n1n2)
Original example (illustrative)
Pain scores (0–20) after two physiotherapy protocols, n = 5 each. Protocol A: 12, 15, 14, 10, 18. Protocol B: 20, 17, 22, 19, 16.
Combined ranks (1 = lowest): 10→1, 12→2, 14→3, 15→4, 16→5, 17→6, 18→7, 19→8, 20→9, 22→10. Protocol A ranks: 1, 2, 3, 4, 7 (RA = 17); Protocol B ranks: 5, 6, 8, 9, 10 (RB = 38). Check: 17 + 38 = 55 = 10 × 11/2. UA = 17 − 15 = 2 and UB = 38 − 15 = 23, and 2 + 23 = 25 = 5 × 5. The exact two-sided p-value is 2 × (4/252) = .032, since 4 of the 252 possible rank arrangements give U ≤ 2. Rank-biserial correlation = 1 − 2(2)/25 = .84, and the probability that a randomly chosen B score exceeds an A score is 23/25 = .92. Medians are 14 (A) and 19 (B).
The result indicates a large difference, but with n = 5 per group it is imprecise. Treat it as illustrative evidence and report the effect size alongside the p-value.
How to make it in StatFAS
Open the Mann-Whitney U-test Calculator. Use a group column and an outcome column, or one column per group.
APA 7 reporting
A Mann-Whitney U test showed that pain scores were higher in Protocol B (Mdn = 19) than in Protocol A (Mdn = 14), U = 2, p = .032, rrb = .84, nA = nB = 5.
Common mistakes and alternatives
Describing it as a test of medians without checking shapes, using it for paired data (use Wilcoxon signed-rank), ignoring ties, and assuming it is always more powerful than a t-test; with approximately normal data the t-test is somewhat more powerful. Compare with the t-test calculator.
Conclusion
Use Mann-Whitney U when rank-based comparison suits the outcome, and report a clear effect size rather than only a p-value.
1.
statfas-mann-whitney-u-test-interface.png, alt: "StatFAS Mann-Whitney U-test Calculator interface"2.
statfas-mann-whitney-u-test-example-data.png, alt: "Example data entered in the StatFAS Mann-Whitney U-test Calculator"3.
statfas-mann-whitney-u-test-settings.png, alt: "Mann-Whitney U-test Calculator settings in StatFAS"4.
statfas-mann-whitney-u-test-result.png, alt: "Mann-Whitney U-test Calculator result generated in StatFAS"References
- Mann, H. B., & Whitney, D. R. (1947). On a test of whether one of two random variables is stochastically larger than the other. The Annals of Mathematical Statistics, 18(1), 50–60.