7.2.2 Two-way ANOVA

Two-way ANOVA handles two categorical variables. Two-way ANOVA can also investigate the interaction of the two categorical variables and its relation to the continuous dependent variable. For a two-way ANOVA the the sums of squares total can be broken down into four sums of squares, the sums of squares of factor A, sums of squares factor B, sums of squares of the interaction of A and B, plus the sums of squares error. Where the relevant sums of squares are denoted below:
SST = i=1a j=1b k=1c(x ijk -x¯...)2,
SSA = bc i=1a(¯x i.. -¯x...)2,
SSB = ac j=1b(¯x .j. -¯x...)2,
SSAB = c i=1a j=1b(¯x ij. -¯xi.. -¯x.j. + ¯x...)2, and
SSE = i=1a j=1b k=1c(x ijk -x¯ij.)2,
where there are a levels for factor A and b levels for factor B and c observations at each factor combination. Thus there are n = abc total observations. For two-way ANOVA with interaction the sums of squares total are broken down as follows:
SST = SSA + SSB + SSAB + SSE
i=1a j=1b k=1c(x ijk -¯x...)2 = bc i=1a(¯x i.. -x¯...)2+
ac j=1b(¯x .j. -¯x...)2+
c i=1a j=1b(¯x ij. -x¯i.. -¯x.j. + ¯x...)2+
i=1a j=1b k=1c(x ijk -¯xij.)2,
where

         c
      1-∑
¯xij. = c     xijk,
        k=1

      1 ∑ b ∑c
¯xi..=  --        xijk,
      bc j=1 k=1

         ∑a ∑ c
¯x  =  1--       x  ,and
 .j.   ac         ijk
         i=1 k=1

       1  ∑a  ∑b ∑ c
x¯...= ----           xijk.
      abc i=1 j=1 k=1

A typical two-way ANOVA table with interaction looks like Table ??.







Source Sum of Squares (SS) Degrees of Freedom Mean Square (MS) F-value





Factor A SSA a - 1 MSA=SSA-
a- 1 MSA--
MSE
Factor B SSB b - 1 MSB=SSB-
 b-1 MSB--
MSE
Factor AB SSAB (a - 1)(b - 1) MSAB=(a-S1S)A(b-1)- MSMASBE--
Error SSE ab(c - 1) MSE=-SSE--
ab(c-1)





Total SST abc - 1






Table 7.3: Two-way ANOVA table with interaction and c observations at each factor combination.