Mann-Whitney U Test (Wilcoxon Rank-Sum)
What you'll learn: How to compare two independent groups without assuming normality by ranking all observations together and testing whether one group tends to have higher ranks.
When You Can't Assume Normal Distributions
Imagine you're comparing pain relief times between two medications, but your data is skewed or has outliers. The Mann-Whitney U test (also called the Wilcoxon rank-sum test) lets you compare two independent samples without requiring normal distributions or equal variances—unlike the two-sample t-test.
The Core Idea: Ranks Over Raw Values
Instead of comparing means, you pool both samples together and rank all observations from smallest to largest. Then you sum the ranks for each group separately. If one group consistently has higher (or lower) values, its rank-sum will be noticeably larger (or smaller) than expected by chance.
The test statistic U measures how many times observations from one group exceed observations from the other. Under the null hypothesis (both samples come from the same distribution), you'd expect the ranks to be evenly mixed between groups.
The Process
- Combine both samples and rank all values together (smallest = 1)
- Handle ties by assigning average ranks
- Sum ranks for each group (call them R₁ and R₂)
- Calculate U statistics for each group
- Use the smaller U to find your p-value from tables or approximations
For large samples (typically n > 20 in each group), U approximately follows a normal distribution, allowing z-test procedures.
What It Tests
The Mann-Whitney U test detects whether one distribution is shifted relative to another—it's sensitive to differences in medians and overall distributional shape, not just central tendency.
Key Takeaway: The Mann-Whitney U test compares two independent samples by ranking combined observations, making it a robust alternative to the two-sample t-test when normality assumptions fail.