Nonparametric
Tests
Learn when and how to use distribution-free statistical tests: the Wilcoxon rank-sum and signed-rank methods for real-world biostatistics data.
What Are Nonparametric Tests?
In statistics, parametric tests (like the \(t\)-test) assume your data follow a specific distribution: usually normal. Nonparametric tests make no such assumption about the underlying population distribution.
When to Use Nonparametric Methods
The Normality Assumption
Parametric tests assume the bell curve on the left. When your data look more like the right: use a nonparametric alternative.
The Ranking Process
Nonparametric tests replace raw data with ranks. Here is how ranking works:
Wilcoxon Rank-Sum Test
The Wilcoxon rank-sum test (also called the Mann-Whitney \(U\) test) compares two independent groups to determine whether their population distributions differ.
The Test Statistic \(U\)
Wilcoxon Signed-Rank Test
The signed-rank test is for paired data (before/after, matched subjects). It tests whether the median difference between pairs is zero.
Rank-Sum vs Signed-Rank
| Rank-Sum (Mann-Whitney) | Signed-Rank | |
|---|---|---|
| Design | Two independent groups | One group, paired data |
| Parametric analog | Two-sample \(t\)-test | Paired \(t\)-test |
| What is ranked | All pooled observations | Absolute differences \(|d_i|\) |
| Null hypothesis | Identical distributions | Median difference = 0 |
| Example | Drug A vs Drug B groups | Before vs after treatment |
How to Choose Your Test
Example 1: Rank-Sum Test
A researcher compares recovery days for two independent groups of patients. Group A received a new drug (\(n_1 = 5\)): 4, 7, 12, 3, 9. Group B received a placebo (\(n_2 = 5\)): 8, 15, 11, 19, 14. Test at \(\alpha = 0.05\).
Example 1: Computing \(U\)
Example 2: Signed-Rank Test
Six patients had their blood pressure measured before and after a treatment. Is the treatment effective?
| Patient | Before | After | \(d_i\) | \(|d_i|\) | Rank |
|---|---|---|---|---|---|
| 1 | 148 | 140 | -8 | 8 | 3 |
| 2 | 155 | 142 | -13 | 13 | 5 |
| 3 | 142 | 139 | -3 | 3 | 1 |
| 4 | 160 | 150 | -10 | 10 | 4 |
| 5 | 138 | 132 | -6 | 6 | 2 |
| 6 | 170 | 155 | -15 | 15 | 6 |
Example 2: Result
Handling Tied Ranks
When two or more observations have the same value, assign each the average of the ranks they would occupy.
Common Mistakes
Question 1 of 5
Which nonparametric test is the appropriate alternative to the two-sample \(t\)-test?
Question 2 of 5
In the Wilcoxon signed-rank test, what do you rank?
Question 3 of 5
Three observations have the same value and would occupy ranks 4, 5, and 6. What rank should each receive?
Question 4 of 5
A key disadvantage of nonparametric tests compared to parametric tests is that they:
Question 5 of 5
In a rank-sum test with \(n_1 = 4\) and \(n_2 = 4\), the total number of ranks in the pooled sample is 8. What is the total sum of all ranks?