Mann-Whitney U Test
Compare two independent groups without assuming normality — U, z, p, and effect size.
n₁ = 7, n₂ = 7. U₁ = 1, U₂ = 48; the smaller is reported.
Two-tailed p = 0.0027, no ties present.
Effect size for the difference in ranks, running from −1 to 1.
With fewer than about 10 cases per group the normal approximation is rough — compare U against an exact critical-value table rather than relying on the p-value here.
The Mann-Whitney U test ranks both groups together and compares their rank sums. For two groups of 7 whose ranks sum to 29 and 76, U = 1, giving z = −3.00 and a two-tailed p of .003 — strong evidence the groups differ.
A t-test that does not need normality
The independent-samples t-test compares means and assumes the data are roughly normal within each group. When that assumption fails — small samples, skewed distributions, ordinal outcomes like Likert responses — the Mann-Whitney U test answers a similar question using ranks instead of raw values.
The procedure is simple enough to do by hand. Pool both groups, rank every value from smallest to largest, then add up the ranks belonging to each group. If the groups are alike, their rank sums will be close to what equal sharing would predict. If one group sits systematically higher, its rank sum is inflated and U falls towards zero.
What the test actually compares
It is often described as comparing medians, but that is only exact when the two distributions have the same shape. In general the test compares stochastic dominance: the probability that a randomly chosen value from one group exceeds one from the other. Where the shapes differ markedly, a significant result means the distributions differ, not necessarily that the medians do.
R₁ is the rank sum of group 1, N the combined sample size, and t the size of each group of tied values. The smaller of U₁ and U₂ is conventionally reported.
Worked example: 7 versus 7
Rank together, sum by group, then standardise:
- 1 Pool and rank all values. Combine both groups and rank from lowest to highest. Tied values share the average of the ranks they would occupy.
- 2 Sum the ranks within each group. Group 1 sums to 29 and group 2 to 76, across 14 values in total.
- 3 Convert rank sums to U. U₁ = 29 − (7 × 8 ÷ 2) = 29 − 28 = 1; U₂ = 76 − 28 = 48. Report the smaller, U = 1.
- 4 Find the expected U. μ = 7 × 7 ÷ 2 = 24.5, with a standard deviation of 7.83 for this data.
- 5 Standardise. z = (1 − 24.5) ÷ 7.83 = −3.00, giving a two-tailed p of .003.
- 6 Report an effect size. The rank-biserial correlation is 1 − 2U ÷ (n₁n₂) = 1 − 2 ÷ 49 = .96, a very large effect.
Choosing between the parametric and nonparametric test
The nonparametric option costs a little power when normality genuinely holds, and gains a great deal when it does not.
| Situation | Test to use |
|---|---|
| Two independent groups, roughly normal | Independent-samples t-test |
| Two independent groups, skewed or ordinal | Mann-Whitney U |
| Two paired measurements, roughly normal | Paired t-test |
| Two paired measurements, skewed or ordinal | Wilcoxon signed-rank |
| Three or more independent groups, skewed | Kruskal-Wallis H |
Ties, small samples, and reporting
Tied values get the average of the ranks they would have occupied, and ties reduce the variance of U. This calculator applies the standard tie correction, which matters most when the outcome has few distinct values — a five-point Likert scale across 40 respondents produces a great many ties.
The p-value here comes from a normal approximation, which is reliable once both groups have roughly 10 or more observations. Below that, compare U against an exact critical-value table instead; with very small samples the approximation can be noticeably off.
For reporting, give U, the sample sizes, the z if you used the approximation, the exact p, and an effect size. Medians with interquartile ranges describe the groups better than means here, since the test itself is not about means.