STA 264 · Statistics for Biological and Agricultural Sciences
Our notes
2 min readWhen to use them
Non-parametric tests don't need normal data. Use them for:
- ranks or scores (disease score 1 to 5)
- small samples that are clearly skewed
- data with outliers
They're less powerful than t tests when data really are normal.
Sign test: for pairs
Count which of each pair is bigger, and drop ties. Under H₀, plus and minus each have a probability of 1/2.
Example: weed score before and after a treatment on 8 plots. 7 fell, 1 rose.
P(7 or more of 8) = (⁸C₇ + ⁸C₈)/2⁸ = (8 + 1)/256 = 0.035. Two-tailed p = 0.07. This isn't significant at 5%, though it's near.
Wilcoxon signed-rank test: for pairs
This uses the size of the differences as well.
- Find the differences; drop zeros.
- Rank the absolute values; average any ties.
- Sum the ranks of the positive differences (W₊), and of the negative differences (W₋).
- Take the smaller, T, and compare it with the table. T at or below the table value is significant.
Example: differences: 3, 5, −1, 4, 6, 2 (n = 6).
Ranks of absolute values: 1→1, 2→2, 3→3, 4→4, 5→5, 6→6.
W₋ = 1; W₊ = 3 + 5 + 4 + 6 + 2 = 20; T = 1.
The table value at n = 6, 5% two-tailed is 0, so T = 1 is not significant.
Check: W₊ + W₋ = n(n + 1)/2 = 21. And 20 + 1 = 21. Correct.
Mann-Whitney U test: two independent groups
- Rank all values together.
- Sum the ranks of group 1, as R₁.
- U₁ = n₁n₂ + n₁(n₁ + 1)/2 − R₁, and U₂ = n₁n₂ − U₁.
- Take the smaller, and compare it with the table.
Example: disease scores. Treated: 1, 2, 2, 3. Untreated: 3, 4, 4, 5.
Sorted: 1, 2, 2, 3, 3, 4, 4, 5, with ranks 1, 2.5, 2.5, 4.5, 4.5, 6.5, 6.5, 8.
R₁ = 1 + 2.5 + 2.5 + 4.5 = 10.5.
U₁ = 16 + 10 − 10.5 = 15.5. U₂ = 0.5. The smaller is 0.5.
The table value at n₁ = n₂ = 4, 5% two-tailed is 0. So 0.5 is just not significant, with such a small sample.
Check: U₁ + U₂ = 16 = n₁n₂. Correct.
Kruskal-Wallis test: three or more groups
The non-parametric version of one-way ANOVA.
H = [12/(N(N + 1))] Σ(Rᵢ²/nᵢ) − 3(N + 1), compared with χ² with k − 1 df, for groups that aren't too small.
Example: three groups, n = 3 each, with no overlap: ranks 1, 2, 3; 4, 5, 6; 7, 8, 9.
Rank sums: 6, 15, 24.
H = [12/90](36/3 + 225/3 + 576/3) − 30 = (0.1333)(279) − 30 = 37.2 − 30 = 7.2.
Compared with χ²₂ at 5% (5.99), it's significant. (Exact tables are better for such small groups.)
Friedman test
The non-parametric form of the RCBD. Treatments are ranked within each block.
Choosing a test
| Data | Parametric | Non-parametric |
|---|---|---|
| Two paired samples | Paired t | Sign, Wilcoxon |
| Two independent samples | Two-sample t | Mann-Whitney |
| 3+ independent samples | One-way ANOVA | Kruskal-Wallis |
| Blocks | RCBD ANOVA | Friedman |
| Association | Pearson's r | Spearman's r_s |
Reporting
Report the median and the interquartile range with these tests, rather than the mean and SD.
Exams usually ask: choose a suitable test and justify it; run a sign, Wilcoxon or Mann-Whitney test; handle ties; explain the trade-off in power.
Common mistake: forgetting to give tied values the average of their ranks. Two values sharing ranks 2 and 3 both get 2.5.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Nonparametric statistics
(opens en.wikipedia.org in a new tab)
Wikipedia, Nonparametric statistics, CC BY-SA 4.0 · licence
-
Mann–Whitney U test
(opens en.wikipedia.org in a new tab)
Wikipedia, Mann–Whitney U test, CC BY-SA 4.0 · licence
-
Sign test
(opens en.wikipedia.org in a new tab)
Wikipedia, Sign test, CC BY-SA 4.0 · licence
-
Wilcoxon signed-rank test
(opens en.wikipedia.org in a new tab)
Wikipedia, Wilcoxon signed-rank test, CC BY-SA 4.0 · licence
Watch
-
Best pick SIGN TEST: Non-Parametric test for Small and Large Samples
26 min · ≈ 117 MB · about ₦66
(opens youtube.com in a new tab)
-
How to Perform Mann-Whitney U Test in SPSS (Non-Parametric Test)
3 min · ≈ 14 MB · about ₦8
(opens youtube.com in a new tab)
-
Mann Whitney U Test ( Rank Sum Test ) | Non Parametric Test | How To perform the Mann-Whitney U Test
13 min · ≈ 59 MB · about ₦33
(opens youtube.com in a new tab)
-
Wilcoxon Signed-Rank Test and Wilcoxon Rank Sum Test - Nonparametric Tests - Statistics
36 min · ≈ 162 MB · about ₦91
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.