InsightFab
Knowledge Base/Kruskal-Wallis Test: When ANOVA's Assumptions Are Not Met
6 Sigma6 min read

Kruskal-Wallis Test: When ANOVA's Assumptions Are Not Met

ANOVA is the standard tool for comparing means across three or more groups. However, when data does not meet normality assumptions, contains outliers, or is ordinal, the Kruskal-Wallis test is the appropriate alternative.

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:

  1. Data from each group comes from a normal distribution
  2. Equal variances across groups (homoscedasticity)
  3. 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

SituationRecommendation
Data conforms to a normal distributionUse ANOVA (statistically more powerful)
Data clearly does not conform to normalityUse Kruskal-Wallis
Presence of severe outliers that cannot be removedUse 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

ProblemParametric MethodNon-parametric Alternative
Compare 2 group meanst-testMann-Whitney U
Compare 3+ group meansOne-way ANOVAKruskal-Wallis
Paired comparisonPaired t-testWilcoxon Signed-Rank
CorrelationPearson rSpearman ρ

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."

Want to try it yourself?

Every tool mentioned in this article is available on InsightFab — just upload a CSV to analyze.

Go to Tools