Index: The Book of Statistical ProofsStatistical Models ▷ Univariate normal data ▷ Analysis of variance ▷ F-test for interaction in two-way ANOVA

Theorem: Assume the two-way analysis of variance model

\[\label{eq:anova2} \begin{split} y_{ijk} &= \mu + \alpha_i + \beta_j + \gamma_{ij} + \varepsilon_{ijk} \\ \varepsilon_{ijk} &\overset{\mathrm{i.i.d.}}{\sim} \mathcal{N}(0, \sigma^2), \; i = 1, \ldots, a, \; j = 1, \ldots, b, \; k = 1, \dots, n_{ij} \; . \end{split}\]

Then, the test statistic

\[\label{eq:anova2-fia} F_{A \times B} = \frac{\frac{1}{(a-1)(b-1)} \sum_{i=1}^{a} \sum_{j=1}^{b} n_{ij} (\bar{y}_{i j \bullet} - \bar{y}_{i \bullet \bullet} - \bar{y}_{\bullet j \bullet} + \bar{y}_{\bullet \bullet \bullet})^2}{\frac{1}{n-ab} \sum_{i=1}^{a} \sum_{j=1}^{b} \sum_{k=1}^{n_{ij}} (y_{ijk} - \bar{y}_{i j \bullet})^2}\]

follows an F-distribution

\[\label{eq:anova2-fia-h0} F_{A \times B} \sim \mathrm{F}\left( (a-1)(b-1), n-ab \right)\]

under the null hypothesis for the interaction effect of factors A and B

\[\label{eq:anova2-h0} \begin{split} H_0: &\; \gamma_{11} = \ldots = \gamma_{ab} = 0 \\ H_1: &\; \gamma_{ij} \neq 0 \quad \text{for at least one} \quad (i,j) \in \left\lbrace 1, \ldots, a \right\rbrace \times \left\lbrace 1, \ldots, b \right\rbrace \; . \end{split}\]

Proof: Applying Cochran’s theorem for two-analysis of variance, we find that the following squared sums

\[\label{eq:anova2-ss-dist} \begin{split} \frac{\mathrm{SS}_{A \times B}}{\sigma^2} &= \frac{1}{\sigma^2} \sum_{i=1}^{a} \sum_{j=1}^{b} \sum_{k=1}^{n_{ij}} ([\bar{y}_{i j \bullet} - \bar{y}_{i \bullet \bullet} - \bar{y}_{\bullet j \bullet} + \bar{y}_{\bullet \bullet \bullet}] - \gamma_{ij})^2 \\ &= \frac{1}{\sigma^2} \sum_{i=1}^{a} \sum_{j=1}^{b} n_{ij} ([\bar{y}_{i j \bullet} - \bar{y}_{i \bullet \bullet} - \bar{y}_{\bullet j \bullet} + \bar{y}_{\bullet \bullet \bullet}] - \gamma_{ij})^2 \\ \frac{\mathrm{SS}_\mathrm{res}}{\sigma^2} &= \frac{1}{\sigma^2} \sum_{i=1}^{a} \sum_{j=1}^{b} \sum_{k=1}^{n_{ij}} (y_{ijk} - \bar{y}_{i j \bullet})^2 \\ &= \frac{1}{\sigma^2} \sum_{i=1}^{a} \sum_{j=1}^{b} \sum_{k=1}^{n_{ij}} (y_{ijk} - \bar{y}_{i j \bullet})^2 \end{split}\]

are independent and chi-squared distributed:

\[\label{eq:anova2-cochran-s1} \begin{split} \frac{\mathrm{SS}_{A \times B}}{\sigma^2} &\sim \chi^2\left( (a-1)(b-1) \right) \\ \frac{\mathrm{SS}_\mathrm{res}}{\sigma^2} &\sim \chi^2(n-ab) \; . \end{split}\]

Thus, the F-statistic from \eqref{eq:anova2-fia} is equal to the ratio of two independent chi-squared distributed random variables divided by their degrees of freedom

\[\label{eq:anova2-fia-ess-tss} \begin{split} F_{A \times B} &= \frac{(\mathrm{SS}_{A \times B}/\sigma^2)/\left( (a-1)(b-1) \right)}{(\mathrm{SS}_\mathrm{res}/\sigma^2)/(n-ab)} \\ &= \frac{\mathrm{SS}_{A \times B}/\left( (a-1)(b-1) \right)}{\mathrm{SS}_\mathrm{res}/(n-ab)} \\ &\overset{\eqref{eq:anova2-ss-dist}}{=} \frac{\frac{1}{(a-1)(b-1)} \sum_{i=1}^{a} \sum_{j=1}^{b} n_{ij} ([\bar{y}_{i j \bullet} - \bar{y}_{i \bullet \bullet} - \bar{y}_{\bullet j \bullet} + \bar{y}_{\bullet \bullet \bullet}] - \gamma_{ij})^2}{\frac{1}{n-ab} \sum_{i=1}^{a} \sum_{j=1}^{b} \sum_{k=1}^{n_{ij}} (y_{ijk} - \bar{y}_{i j \bullet})^2} \\ &\overset{\eqref{eq:anova2-fia-h0}}{=} \frac{\frac{1}{(a-1)(b-1)} \sum_{i=1}^{a} \sum_{j=1}^{b} n_{ij} (\bar{y}_{i j \bullet} - \bar{y}_{i \bullet \bullet} - \bar{y}_{\bullet j \bullet} + \bar{y}_{\bullet \bullet \bullet})^2}{\frac{1}{n-ab} \sum_{i=1}^{a} \sum_{j=1}^{b} \sum_{k=1}^{n_{ij}} (y_{ijk} - \bar{y}_{i j \bullet})^2} \end{split}\]

which, by definition of the F-distribution, is distributed as

\[\label{eq:anova2-fia-qed} F_{A \times B} \sim \mathrm{F}\left( (a-1)(b-1), n-ab \right)\]

under the null hypothesis for an interaction of A and B.


Metadata: ID: P373 | shortcut: anova2-fia | author: JoramSoch | date: 2022-11-11, 16:09.