Mann Whitney U Test
Reviewed bySatya R Panigrahi
Definition
The Mann Whitney U test is a nonparametric statistical test that compares the distributions of a continuous or ordinal dependent variable between two independent groups. It tests whether one group tends to have higher or lower values than the other and serves as the nonparametric alternative to the independent samples t test when the assumption of normality is not met. It does not remove the need for similar spreads: unequal spreads in the two groups can themselves produce a significant result.[3]
Explore the concept
Every pair gets a duel
Fill a board of analgesic versus placebo patient pairs to see what U counts, test 198 against chance, then watch equal medians give an uneven result.
25 vs 25 patients, VAS 0 to 10, scores illustrative
U so far
0
no pairs yet
Analgesic hurts less
0
pairs compared so far
625 pairs to compare
The big idea: The Mann Whitney U test counts, over every pair of one patient from each group, how often one group has the higher value. It asks whether that chance differs from 50%, which is a comparison of medians only when the two groups have the same shape.
From the article: 25 patients per group, U = 198, z = 2.22, p = 0.026 (normal approximation), rank biserial r = 1 − 2 × 198 ÷ 625 = 0.37, medians 3.0 and 5.0. Under H0, U has mean 25 × 25 ÷ 2 = 312.5 and SD √(25 × 25 × 51 ÷ 12) = 51.5 (no tie correction). The individual pain scores are illustrative values built to give these medians and U = 198 exactly. The equal median curves are illustrative: a normal shape, then gamma shaped curves (shape 3 and 1.5) and their mirror images, all with median 5 and SD 1.6; the percentages are computed exactly for those shapes.
Why it matters
Not all data meet the assumptions required by parametric tests. When samples are small, distributions are skewed, or outcomes are measured on ordinal scales, the independent samples t test may produce unreliable results. The Mann Whitney U test provides a valid alternative that does not require normality and is resistant to the influence of outliers. It is widely used in clinical research, behavioral science, and social science whenever researchers compare two groups on a non normally distributed outcome.
How it works
The Mann Whitney U test operates on the ranks of the data rather than the raw values.[1] All observations from both groups are combined, ranked from smallest to largest, and tied values receive the average rank. The test statistic (U) is calculated from the sum of ranks in each group. Conceptually, U counts the number of times an observation in one group precedes an observation in the other group in the ranked sequence.[2]
The null hypothesis states that the two groups are drawn from the same distribution, so that a randomly selected observation from one group is equally likely to be larger or smaller than a randomly selected observation from the other group. For small samples, exact p values are obtained from the distribution of U under all possible rank orderings. For larger samples, a normal approximation is used.[2]
The effect size for the Mann Whitney U test can be reported as the rank biserial correlation (r = 1 minus 2U divided by n₁ times n₂, with U counted for the group of interest), which ranges from negative 1 to positive 1, or as a common language effect size indicating the probability that a randomly selected observation from one group exceeds a randomly selected observation from the other.
It is important to note that the Mann Whitney U test does not specifically compare medians unless both groups have the same distributional shape. When the distributions differ in shape or spread, a significant result may reflect differences in the overall distribution rather than differences in central tendency.[3][4]
When to use it
Use the Mann Whitney U test when comparing two independent groups on a continuous or ordinal dependent variable and when one or more of the following conditions hold: the data are not normally distributed, the sample size is small (making it difficult to rely on the central limit theorem), the outcome is measured on an ordinal scale, or outliers are present that would distort the t test. For three or more groups, use the Kruskal Wallis test. For paired or matched data, use the Wilcoxon signed rank test instead.[1]
Key takeaways
- Not all data meet the assumptions required by parametric tests.
- All observations from both groups are combined, ranked from smallest to largest, and tied values receive the average rank.
- Use the Mann Whitney U test when comparing two independent groups on a continuous or ordinal dependent variable and when one or more of the following conditions hold: the data are not normally distributed, the sample size is small (making it difficult to rely on the central limit theorem), the outcome is measured on an ordinal scale, or outliers are present that would distort the t test.
- A common error is referring to the Mann Whitney U test as a test of median differences when the distributions of the two groups have different shapes.
Common mistakes
- A common error is referring to the Mann Whitney U test as a test of median differences when the distributions of the two groups have different shapes. The test actually assesses whether the probability of a randomly selected value from one group being larger than a randomly selected value from the other group differs from 0.5.[4]
- Another mistake is failing to report an effect size alongside the p value, which provides information about the magnitude of the difference.
- Some researchers also apply the Mann Whitney U test to paired data, which is incorrect; the Wilcoxon signed rank test is the appropriate nonparametric test for related samples.
- Finally, using the test with very large samples when the data are approximately normal offers no advantage over the t test and may sacrifice a small amount of power.
Example
A clinical researcher compares pain scores (measured on a 0 to 10 visual analog scale) between 25 patients receiving a new topical analgesic and 25 patients receiving placebo at 2 hours post application. The pain score distributions are right skewed in both groups. The Mann Whitney U test yields U = 198, z = 2.22, p = 0.026 (normal approximation), and the rank biserial correlation is 0.37, indicating a moderate effect in favor of the topical analgesic. The median pain score is 3.0 in the analgesic group and 5.0 in the placebo group.
Test your understanding
5 questions that adapt as you go: answer two in a row correctly and they get harder.
Question 1 of 5
Scenario:
Two groups of 20 patients each give U = 160.
Question:
What is the rank biserial correlation, r = 1 − 2U ÷ (n₁ × n₂)?
Hardness: Interpret
Sources
- [1]Field A. Discovering Statistics Using IBM SPSS Statistics. 6th ed. SAGE Publications, 2024. ISBN 9781529630008
- [2]Mann HB, Whitney DR. On a test of whether one of two random variables is stochastically larger than the other. Annals of Mathematical Statistics. 1947;18(1):50-60. doi:10.1214/aoms/1177730491
- [3]Hart A. Mann-Whitney test is not just a test of medians: differences in spread can be important. BMJ. 2001;323(7309):391-393. doi:10.1136/bmj.323.7309.391
- [4]Divine GW, Norton HJ, Barón AE, Juarez-Colunga E. The Wilcoxon-Mann-Whitney procedure fails as a test of medians. Am Stat. 2018;72(3):278-286. doi:10.1080/00031305.2017.1305291
Cite this term
Paperguide. (2026, October 15). Mann Whitney U Test. In Paperguide Research Glossary. https://paperguide.ai/research-glossary/mann-whitney-u-test/(Paperguide, 2026)