ANOVA (Analysis of Variance) › Effect Size: Eta-Squared

Michael BrenndoerferJanuary 5, 20261 min read
Machine Learning from ScratchAll chapters
Part 2 of 9Hypothesis Testing
Chapter 17ANOVA (Analysis of Variance) › Effect Size: Eta-Squared
Reading section 7 of 13 · Effect Size: Eta-Squared · 1 minSection 7 of 13 · 1 min

Book contents

Section 7 of 13 · 1 min read

ANOVA (Analysis of Variance) › Effect Size: Eta-SquaredOne section · Sections in this chapter7 / 13 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Statistical significance tells us whether an effect exists, but not how large it is. Effect size measures quantify practical significance.

Eta-Squared (η2\eta^2)

The most common effect size for ANOVA is eta-squared:

η2=SSBetweenSSTotal\eta^2 = \frac{SS_{Between}}{SS_{Total}}

This represents the proportion of total variance explained by group membership. It ranges from 0 to 1:

η2\eta^2Interpretation
0.01Small effect
0.06Medium effect
0.14+Large effect

In our fertilizer example, η2=0.72\eta^2 = 0.72 is a very large effect: fertilizer type explains 72% of the variation in plant growth.

Omega-Squared (ω2\omega^2)

Eta-squared tends to overestimate the population effect size. Omega-squared provides a less biased estimate:

ω2=SSBetween−(k−1)×MSWithinSSTotal+MSWithin\omega^2 = \frac{SS_{Between} - (k-1) \times MS_{Within}}{SS_{Total} + MS_{Within}}
In[9]:
Code
# Calculate both effect sizes
eta_sq = ss_between / ss_total
omega_sq = (ss_between - (k - 1) * ms_within) / (ss_total + ms_within)

print("Effect Size Measures:")
print("-" * 40)
print(f"Eta-squared (eta^2):     {eta_sq:.3f}")
print(f"Omega-squared (omega^2): {omega_sq:.3f}")
print()
print("Both indicate a very large effect.")
print("Omega-squared is generally preferred as it's less biased.")
Out[9]:
Console
Effect Size Measures:
----------------------------------------
Eta-squared (eta^2):     0.752
Omega-squared (omega^2): 0.726

Both indicate a very large effect.
Omega-squared is generally preferred as it's less biased.