Mann-Whitney U test
The Mann-Whitney U test compares two independent groups by jointly ranking all observations and testing whether one group tends to produce higher values.
FrameworkNon-parametric tests
See it move
Wait times at two branches (n = 8, n = 7) are ranked together, lowest to highest, across all fifteen observations. Branch A's ranks sum to 90, giving U₁ = 90 − 36 = 54; branch B's sum to 30, giving U₂ = 30 − 28 = 2. The two U values total 56, matching n₁n₂, while the expected U under equal distributions is only 28.
The formula
Variables
- Mann-Whitney U statistic for group 1 (dimensionless)
- sum of ranks assigned to group 1 observations in the joint ranking of all n₁ + n₂ observations (dimensionless)
- sample size of group 1 (dimensionless)
U₁ + U₂ = n₁n₂. Compute U for both groups; U₁ counts all (group 1, group 2) pairs where the group 1 value exceeds the group 2 value.
Variables
- expected value of U under the null hypothesis (dimensionless)
- sample size of group 1 (dimensionless)
- sample size of group 2 (dimensionless)
Under H₀ each group's observations are equally likely to rank higher; U is symmetric around n₁n₂/2.
Check yourself
A researcher compares job satisfaction scores (rated 1–10) between employees at two independent sites: Site A (n = 8) and Site B (n = 9). Histograms for both groups show strong right-skew. Which test is most appropriate, and why?