Two-way ANOVA

From CEOpedia | Management online

Two-way ANOVA, short for two-way analysis of variances and also called two-factorial ANOVA, is a statistical method that is applied to investigate the effect of two categorical independent variables on one dependent variable. Those independent variables are also called factors [1]. In the course of the analysis, three different effects are of interest [2]:

  • Main effect of factor A on the dependent variable
  • Main effect of factor B on the dependent variable
  • Interaction effect of factors A and B

Differences compared to one-way ANOVA

Just like the one-way ANOVA, a two-way ANOVA investigates differences in group means [3]. The main difference lies in the number of independent variables or factors used. While the effect of only one factor on the dependent variable is analyzed for the one-way ANOVA, two-way ANOVA investigates the effects and interaction of two factors [4]. Thus, both row mean differences and column mean differences are investigated. However, the main question of interest is equal to that of the one-way ANOVA [5]:

  • "Why does any given score in our data deviate from the mean of all the data?"

Two-way ANOVA design

For conducting a two-factorial ANOVA one can use either a balanced or unbalanced design. An identical number of observations for each group would be called balanced, while a different number of subjects per group is called unbalanced. However, the main problem of unbalanced designs is that the estimates of main effects might be distorted and therefore might have to be adjusted [6].

With a levels of factor A and b levels of factor B, the resulting data layout has a number of a x b cells, also called treatments. The following table shows a general data layout for two-way ANOVA analyses [7]:

Factor A
Level 1 Level 2 Level 3 Level ...
Level 1 - - - -
Factor B Level 2 - - - -
Level ... - - - -

Two-way ANOVA model

In the following, the model of a two-way ANOVA is shown [8]:

xijk = μ + αi + βj + (αβ)ij + εijk


μ = overall mean

αi = effect factor A, level i

βj = effect factor B, level j

(αβ)ij = interaction effect, levels i,j

εijk = error

Two-way ANOVA hypotheses

When applying a two-way ANOVA, the following three sets of hypotheses are tested [9]:

Main effect of factor A

H0: αi = 0 for all i, meaning there is no difference in means between the groups

H1: Not all αi = 0

Main effect of factor B

H0: βj = 0 for all j, meaning there is no difference in means between the groups

H1: Not all βj = 0

Interaction between A and B

H0: (αβ)ij = 0 for all i and j, meaning there is two-way interaction between levels of the two factors

H1: Not all (αβ)ij = 0

In the course of performing a two-way ANOVA, the third hypothesis concerning the interaction effect is investigated first, as the interpretation of results varies depending on whether an interaction can be found or not [10].

Two-way ANOVA assumptions

There are three assumptions that must be satisfied in order to be able to use an analysis of variances in general [11]:

  • Normality: the investigated groups need to be normally distributed
  • Independence: the investigated groups need to be independent from each other
  • Homogeneity: the investigated groups need to have equal variances

Those assumptions thus also need to be satisfied to be able to perform a two-way ANOVA.


  1. Harring & Johnson 2018, p. 1734
  2. Denis 2021, p. 147
  3. Harring & Johnson 2018, p.1736
  4. Harring & Johnson 2018 p. 1734
  5. Denis 2021, p. 148
  6. Harring & Johnson 2018, p. 1736
  7. Aczel-Sounderpandian 2009, pp. 381, 392
  8. Aczel−Sounderpandian 2009, p. 382
  9. Aczel−Sounderpandian 2009, pp. 382-383
  10. Aczel−Sounderpandian 2009, p. 383
  11. Aczel−Sounderpandian 2009, p. 351

Two-way ANOVArecommended articles
Mann-Whitney U testDescriptive statisticsParametric analysisAdjusted meanRandom errorCluster analysisAttribute control chartMultiple regression analysisThree-Way ANOVA


Author: Leonie Pöter