Non-parametric Tests
Join our community on Telegram!
Join the biggest community of Pharma students and professionals.
Non-parametric tests are statistical methods used when the assumptions required for parametric tests are not satisfied. Parametric tests, such as t-tests and ANOVA, usually assume that the data follows a normal distribution and that the variance is equal across groups. When these assumptions are not met, non-parametric tests provide a reliable alternative.
Non-parametric tests are often used for small sample sizes, ordinal data, or data that is not normally distributed. These tests do not rely on parameters such as the mean and standard deviation. Instead, they are based on the ranks or order of the data.
| Parametric Test | Non-parametric Alternative | Purpose |
|---|---|---|
| Independent t-test | Mann-Whitney U test (Wilcoxon rank-sum test) | Compare two independent groups |
| Paired t-test | Wilcoxon signed-rank test | Compare paired observations |
| One-way ANOVA | Kruskal-Wallis test | Compare three or more groups |
In R, non-parametric tests can be performed using built-in functions.
The Wilcoxon rank-sum test is used to compare two independent groups.
# Sample data
group1 <- c(12, 15, 14, 10, 13)
group2 <- c(18, 20, 19, 17, 21)
# Wilcoxon rank-sum test
wilcox.test(group1, group2)
The Wilcoxon signed-rank test is used for paired data.
# Paired data
before <- c(50, 55, 60, 58, 62)
after <- c(45, 50, 55, 53, 57)
wilcox.test(before, after, paired = TRUE)
The Kruskal-Wallis test is used to compare three or more independent groups.
# Sample dataset
scores <- data.frame(
marks = c(70, 75, 80, 65, 68, 72, 85, 88, 90),
group = factor(c("A", "A", "A", "B", "B", "B", "C", "C", "C"))
)
kruskal.test(marks ~ group, data = scores)
Non-parametric tests are useful when data does not meet the assumptions required for parametric methods. They provide flexible and reliable statistical analysis for a wide range of real-world datasets.
