Tutorials › ANOVA › Calculating Eta-Squared From an ANOVA Table

Effect Sizes and Power · Tutorial 103 of 595

Calculating Eta-Squared From an ANOVA Table

Calculate eta-squared from ANOVA sums of squares and describe what the resulting proportion says about group membership and the observed outcome variation.

Intermediate 10 min read

What You'll Learn

  • Identify the between-group and corrected total sums of squares in a one-factor ANOVA table
  • Calculate eta-squared as the between-group sum of squares divided by the total sum of squares
  • Recover total variation when an ANOVA table reports only between-group and within-group sums of squares
  • Interpret eta-squared as an observed proportion of outcome variation associated with group membership
  • Distinguish effect-size calculation from assumptions needed for ANOVA inference
  • Avoid treating eta-squared as a causal effect or as a measure of statistical significance

Why Calculate Eta-Squared?

An ANOVA F statistic addresses whether the observed differences among group means are large relative to within-group variation. An effect size answers a different question: how much of the outcome variation in these data is associated with differences between the groups? Eta-squared, written \(\eta^2\), summarizes this proportion for a one-factor ANOVA. It can be calculated directly from the sums of squares in the ANOVA table.

The calculation is short, but its interpretation depends on using the correct denominator. In a standard one-factor ANOVA, eta-squared compares the between-group sum of squares with the corrected total sum of squares. It is a description of the variation in the observed data, not a p-value and not, by itself, evidence that group membership caused the outcome differences.

The ANOVA Model and Sums of Squares

Consider \(k\) groups and a quantitative outcome. Let \(x_{ij}\) be the outcome for observation \(j\) in group \(i\), where \(i=1,\ldots,k\) and \(j=1,\ldots,n_i\). The total sample size is \(N=\sum_{i=1}^{k}n_i\). Let \(\bar{x}_i\) be the sample mean in group \(i\), and let \(\bar{x}\) be the grand mean across all \(N\) observations.

The usual one-factor fixed-effects ANOVA model writes each observation as its group mean plus an error: \(x_{ij}=\mu_i+\epsilon_{ij}\). For the standard inferential F procedure, the errors are assumed to be independent, normally distributed with mean zero, and to have a common variance across groups. In practice, independence is justified by the study design, while the distributional and equal-variance assumptions are assessed using the data and relevant diagnostics. The calculation of eta-squared from observed sums of squares is descriptive and can still be performed if those inferential assumptions are doubtful; the assumptions matter for the usual ANOVA inference and its interpretation.

The corrected total sum of squares measures the overall spread of the observations around the grand mean. The between-group sum of squares measures the spread of the group means around that grand mean, weighted by group size. The within-group sum of squares measures the spread of observations around their own group means.

Definition: For a one-factor ANOVA with positive corrected total sum of squares, eta-squared is the between-group sum of squares divided by the corrected total sum of squares: $$ \eta^2=\frac{SS_{\text{between}}}{SS_{\text{total}}}. $$ Here \(SS_{\text{total}}\) is the corrected total sum of squares, calculated around the grand mean. In the usual ANOVA partition, \(SS_{\text{total}}=SS_{\text{between}}+SS_{\text{within}}\).

The formula gives a value from 0 to 1. A value of 0 means the group means contribute none of the observed corrected total variation; a value of 1 means there is no within-group variation and all observed variation is between groups. Intermediate values describe the share of observed outcome variation represented by differences among the group means.

Why the Sum-of-Squares Partition Works

The denominator must represent total variation across all observations, while the numerator represents the part associated with group differences. The standard ANOVA identity makes this partition explicit. For each observation, add and subtract its group mean:

$$ x_{ij}-\bar{x}=(x_{ij}-\bar{x}_i)+(\bar{x}_i-\bar{x}). $$

Squaring and summing these deviations gives the total sum of squares. The cross-product term vanishes because the deviations from each group mean sum to zero within that group:

$$ \begin{aligned} SS_{\text{total}} &=\sum_{i=1}^{k}\sum_{j=1}^{n_i}(x_{ij}-\bar{x})^2\\ &=\sum_{i=1}^{k}\sum_{j=1}^{n_i}(x_{ij}-\bar{x}_i)^2 +\sum_{i=1}^{k}n_i(\bar{x}_i-\bar{x})^2\\ &\quad+2\sum_{i=1}^{k}(\bar{x}_i-\bar{x}) \sum_{j=1}^{n_i}(x_{ij}-\bar{x}_i)\\ &=SS_{\text{within}}+SS_{\text{between}}. \end{aligned} $$

The final equality follows from \(\sum_{j=1}^{n_i}(x_{ij}-\bar{x}_i)=0\) for every group \(i\), so the cross-product term is zero. Thus the between-group and within-group sums of squares account for the corrected total variation. Dividing the between-group part by the total gives the observed proportion represented by group differences.

Reading the ANOVA Table

An ANOVA table commonly lists a source of variation, degrees of freedom, sum of squares, mean square, and an F statistic. To calculate eta-squared, the essential entries are the between-group and corrected total sums of squares. Some tables call the between-group source “Between Groups,” “Factor,” or “Treatment.” The within-group source may be called “Error” or “Residual.” Use the row labels and table notes to identify the corrected total.

ANOVA sourceTypical sum-of-squares labelRole in eta-squared
Between groups\(SS_{\text{between}}\)Numerator: variation represented by group mean differences
Within groups\(SS_{\text{within}}\)Used to recover the total if needed
Corrected total\(SS_{\text{total}}\)Denominator: overall variation around the grand mean

If the total row is absent but the between-group and within-group sums of squares are reported, add them to obtain the corrected total. Do not use the mean square error as the denominator: it is the within-group sum of squares divided by its degrees of freedom, not the total sum of squares.

Worked Example: Calculating Eta-Squared From a Complete Table

Suppose a hypothetical study compares a quantitative symptom score across three treatment groups. There are 15 independent participants, each measured once. The design and diagnostics are taken to support the usual ANOVA assumptions of independent errors, approximate normality within groups, and common variance. The ANOVA table reports:

SourcedfSum of squaresMean squareF
Between groups248241.895
Within groups1215212.667
Corrected total14200

The table is internally consistent: \(48+152=200\), and the degrees of freedom add as \(2+12=14\). Eta-squared uses the between-group sum of squares as the numerator and the corrected total sum of squares as the denominator:

$$ \eta^2=\frac{SS_{\text{between}}}{SS_{\text{total}}} =\frac{48}{200}=0.240. $$

In these hypothetical data, 24.0% of the observed variation in symptom scores around the grand mean is represented by differences among the three group means. The remaining 76.0% is within-group variation, since \(152/200=0.760\). This is an observed-data interpretation; it does not establish that treatment assignment caused 24.0% of symptom variation.

Worked Example: Recovering the Total Sum of Squares

A hypothetical educational study compares test scores among three instructional groups. Each student contributes one independent score, and the design and diagnostics are taken to support the usual ANOVA assumptions. The table reports \(SS_{\text{between}}=36\) and \(SS_{\text{within}}=84\), but omits the corrected total row. Calculate eta-squared.

First obtain the total from the sum-of-squares partition:

$$ SS_{\text{total}}=SS_{\text{between}}+SS_{\text{within}} =36+84=120. $$

Then substitute into the definition:

$$ \eta^2=\frac{36}{120}=0.300. $$

The group mean differences represent 30.0% of the observed variation in scores in this hypothetical sample. The within-group share is \(84/120=0.700\), or 70.0%, and the two shares sum to 100%. The missing total row does not prevent the calculation because the one-factor ANOVA partition determines it from the two component sums of squares.

Worked Example: Calculating Eta-Squared With More Than Three Groups

A hypothetical laboratory exercise compares a continuous measurement across four independently sampled procedure groups. Assume the observations are independent and that the normality and common-variance conditions are judged reasonable from the design and diagnostics. The reported table gives \(SS_{\text{between}}=27.6\), \(SS_{\text{within}}=64.4\), and \(SS_{\text{total}}=92.0\). Verify the total and calculate the effect size.

The sum-of-squares check is:

$$ 27.6+64.4=92.0. $$

Using the corrected total as the denominator:

$$ \eta^2=\frac{27.6}{92.0}=0.300. $$

In these hypothetical data, 30.0% of the observed variation in the laboratory measurement is associated with differences among the four group means. The percentage does not tell us which groups differ, or how far apart their means are in measurement units. Those questions require information beyond this single effect-size calculation.

What Eta-Squared Does and Does Not Say

Eta-squared is useful because it puts the between-group variation on a scale from 0 to 1 and expresses it as a proportion. For example, \(\eta^2=0.24\) can be described as 24% of the observed corrected total variation being represented by group differences. This gives a sense of the magnitude of the group pattern in the data that is distinct from whether an F test is statistically significant.

It is not the probability that an observation will be classified correctly, the probability that the null hypothesis is true, or the percentage change in the outcome. It has no outcome units: the units cancel in the ratio of two sums of squared deviations. It also does not say that group membership caused the variation. A causal interpretation depends on the study design and its assumptions, not on the arithmetic of eta-squared.

Eta-squared also does not identify the pattern of group means. The same value can arise when one group differs from the others, when several groups differ in an ordered pattern, or when the groups have another configuration. To describe which groups differ, report their means and use suitable comparisons. The effect-size value alone does not provide those comparisons.

Common Mistakes

  • Using the wrong denominator. Dividing by \(SS_{\text{within}}\) does not calculate eta-squared. Use the corrected total sum of squares, or first add between- and within-group sums of squares to recover it.
  • Using a mean square instead of a sum of squares. A mean square has already been divided by degrees of freedom. Eta-squared is defined using sums of squares, not the F statistic's numerator and denominator mean squares.
  • Calling the value a percentage of the outcome itself. Eta-squared is a proportion of observed variation, not a percentage increase or decrease in the outcome. State that it describes variation around the grand mean.
  • Treating the effect size as proof of causation or significance. Eta-squared is an observed-data summary. A causal claim requires an appropriate design, and a significance conclusion requires the inferential test and its conditions.

A reliable calculation follows the same sequence: identify the between-group sum of squares, identify or reconstruct the corrected total, divide, and then interpret the result as a proportion of observed variation in context.

Check Your Understanding

Answer each question using the definition and the ANOVA sum-of-squares partition.

  1. An ANOVA table reports \(SS_{\text{between}}=18\) and \(SS_{\text{within}}=42\). What is the corrected total sum of squares, and what is eta-squared?
  2. In a one-factor ANOVA table, which sum of squares belongs in the denominator of eta-squared? Explain what it measures.
  3. If \(\eta^2=0.15\), give a correct interpretation in context that does not claim a causal effect.
  4. Why is \(MS_{\text{within}}\) not a substitute for \(SS_{\text{total}}\) in the eta-squared formula?
  5. Can two analyses with the same eta-squared have different patterns of group means? Explain briefly.
Clinical Biostats