What is a Nested ANOVA? (Definition & Example)

A nested ANOVA is a type of ANOVA (“analysis of variance”) in which at least one factor is nested inside another factor.

Note: Sometimes a nested ANOVA is called a “hierarchical ANOVA.” These two terms are often used interchangeably.

For example, suppose we would like to know if three different fertilizers produce different levels of plant growth.

To test this, we have three different technicians sprinkle fertilizer A on four plants each, another three technicians sprinkle fertilizer B on four plants each, and another three technicians sprinkle fertilizer C on four plants each.

In this scenario, the response variable is plant growth and the two factors are technician and fertilizer. It turns out that technician is nested within fertilizer:

Example of nested ANOVA

Here’s what the raw data would look like:

Example of nested ANOVA dataset

In this scenario, a nested ANOVA can test for two things:

  • Is plant growth equal across each level of factor 1 (fertilizer)?
  • Is plant growth equal across each level of factor 2 (technician)?

When we perform a nested ANOVA (using statistical software like R, Excel, SPSS, etc.) , the output will be in the following format:

Nested ANOVA output

Here’s how to interpret the output:

  • Source: The source of the variance
  • Sum of Squares: The sum of the squared deviations
  • df: The degrees of freedom
  • Mean Square: The mean square, calculatead as Sum of Squares / df
  • F-Value: The F-value, calculated as Mean Square / Mean Square Residuals
  • p-value: The p-value that corresponds to the F-value

We can look at the p-value column to determine whether or not each factor has a statistically significant effect on plant growth.

From the table above, we can see that fertilizer has a statistically significant effect on plant growth (p-value < .05) but technician does not (p-value = 0.211).

This tells us that if we’d like to increase plant growth, we should focus on the fertilizer being used rather than the individual technician who is sprinkling the fertilizer.


Here are a few notes to keep in mind about nested ANOVA’s:

1. Nested ANOVA’s can have more than two factors.

In the previous example the nested ANOVA had two factors, one nested inside the other. However, a nested ANOVA could have more than two factors nested inside each other.

2. Nested ANOVA’s are different than two-way ANOVA’s.

In a nested ANOVA, at least one factor is nested inside another factor. This is different from a two-way ANOVA in which there are also two factors but neither factor is nested inside the other.

For example, in the previous scenario suppose each technician sprinkled each type of fertilizer. In this case, we could perform a two-way ANOVA because every possible combination of technique and fertilizer occurred in the dataset.

How to Perform a Nested ANOVA in Practice

The following tutorials explain how to perform a nested ANOVA in Excel and R:

Leave a Reply

Your email address will not be published. Required fields are marked *