In statistics, the two-way analysis of variance (ANOVA) is an extension of the one-way ANOVA that examines the influence of two different categorical independent variables on one continuous dependent variable. The two-way ANOVA not only aims at assessing the main effect of each independent variable but also if there is any interaction between them.
Contents
History
In 1925, Ronald Fisher mentions the two-way ANOVA in his celebrated book from 1925, Statistical Methods for Research Workers (chapters 7 and 8). In 1934, Frank Yates published procedures for the unbalanced case. Since then, an extensive literature has been produced. The topic was reviewed in 1993 by Yasunori Fujikoshi. In 2005, Andrew Gelman proposed a different approach of ANOVA, viewed as a multilevel model.
Data set
Let us imagine a data set for which a dependent variable may be influenced by two factors which are potential sources of variation. The first factor has
From these data, we can build a contingency table, where
The experimental design is balanced if each treatment has the same number of replicates,
Model
Upon observing variation among all
Specifically, the mean of the response variable is modeled as a linear combination of the explanatory variables:
where
An other, equivalent way of describing the two-way ANOVA is by mentioning that, besides the variation explained by the factors, there remains some statistical noise. This amount of unexplained variation is handled via the introduction of one random variable per data point,
Assumptions
Following Gelman and Hill, the assumptions of the ANOVA, and more generally the general linear model, are, in decreasing order of importance:
- the data points are relevant with respect to the scientific question under investigation;
- the mean of the response variable is influenced additively (if not interaction term) and linearly by the factors;
- the errors are independent;
- the errors have the same variance;
- the errors are normally distributed.
Parameter estimation
To ensure identifiability of parameters, we can add the following "sum-to-zero" constraints:
Hypothesis testing
In the classical approach, testing null hypotheses (that the factors have no effect) is achieved via their significance which requires calculating sums of squares.
Testing if the interaction term is significant can be difficult because of the potentially-large number of degrees of freedom.