- The Mann–Whitney U test compares two independent groups when you cannot assume normal data. It is the non-parametric alternative to the independent-samples t-test.
- Rank all the data together, add up the ranks in each group, and convert to \(U\).
- \(U_1 = R_1 – \dfrac{n_1(n_1+1)}{2}\), \(U_2 = n_1 n_2 – U_1\). The test statistic is the smaller \(U\).
- Reject \(H_0\) if the smaller \(U\) is less than or equal to the critical value.
- For larger samples, use a normal approximation.
The problem: small, skewed samples
A student compares two revision methods with six and seven volunteers. The scores are not normally distributed, and one person scored far above the rest. A t-test would be unreliable. The Mann–Whitney U test, published by Henry Mann and Donald Whitney in 1947[1], avoids the normality assumption by working with ranks. It is one of the most widely used tests in dissertations, coursework and the IB Extended Essay.
Key ideas
Assumptions: the two samples are independent, the observations within each are independent, and the outcome is at least ordinal. If the two distributions have a similar shape, the test can be read as comparing medians[2].
Worked example
Students learned a word list using method A (6 students) or method B (7 students). Words recalled:
A: 14, 18, 11, 20, 16, 22
B: 9, 12, 8, 15, 10, 13, 7
Test at the 5% level (two-tailed) whether the methods differ.
Conclusion: there is evidence that recall differs between the methods; method A scores tend to be higher (median 17 words vs 10). With small groups, report the medians alongside the test.
Ties and larger samples
Tied values get the average of the ranks they span, exactly as with Spearman’s coefficient. For samples larger than about 20 in each group, U is approximately normal with
For example, with 20 in each group and \(U = 120\): \(\mu_U = 200\), \(\sigma_U = \sqrt{20 \times 20 \times 41 / 12} = 36.97\), so \(z = -2.16\) and the two-tailed \(p = 0.031\).
Reporting it
A typical write-up reads: “Recall was higher with method A (Mdn = 17) than method B (Mdn = 10), U = 4, p = .014.” Add an effect size if your course asks for one; a common choice is \(r = z/\sqrt{N}\).
Free help or the books
To see where this test fits, use our decision table and flowchart, and for the parametric version read paired vs independent t-test. The Statistics Made Simple textbook covers every test by hand; the Research Methods Made Simple textbook shows how to run and report them in a dissertation with SPSS, R and Python.
Practice questions
EasyQ1. When should you use the Mann–Whitney U test instead of an independent t-test? Show worked answer
EasyQ2. Two groups of 5 have rank sums 36 and 19. Find both U values and the test statistic. Show worked answer
Test statistic \(U = 4\).
MediumQ3. Group X: 3, 7, 8, 12. Group Y: 5, 10, 14, 15, 18. Calculate U. Show worked answer
\(R_X = 1 + 3 + 4 + 6 = 14\). \(U_X = 14 – 10 = 4\). \(U_Y = 20 – 4 = 16\).
U = 4.
MediumQ4. For \(n_1 = n_2 = 25\) and \(U = 200\), use the normal approximation to find z. Show worked answer
\(z = (200 – 312.5)/51.54 = -2.18\); two-tailed \(p \approx 0.029\).
ExamQ5. A researcher compares customer satisfaction ratings (1–10) at two independent branches: 8 customers at branch P and 9 at branch Q. She finds U = 15. The 5% two-tailed critical value is 15. (a) Justify the choice of test. (b) State the hypotheses and conclusion. (c) Suggest one improvement. [6 marks] Show worked answer
(b) \(H_0\): satisfaction distributions are the same at both branches; \(H_1\): they differ. [1] \(U = 15 \le 15\), so reject \(H_0\) at 5%: satisfaction differs between branches. [2]
(c) Use a larger, randomly selected sample of customers, or collect ratings over several days. [1]
Frequently asked questions
Is Mann–Whitney the same as the Wilcoxon rank-sum test?
Yes, they are equivalent tests that use slightly different statistics. The Wilcoxon signed-rank test is different: it is for paired data.
Does Mann–Whitney compare medians?
Only if the two distributions have a similar shape. In general it tests whether values in one group tend to be larger than in the other.
Which U do I compare with the table?
The smaller of the two. Most tables give the largest U that is still significant.
References
- Mann, H. B. and 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), pp. 50–60. https://doi.org/10.1214/aoms/1177730491
- Hart, A. (2001) ‘Mann–Whitney test is not just a test of medians: differences in spread can be important’, BMJ, 323(7309), pp. 391–393. https://doi.org/10.1136/bmj.323.7309.391
- Wilcoxon, F. (1945) ‘Individual comparisons by ranking methods’, Biometrics Bulletin, 1(6), pp. 80–83. https://doi.org/10.2307/3001968

