Skip to main content

ANOVA vs. Kruskal-Wallis: A Direct Comparison

Overview​

This unit examines how one-way ANOVA (parametric) and Kruskal-Wallis ANOVA (non-parametric) compare β€” not just conceptually, but computationally, including the remarkable mathematical equivalence between the F and H statistics when applied to the same data.


3.7 Full Comparison​

Conceptual Comparison Table​

FeatureOne-Way ANOVAKruskal-Wallis ANOVA
What it comparesGroup meansGroup medians
Data typeInterval/ratioOrdinal or above
Normality requiredYesNo
Homogeneity of varianceRequired (explicit)Implied by identical shapes
Test statisticF ratioH statistic
Critical value tableF distributionTable H (small n) or χ² (large n)
Significance directionF β‰₯ F-criticalH β‰₯ critical value
Post-hoc testsTukey, ScheffΓ©, BonferroniDunn's test, pairwise MW-U
Outlier sensitivityHigh (mean-based)Low (rank-based)
Special case at k = 2Equivalent to independent t-testEquivalent to Mann-Whitney U
Developed byR.A. FisherKruskal & Wallis (1952)

Worked Comparison: Same Data, Both Tests​

Research Scenario​

Three groups perform a task. We compare their scores using both tests.

Data:

Group 1Group 2Group 3
369
5710
6811
7912
81015
910β€”
β€”11β€”

Sample sizes: n1=6n_1 = 6, n2=7n_2 = 7, n3=5n_3 = 5, N=18N = 18


One-Way ANOVA Calculation​

Step 1: Group Sums

Ξ£X1=38,Ξ£X2=61,Ξ£X3=57\Sigma X_1 = 38, \quad \Sigma X_2 = 61, \quad \Sigma X_3 = 57

Ξ£X12=264,Ξ£X22=551,Ξ£X32=671\Sigma X_1^2 = 264, \quad \Sigma X_2^2 = 551, \quad \Sigma X_3^2 = 671

Step 2: Sum of Squares

SStotal=(264+551+671)βˆ’(38+61+57)218=1486βˆ’1352=134SS_{total} = (264 + 551 + 671) - \frac{(38+61+57)^2}{18} = 1486 - 1352 = 134

SSbetween=3826+6127+5725βˆ’156218=70.038SS_{between} = \frac{38^2}{6} + \frac{61^2}{7} + \frac{57^2}{5} - \frac{156^2}{18} = 70.038

SSwithin=SStotalβˆ’SSbetween=63.962SS_{within} = SS_{total} - SS_{between} = 63.962

Step 3: ANOVA Table

SourceSSdfMSF
Between Groups70.038235.0198.213
Within Groups63.962154.264β€”
Total134.00017β€”β€”

Critical F at Ξ± = .05, df = (2, 15): 3.68

Since F = 8.213 > 3.68: Reject Hβ‚€ β€” the three groups differ significantly.


Kruskal-Wallis Calculation (Same Data)​

Step 1: Rank all 18 scores

Group 1RankGroup 2RankGroup 3Rank
3163.5910
5275.51013
63.587.51115.5
75.59101217
87.510131518
9101013β€”β€”
β€”β€”1115.5β€”β€”
T₁ = 29.5Tβ‚‚ = 68T₃ = 73.5

Step 2: Compute H

H=1218(19)[29.526+6827+73.525]βˆ’3(19)H = \frac{12}{18(19)} \left[ \frac{29.5^2}{6} + \frac{68^2}{7} + \frac{73.5^2}{5} \right] - 3(19)

H=12342[145.04+660.57+1081.35]βˆ’57H = \frac{12}{342} \left[ 145.04 + 660.57 + 1081.35 \right] - 57

H=0.0351Γ—1886.96βˆ’57=66.22βˆ’57=9.22H = 0.0351 \times 1886.96 - 57 = 66.22 - 57 = \mathbf{9.22}

Critical χ² at Ξ± = .05, df = 2: 5.99

Since H = 9.22 > 5.99: Reject Hβ‚€ β€” the three groups differ significantly.

Both tests reach the same conclusion: Group 3 > Group 2 > Group 1.


The Mathematical Equivalence of F and H​

Iman and Conover (1981) demonstrated that F and H are mathematically related through the rank transform principle:

F=[kβˆ’1Nβˆ’kβ‹…(Nβˆ’1Hβˆ’1)]βˆ’1F = \left[ \frac{k-1}{N-k} \cdot \left( \frac{N-1}{H} - 1 \right) \right]^{-1}

Verification with Our Example​

We found F = 8.213 and H = 9.22.

F=[215β‹…(179.22βˆ’1)]βˆ’1F = \left[ \frac{2}{15} \cdot \left( \frac{17}{9.22} - 1 \right) \right]^{-1}

F=[0.1333Γ—(1.843βˆ’1)]βˆ’1=[0.1333Γ—0.843]βˆ’1=0.1124βˆ’1β‰ˆ8.90F = \left[ 0.1333 \times (1.843 - 1) \right]^{-1} = \left[ 0.1333 \times 0.843 \right]^{-1} = 0.1124^{-1} \approx 8.90

(Minor discrepancy due to rounding; both reject Hβ‚€ consistently.)

This equivalence illustrates that Kruskal-Wallis is literally ANOVA applied to ranks β€” the rank transform bridges the parametric and non-parametric worlds.


When the Two Tests Disagree​

Both tests will usually agree in their conclusion. However, discrepancies can occur when:

  1. Data is heavily skewed: ANOVA may be more influenced by extreme scores; Kruskal-Wallis is more robust
  2. Outliers are present: ANOVA F can be inflated or deflated by outliers; H is resistant
  3. Variance heterogeneity: ANOVA is more sensitive to unequal variances; H is less so
  4. Very small samples: Exact small-sample corrections make a larger difference

Decision Framework: ANOVA or Kruskal-Wallis?​

Indian Research Context​

In Indian psychological research β€” particularly in clinical, educational, and rural community settings β€” Kruskal-Wallis is frequently the preferred choice because:

  • Small institutional samples (hospital wards, school cohorts) rarely exceed 20–30 per group
  • Likert-scale data is ubiquitous in personality, attitude, and wellbeing research
  • Non-normal distributions are the rule rather than exception in applied settings
  • Studies comparing groups such as income brackets, caste categories, or urban/rural/tribal populations often have naturally ordinal or skewed measures

Post-Hoc Testing After a Significant Kruskal-Wallis Result​

A significant H tells you only that at least one pair of groups differs. To identify which pairs differ, use:

MethodDescriptionWhen to Use
Dunn's testPairwise comparisons with Bonferroni-style correctionStandard choice; available in SPSS
Pairwise Mann-Whitney U with BonferroniEach pair tested with U; Ξ± divided by number of comparisonsSimple and transparent
Steel-Dwass testMore powerful than Bonferroni correctionWhen many comparisons are needed

Bonferroni correction formula: Adjusted Ξ± = .05 / number of pairwise comparisons

For k = 3 groups: 3 pairs β†’ adjusted Ξ± = .05/3 = .0167
For k = 4 groups: 6 pairs β†’ adjusted Ξ± = .05/6 = .0083


Self-Assessment Questions​

Level 1 β€” Recall​

  1. In what direction is the Kruskal-Wallis H test significant: when H is larger or smaller than the critical value?

  2. What is the degrees of freedom for the chi-square approximation of H when k = 4?

  3. State the mathematical relationship between F and H as demonstrated by Iman and Conover (1981).

Level 2 β€” Application​

  1. Using the formula F=[kβˆ’1Nβˆ’kβ‹…(Nβˆ’1Hβˆ’1)]βˆ’1F = \left[\frac{k-1}{N-k} \cdot \left(\frac{N-1}{H} - 1\right)\right]^{-1}, compute F if k = 3, N = 21, and H = 7.5. Is this F significant at Ξ± = .05 with df = (2, 18)? (Critical F β‰ˆ 3.55)

  2. A researcher runs a Kruskal-Wallis test across 4 groups and finds H = 10.2, df = 3. Is this significant at Ξ± = .05? (Critical χ² = 7.815.) If significant, what post-hoc test would you recommend, and what would the Bonferroni-adjusted Ξ± be?

Level 3 β€” Critical Thinking​

  1. Two researchers analyse the same dataset. Researcher A uses one-way ANOVA (F = 4.1, p = .031, significant). Researcher B uses Kruskal-Wallis (H = 3.8, p = .052, not significant). Both use Ξ± = .05. How is this possible? What does this reveal about the relationship between the two tests?

  2. A colleague argues: "Kruskal-Wallis is always preferable to ANOVA because it makes fewer assumptions." Construct a counter-argument explaining when one-way ANOVA is the better choice. Include statistical power considerations in your answer.


🧠 Memory Aid​

"HAWK soars above both F and H"

  • H = H statistic (Kruskal-Wallis)
  • A = ANOVA equivalent (when rank-transformed)
  • W = Wallis (one of the developers)
  • K = Kruskal (the other developer)

The F-H relationship: Think of it as "F on ranks β‰ˆ H" β€” ranking the data first turns an ANOVA into a Kruskal-Wallis.

Post-hoc reminder: Significant K-W β†’ use Dunn's test (named for the statistician Olive Jean Dunn β€” "Done with Dunn's test after K-W").


πŸ“š External Resources​

Foundational Reading​

Tutorials​

Videos​

Research Articles​

  • πŸ“„ Iman, R. L., & Conover, W. J. (1981). Rank transformations as a bridge between parametric and nonparametric statistics. The American Statistician, 35(3), 124–129. (F-H equivalence)
  • πŸ“„ Zimmerman, D. W., & Zumbo, B. D. (1993). The relative power of parametric and nonparametric statistical methods. A handbook for data analysis in the behavioral sciences, 1, 481–517.
  • πŸ“„ Dunn, O. J. (1964). Multiple comparisons using rank sums. Technometrics, 6(3), 241–252. (Original Dunn's test paper)

Source PDFs: