Non-parametric test to compare two independent groups — no normality assumption required.
The Mann-Whitney U test (also called the Wilcoxon rank-sum test) is a non-parametric statistical test used to compare two independent groups. Instead of comparing means directly, it ranks all the values from both groups together and tests whether one group tends to have higher ranks than the other.
It is the non-parametric equivalent of the independent-samples t-test and can be used whenever the t-test's normality assumption is in doubt.
Choose Mann-Whitney when:
If your data is approximately normally distributed and sample sizes are reasonable (>30 per group), the t-test is slightly more powerful and preferred.
The U statistic counts the number of times a value from Group 1 exceeds a value from Group 2 across all possible pairs. If U is close to its maximum (n₁ × n₂), Group 1 tends to be higher. If U is close to 0, Group 2 tends to be higher. If U ≈ n₁ × n₂ / 2, the groups are similar.
The p-value is more informative than U alone — it tells you whether the difference is statistically significant.
The effect size r is calculated as Z / √N where Z is the standardised U statistic and N is the total sample size. It ranges from 0 to 1:
A statistically significant result with a small effect size may not be practically meaningful.
The Mann-Whitney U test assumes:
It does not require normality or equal variances, which is its main advantage over the t-test.