Non-parametric tests
- Statistical test
Tests that compare groups using the order of the data (ranks) instead of their values, useful for ordinal scales or skewed data.
What it is
Non-parametric tests do not assume that the data follow a normal distribution. Most replace each value by its rank (its place in the sorted list) and compare the ranks between groups. They are the choice for ordinal data, for small and very skewed samples or when there are outliers; in exchange, when data really are normal they have slightly less power than their parametric counterparts.
When to use it
- Ordinal outcome (pain or satisfaction scales) or skewed numerical outcome.
- Small samples where normality cannot be checked.
- Non-parametric correlation: Spearman, using the ranks of both variables.
Worked example
- Data: pain (0 to 10) at 24 hours with two painkillers, 5 patients each. A: 1, 2, 3, 5, 6; B: 4, 7, 8, 9, 10.
- The 10 values are sorted and given ranks 1 to 10 (no ties here).
- Ranks of A: 1, 2, 3, 5 and 6; sum = 17. Ranks of B: 4, 7, 8, 9 and 10; sum = 38. Check: 17 + 38 = 55 = 10 × 11 / 2.
- U for A = 17 − 5 × 6 / 2 = 17 − 15 = 2. U for B = 38 − 15 = 23. The smaller is used: U = 2.
- For 5 and 5 patients, the two-sided critical value at α = 0.05 is 2: if U is 2 or less, H0 is rejected.
- U = 2, so H0 is rejected; the exact two-sided p value is about 0.03.
- Medians: A = 3 and B = 8 points.
- Reading: pain was lower with A; the test used only the order of the scores, which suits an ordinal scale.
Each non-parametric test and its parametric counterpart
| Situation | Parametric | Non-parametric |
|---|---|---|
| 2 independent groups | Independent t test | Mann-Whitney |
| 2 paired measurements | Paired t test | Wilcoxon signed-rank |
| 3 or more independent groups | One-way ANOVA | Kruskal-Wallis |
| Correlation of two variables | Pearson | Spearman |
Markers
- U
- ranks
- Wilcoxon
- Kruskal-Wallis
Assumptions and pitfalls
- Choosing a non-parametric test for large, normal samples for no reason (some power is lost).
- Reporting means and SDs alongside a rank test: the consistent summary is the median and IQR.
- Using Mann-Whitney on paired data (the Wilcoxon signed-rank test applies).
Test yourself
Think of the answer, then tap the question to see it.
Which non-parametric test compares two independent groups?
The Mann-Whitney U test (also called the Wilcoxon rank-sum test).
Which non-parametric test matches the paired t test?
The Wilcoxon signed-rank test.
When is a non-parametric test a good choice?
With ordinal data, with small and very skewed samples, or with outliers that distort the mean.
What is their drawback compared with parametric tests?
If the data really are normal, they have slightly less power to detect a real difference.
Connections
Educational content on epidemiological and statistical methods; the examples use made-up numbers to teach the calculation. Not a clinical or legal guide: current Colombian rules are in the official sources.
Sources: Do two arbitrary processes have the same central tendency? (NIST/SEMATECH e-Handbook of Statistical Methods, National Institute of Standards and Technology, 2012); How can we compare several populations with unknown distributions (the Kruskal-Wallis test)? (NIST/SEMATECH e-Handbook of Statistical Methods, National Institute of Standards and Technology, 2012).
Spotted a mistake?We are always improving for the community. Tell us what is wrong and our team will review it.Report a mistake
Representative model, for educational purposes only.
