7.
Product and Process Comparisons
7.4. Comparisons based on data from more than two processes 7.4.3. Are the means equal?


Basic Layout  
The balanced twoway factorial layout  Factor \(A\) has 1, 2, ..., \(a\) levels. Factor \(B\) has 1, 2, ..., \(b\) levels. There are \(ab\) treatment combinations (or cells) in a complete factorial layout. Assume that each treatment cell has \(r\) independent obsevations (known as replications). When each cell has the same number of replications, the design is a balanced factorial. In this case, the \(abr\) data points \(\{y_{ijk}\}\) can be shown pictorially as follows: $$ \begin{array}{cccc} & & \mbox{Factor } B \\ \mbox{Factor } A & 1 & 2 & \ldots & b \\ 1 & y_{111}, \, y_{112}, \, \ldots, \, y_{11r} & y_{121}, \, y_{122}, \, \ldots, \, y_{12r} & \ldots & y_{1b1}, \, y_{1b2}, \, \ldots, \, y_{1br} \\ 2 & y_{211}, \, y_{212}, \, \ldots, \, y_{21r} & y_{221}, \, y_{222}, \, \ldots, \, y_{22r} & \ldots & y_{2b1}, \, y_{2b2}, \, \ldots, \, y_{2br} \\ \vdots & \vdots & \vdots & \ldots & \vdots \\ a & y_{a11}, \, y_{a12}, \, \ldots, \, y_{a1r} & y_{a21}, \, y_{a22}, \, \ldots, \, y_{a2r} & \ldots & y_{ab1}, \, y_{ab2}, \, \ldots, \, y_{abr} \\ \end{array} $$  
How to obtain sums of squares for the balanced factorial layout 
Next, we will calculate the sums of squares needed for the ANOVA
table.
Finally, the total number of observations \(n\) in the experiment is \(abr\). With the help of these expressions, we obtain (omitting derivations): $$ \begin{eqnarray} \mbox{CM } & = & \frac{(\mbox{Sum of all observations})^2}{rab} \\ & & \\ SS_{total} & = & \sum (\mbox{each observation})^2  CM \\ & & \\ SS(A) & = & \frac{\sum_{i=1}^a A_i^2}{rb}  CM \\ & & \\ SS(B) & = & \frac{\sum_{j=1}^b B_j^2}{ra}  CM \\ & & \\ SS(AB) & = & \frac{\sum_{i=1}^a \sum_{j=1}^b (AB)_{ij}^2}{r}  CM  SS(A)  SS(B) \\ & & \\ SSE & = & SS_{total}  SS(A)  SS(B)  SS(AB) \end{eqnarray} $$ These expressions are used to calculate the ANOVA table entries for the (fixed effects) twoway ANOVA. 

TwoWay ANOVA Example:  
Data 
An evaluation of a new coating applied to 3 different materials was
conducted at 2 different laboratories. Each laboratory tested 3
samples from each of the treated materials. The results are given
in the next table:


Row and column sums 
The preliminary part of the analysis yields a table of row and
column sums.


ANOVA table 
From this table we generate the ANOVA table.
