nonparametric statistical test · BEGINNER LESSON
Wilcoxon rank-sum test
The Wilcoxon rank-sum test is a nonparametric test for comparing an ordinal or continuous outcome in two independent groups. It works by ranking all observations together and comparing the ranks, rather than comparing the raw values directly.
What it is and what it measures
The Wilcoxon rank-sum test, also called the Mann-Whitney U test, is used for two independent groups. It measures whether values from one group tend to be higher or lower than values from the other group by comparing their ranks after all observations are pooled and ordered. A rank is the position of a value in sorted data, not the value itself. [source: 0, 1]
[1] McNemar and Mann-Whitney U Tests - StatPearls - NCBI - NIH [2] web.mit.edu › library › statsR: Wilcoxon Rank Sum and Signed Rank Tests - MIT
How it works
First, combine the two groups and assign ranks from smallest to largest. Then compare the distribution of those ranks between groups, or compute an equivalent rank-sum statistic. Because the test uses ranks, it is less sensitive to extreme outliers than tests that use the original numbers directly. A nonparametric test is one that does not require the usual normal-distribution assumption. [source: 0, 1, 2]
[1] McNemar and Mann-Whitney U Tests - StatPearls - NCBI - NIH [2] web.mit.edu › library › statsR: Wilcoxon Rank Sum and Signed Rank Tests - MIT [3] web.mit.edu · lib · RR: Wilcoxon Rank Sum and Signed Rank Tests - MIT
When it is used
This test is useful when an independent-samples t-test is not a good fit, especially for skewed data, ordinal data, small samples, or data with outliers. Ordinal data have a meaningful order but not necessarily equal spacing between values. [source: 0]
[1] McNemar and Mann-Whitney U Tests - StatPearls - NCBI - NIH
Limitations and interpretation
The test requires independent observations between groups, so it is not for paired measurements, repeated measurements from the same person, matched case-control data, or before-and-after comparisons on the same subjects. It is often described as a comparison of medians, but that interpretation is valid only when the two distributions have similar shapes and mainly differ by location. The test does not directly compare means and is not equivalent to a t-test. [source: 0, 1]
[1] McNemar and Mann-Whitney U Tests - StatPearls - NCBI - NIH [2] web.mit.edu › library › statsR: Wilcoxon Rank Sum and Signed Rank Tests - MIT
Practical calculation note
Software may report the result as a Wilcoxon rank-sum test, a Mann-Whitney test, or a U statistic. Some programs use slightly different definitions of the reported statistic, so the exact printed number can differ even when the underlying test is the same. [source: 1, 2]
[2] web.mit.edu › library › statsR: Wilcoxon Rank Sum and Signed Rank Tests - MIT [3] web.mit.edu · lib · RR: Wilcoxon Rank Sum and Signed Rank Tests - MIT
SEE THE IDEA
How the Wilcoxon rank-sum test works
Start with two separate samples that are not paired or matched.
Combine all observations and assign order-based ranks.
Check whether one group tends to have higher ranks than the other.
Use the rank pattern to assess evidence of a shift in location.
The test moves from raw data to pooled ranks, then compares the rank patterns between groups.
A rank-based comparison of two independent groups.
TRY IT YOURSELF
Test your understanding
Choose an answer, then check the explanation.
PUT IT TOGETHER
Match each concept to its meaning
Drag a label onto its description, or select a label and then select a description. This also works with a keyboard.
4 pairs to match
Sources and further reading
This general lesson was generated from public source material. It explains a concept; it does not interpret a private paper or provide medical advice.