Scenario
You want to compare the material hardness from three suppliers for significant differences. However, an Anderson-Darling normality test shows that all three sets of data do not conform to a normal distribution. The prerequisite assumption of ANOVA is normality, so what now?
ANOVA's Assumptions
One-way ANOVA requires:
- Data from each group comes from a normal distribution
- Equal variances across groups (homoscedasticity)
- Independent samples
If these assumptions are not met, ANOVA's P-value may be unreliable.
What is Kruskal-Wallis?
Kruskal-Wallis is ANOVA's non-parametric alternative.
The core approach: instead of comparing raw values, it combines all data, ranks them, and then compares the average ranks of each group for significant differences.
Because it only uses ranks, it does not assume a specific data distribution.
When to Use Kruskal-Wallis
| Situation | Recommendation |
|---|---|
| Data conforms to a normal distribution | Use ANOVA (statistically more powerful) |
| Data clearly does not conform to normality | Use Kruskal-Wallis |
| Presence of severe outliers that cannot be removed | Use Kruskal-Wallis |
| Ordinal scale (e.g., ratings 1-5) | Use Kruskal-Wallis |
| Very small sample size (n < 10) | Consider Kruskal-Wallis |
Interpreting the Results
H₀: The medians of all groups are identical
H₁: At least one group's median is different
- P < 0.05: At least one group shows a significant difference; proceed with post-hoc comparisons to identify which specific groups differ.
- P ≥ 0.05: Insufficient evidence to claim a difference between groups.
Post-hoc Comparisons
After a significant Kruskal-Wallis result, use Dunn's test for pairwise comparisons (similar to Tukey's test after ANOVA), and adjust the P-values for multiple comparisons (Bonferroni or Benjamini-Hochberg correction).
Non-parametric Equivalents Table
| Problem | Parametric Method | Non-parametric Alternative |
|---|---|---|
| Compare 2 group means | t-test | Mann-Whitney U |
| Compare 3+ group means | One-way ANOVA | Kruskal-Wallis |
| Paired comparison | Paired t-test | Wilcoxon Signed-Rank |
| Correlation | Pearson r | Spearman ρ |
The Cost: Statistical Power
Non-parametric methods do not require distributional assumptions, but the cost is lower statistical power—meaning with the same sample size, it is harder to detect a true difference. When data conforms to normality, ANOVA is more effective.
Key Takeaway Quote
"Your toolbox should contain both ANOVA and Kruskal-Wallis—not every batch of data will conform to your assumption of normality."