# General Full Factorial Designs

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 Chapter 6: General Full Factorial Designs

 Chapter 6 General Full Factorial Designs

Available Software:
Weibull++

Download Reference Book:
Experiment Design & Analysis (*.pdf)

Experiments with two or more factors are encountered frequently. The best way to carry out such experiments is by using full factorial experiments. These are experiments in which all combinations of factors are investigated in each replicate of the experiment. Full factorial experiments are the only means to completely and systematically study interactions between factors in addition to identifying significant factors. One-factor-at-a-time experiments (where each factor is investigated separately by keeping all the remaining factors constant) do not reveal the interaction effects between the factors. Further, in one-factor-at-a-time experiments, full randomization is not possible.

To illustrate full factorial experiments, consider an experiment where the response is investigated for two factors, ${\displaystyle A\,\!}$ and ${\displaystyle B\,\!}$. Assume that the response is studied at two levels of factor ${\displaystyle A\,\!}$ with ${\displaystyle {{A}_{\text{low}}}\,\!}$ representing the lower level of ${\displaystyle A\,\!}$ and ${\displaystyle {{A}_{\text{high}}}\,\!}$ representing the higher level. Similarly, let ${\displaystyle {{B}_{\text{low}}}\,\!}$ and ${\displaystyle {{B}_{\text{high}}}\,\!}$ represent the two levels of factor ${\displaystyle B\,\!}$ that are being investigated in this experiment. Since there are two factors with two levels, a total of ${\displaystyle 2\times 2=4\,\!}$ combinations exist (${\displaystyle {{A}_{\text{low}}}\,\!}$ - ${\displaystyle {{B}_{\text{low}}}\,\!}$, ${\displaystyle {{A}_{\text{low}}}\,\!}$ - ${\displaystyle {{B}_{\text{high}}}\,\!}$, ${\displaystyle {{A}_{\text{high}}}\,\!}$ - ${\displaystyle {{B}_{\text{low}}}\,\!}$, ${\displaystyle {{A}_{\text{high}}}\,\!}$ - ${\displaystyle {{B}_{\text{high}}}\,\!}$). Thus, four runs are required for each replicate if a factorial experiment is to be carried out in this case. Assume that the response values for each of these four possible combinations are obtained as shown in the next table.

### Investigating Factor Effects

The effect of factor ${\displaystyle A\,\!}$ on the response can be obtained by taking the difference between the average response when ${\displaystyle A\,\!}$ is high and the average response when ${\displaystyle A\,\!}$ is low. The change in the response due to a change in the level of a factor is called the main effect of the factor. The main effect of ${\displaystyle A\,\!}$ as per the response values in the third table is:

{\displaystyle {\begin{aligned}A=&Average{\text{ }}response{\text{ }}at{\text{ }}{{A}_{\text{high}}}-Average{\text{ }}response{\text{ }}at{\text{ }}{{A}_{\text{low}}}\\=&{\frac {45+55}{2}}-{\frac {25+35}{2}}\\=&50-30\\=&20\end{aligned}}\,\!}

Therefore, when ${\displaystyle A\,\!}$ is changed from the lower level to the higher level, the response increases by 20 units. A plot of the response for the two levels of ${\displaystyle A\,\!}$ at different levels of ${\displaystyle B\,\!}$ is shown next. The plot shows that change in the level of ${\displaystyle A\,\!}$ leads to an increase in the response by 20 units regardless of the level of ${\displaystyle B\,\!}$. Therefore, no interaction exists in this case as indicated by the parallel lines on the plot.

The main effect of ${\displaystyle B\,\!}$ can be obtained as:

{\displaystyle {\begin{aligned}B=&Average{\text{ }}response{\text{ }}at{\text{ }}{{B}_{\text{high}}}-Average{\text{ }}response{\text{ }}at{\text{ }}{{B}_{\text{low}}}\\=&{\frac {35+55}{2}}-{\frac {25+45}{2}}\\=&45-35\\=&10\end{aligned}}\,\!}

### Investigating Interactions

Now assume that the response values for each of the four treatment combinations were obtained as shown next.

The main effect of ${\displaystyle A\,\!}$ in this case is:

{\displaystyle {\begin{aligned}A=&Average{\text{ }}response{\text{ }}at{\text{ }}{{A}_{\text{high}}}-Average{\text{ }}response{\text{ }}at{\text{ }}{{A}_{\text{low}}}\\=&{\frac {40+10}{2}}-{\frac {20+30}{2}}\\=&0\end{aligned}}\,\!}

It appears that ${\displaystyle A\,\!}$ does not have an effect on the response. However, a plot of the response of ${\displaystyle A\,\!}$ at different levels of ${\displaystyle B\,\!}$ shows that the response does change with the levels of ${\displaystyle A\,\!}$ but the effect of ${\displaystyle A\,\!}$ on the response is dependent on the level of ${\displaystyle B\,\!}$ (see the figure below).

Therefore, an interaction between ${\displaystyle A\,\!}$ and ${\displaystyle B\,\!}$ exists in this case (as indicated by the non-parallel lines of the figure). The interaction effect between ${\displaystyle A\,\!}$ and ${\displaystyle B\,\!}$ can be calculated as follows:

{\displaystyle {\begin{aligned}AB=&Average{\text{ }}response{\text{ }}at{\text{ }}{{A}_{\text{high}}}{\text{-}}{{B}_{\text{high}}}{\text{ }}and{\text{ }}{{A}_{\text{low}}}{\text{-}}{{B}_{\text{low}}}-\\&Average{\text{ }}response{\text{ }}at{\text{ }}{{A}_{\text{low}}}{\text{-}}{{B}_{\text{high}}}{\text{ }}and{\text{ }}{{A}_{\text{high}}}{\text{-}}{{B}_{\text{low}}}\\=&{\frac {10+20}{2}}-{\frac {40+30}{2}}\\=&-20\end{aligned}}\,\!}

Note that in this case, if a one-factor-at-a-time experiment were used to investigate the effect of factor ${\displaystyle A\,\!}$ on the response, it would lead to incorrect conclusions. For example, if the response at factor ${\displaystyle A\,\!}$ was studied by holding ${\displaystyle B\,\!}$ constant at its lower level, then the main effect of ${\displaystyle A\,\!}$ would be obtained as ${\displaystyle 40-20=20\,\!}$, indicating that the response increases by 20 units when the level of ${\displaystyle A\,\!}$ is changed from low to high. On the other hand, if the response at factor ${\displaystyle A\,\!}$ was studied by holding ${\displaystyle B\,\!}$ constant at its higher level than the main effect of ${\displaystyle A\,\!}$ would be obtained as ${\displaystyle 10-30=-20\,\!}$, indicating that the response decreases by 20 units when the level of ${\displaystyle A\,\!}$ is changed from low to high.

## Analysis of General Factorial Experiments

In Weibull++ DOE folios, factorial experiments are referred to as factorial designs. The experiments explained in this section are referred to as general factorial designs. This is done to distinguish these experiments from the other factorial designs supported by Weibull++ DOE folios (see the figure below).

The other designs (such as the two level full factorial designs that are explained in Two Level Factorial Experiments) are special cases of these experiments in which factors are limited to a specified number of levels. The ANOVA model for the analysis of factorial experiments is formulated as shown next. Assume a factorial experiment in which the effect of two factors, ${\displaystyle A\,\!}$ and ${\displaystyle B\,\!}$, on the response is being investigated. Let there be ${\displaystyle {{n}_{a}}\,\!}$ levels of factor ${\displaystyle A\,\!}$ and ${\displaystyle {{n}_{b}}\,\!}$ levels of factor ${\displaystyle B\,\!}$. The ANOVA model for this experiment can be stated as:

${\displaystyle {{Y}_{ijk}}=\mu +{{\tau }_{i}}+{{\delta }_{j}}+{{(\tau \delta )}_{ij}}+{{\epsilon }_{ijk}}\,\!}$

where:

• ${\displaystyle \mu \,\!}$ represents the overall mean effect
• ${\displaystyle {{\tau }_{i}}\,\!}$ is the effect of the ${\displaystyle i\,\!}$th level of factor ${\displaystyle A\,\!}$ (${\displaystyle i=1,2,...,{{n}_{a}}\,\!}$)
• ${\displaystyle {{\delta }_{j}}\,\!}$ is the effect of the ${\displaystyle j\,\!}$th level of factor ${\displaystyle B\,\!}$ (${\displaystyle j=1,2,...,{{n}_{b}}\,\!}$)
• ${\displaystyle {{(\tau \delta )}_{ij}}\,\!}$ represents the interaction effect between ${\displaystyle A\,\!}$ and ${\displaystyle B\,\!}$
• ${\displaystyle {{\epsilon }_{ijk}}\,\!}$ represents the random error terms (which are assumed to be normally distributed with a mean of zero and variance of ${\displaystyle {{\sigma }^{2}}\,\!}$)
• and the subscript ${\displaystyle k\,\!}$ denotes the ${\displaystyle m\,\!}$ replicates (${\displaystyle k=1,2,...,m\,\!}$)

Since the effects ${\displaystyle {{\tau }_{i}}\,\!}$, ${\displaystyle {{\delta }_{j}}\,\!}$ and ${\displaystyle {{(\tau \delta )}_{ij}}\,\!}$ represent deviations from the overall mean, the following constraints exist:

${\displaystyle {\underset {i=1}{\overset {{n}_{a}}{\mathop {\sum } }}}\,{{\tau }_{i}}=0\,\!}$

${\displaystyle {\underset {j=1}{\overset {{n}_{b}}{\mathop {\sum } }}}\,{{\delta }_{j}}=0\,\!}$

${\displaystyle {\underset {i=1}{\overset {{n}_{a}}{\mathop {\sum } }}}\,{{(\tau \delta )}_{ij}}=0\,\!}$

${\displaystyle {\underset {j=1}{\overset {{n}_{b}}{\mathop {\sum } }}}\,{{(\tau \delta )}_{ij}}=0\,\!}$

### Hypothesis Tests in General Factorial Experiments

These tests are used to check whether each of the factors investigated in the experiment is significant or not. For the previous example, with two factors, ${\displaystyle A\,\!}$ and ${\displaystyle B\,\!}$, and their interaction, ${\displaystyle AB\,\!}$, the statements for the hypothesis tests can be formulated as follows:

{\displaystyle {\begin{aligned}&{\begin{matrix}1.&{}\\\end{matrix}}{{H}_{0}}:{{\tau }_{1}}={{\tau }_{2}}=...={{\tau }_{{n}_{a}}}=0{\text{ (Main effect of }}A{\text{ is absent)}}\\&{\begin{matrix}{}&{}\\\end{matrix}}{{H}_{1}}:{{\tau }_{i}}\neq 0{\text{ for at least one }}i\\&{\begin{matrix}2.&{}\\\end{matrix}}{{H}_{0}}:{{\delta }_{1}}={{\delta }_{2}}=...={{\delta }_{{n}_{b}}}=0{\text{ (Main effect of }}B{\text{ is absent)}}\\&{\begin{matrix}{}&{}\\\end{matrix}}{{H}_{1}}:{{\delta }_{j}}\neq 0{\text{ for at least one }}j\\&{\begin{matrix}3.&{}\\\end{matrix}}{{H}_{0}}:{{(\tau \delta )}_{11}}={{(\tau \delta )}_{12}}=...={{(\tau \delta )}_{{{n}_{a}}{{n}_{b}}}}=0{\text{ (Interaction }}AB{\text{ is absent)}}\\&{\begin{matrix}{}&{}\\\end{matrix}}{{H}_{1}}:{{(\tau \delta )}_{ij}}\neq 0{\text{ for at least one }}ij\end{aligned}}\,\!}

The test statistics for the three tests are as follows:

1)${\displaystyle {(F_{0})}_{A}={\frac {MS_{A}}{MS_{E}}}\,\!}$
where ${\displaystyle MS_{A}\,\!}$ is the mean square due to factor ${\displaystyle {A}\,\!}$ and ${\displaystyle {MS_{E}}\,\!}$ is the error mean square.

2)${\displaystyle {(F_{0})_{B}}={\frac {MS_{B}}{MS_{E}}}\,\!}$
where ${\displaystyle MS_{B}\,\!}$ is the mean square due to factor ${\displaystyle B\,\!}$ and ${\displaystyle MS_{E}\,\!}$ is the error mean square.

3)${\displaystyle {(F_{0})_{AB}}={\frac {MS_{AB}}{MS_{E}}}\,\!}$
where ${\displaystyle MS_{AB}\,\!}$ is the mean square due to interaction ${\displaystyle AB\,\!}$ and ${\displaystyle MS_{E}\,\!}$ is the error mean square.

The tests are identical to the partial ${\displaystyle F\,\!}$ test explained in Multiple Linear Regression Analysis. The sum of squares for these tests (to obtain the mean squares) are calculated by splitting the model sum of squares into the extra sum of squares due to each factor. The extra sum of squares calculated for each of the factors may either be partial or sequential. For the present example, if the extra sum of squares used is sequential, then the model sum of squares can be written as:

${\displaystyle S{{S}_{TR}}=S{{S}_{A}}+S{{S}_{B}}+S{{S}_{AB}}\,\!}$

where ${\displaystyle S{{S}_{TR}}\,\!}$ represents the model sum of squares, ${\displaystyle S{{S}_{A}}\,\!}$ represents the sequential sum of squares due to factor ${\displaystyle A\,\!}$, ${\displaystyle S{{S}_{B}}\,\!}$ represents the sequential sum of squares due to factor and ${\displaystyle S{{S}_{AB}}\,\!}$ represents the sequential sum of squares due to the interaction ${\displaystyle AB\,\!}$. The mean squares are obtained by dividing the sum of squares by the associated degrees of freedom. Once the mean squares are known the test statistics can be calculated. For example, the test statistic to test the significance of factor ${\displaystyle A\,\!}$ (or the hypothesis ${\displaystyle {{H}_{0}}:{{\tau }_{i}}=0\,\!}$) can then be obtained as:

{\displaystyle {\begin{aligned}{{({{F}_{0}})}_{A}}=&{\frac {M{{S}_{A}}}{M{{S}_{E}}}}\\=&{\frac {S{{S}_{A}}/dof(S{{S}_{A}})}{S{{S}_{E}}/dof(S{{S}_{E}})}}\end{aligned}}\,\!}

Similarly the test statistic to test significance of factor ${\displaystyle B\,\!}$ and the interaction ${\displaystyle AB\,\!}$ can be respectively obtained as:

{\displaystyle {\begin{aligned}{{({{F}_{0}})}_{B}}=&{\frac {M{{S}_{B}}}{M{{S}_{E}}}}\\=&{\frac {S{{S}_{B}}/dof(S{{S}_{B}})}{S{{S}_{E}}/dof(S{{S}_{E}})}}\\{{({{F}_{0}})}_{AB}}=&{\frac {M{{S}_{AB}}}{M{{S}_{E}}}}\\=&{\frac {S{{S}_{AB}}/dof(S{{S}_{AB}})}{S{{S}_{E}}/dof(S{{S}_{E}})}}\end{aligned}}\,\!}

It is recommended to conduct the test for interactions before conducting the test for the main effects. This is because, if an interaction is present, then the main effect of the factor depends on the level of the other factors and looking at the main effect is of little value. However, if the interaction is absent then the main effects become important.

#### Example

Consider an experiment to investigate the effect of speed and type of fuel additive used on the mileage of a sport utility vehicle. Three speeds and two types of fuel additives are investigated. Each of the treatment combinations are replicated three times. The mileage values observed are displayed in the table below.

The experimental design for the data is shown in the figure below.

In the figure, the factor Speed is represented as factor ${\displaystyle A\,\!}$ and the factor Fuel Additive is represented as factor ${\displaystyle B\,\!}$. The experimenter would like to investigate if speed, fuel additive or the interaction between speed and fuel additive affects the mileage of the sport utility vehicle. In other words, the following hypotheses need to be tested:

{\displaystyle {\begin{aligned}&{\begin{matrix}1.&{}\\\end{matrix}}{{H}_{0}}:{{\tau }_{1}}={{\tau }_{2}}={{\tau }_{3}}=0{\text{ (No main effect of factor }}A{\text{, speed)}}\\&{\begin{matrix}{}&{}\\\end{matrix}}{{H}_{1}}:{{\tau }_{i}}\neq 0{\text{ for at least one }}i\\&{\begin{matrix}2.&{}\\\end{matrix}}{{H}_{0}}:{{\delta }_{1}}={{\delta }_{2}}={{\delta }_{3}}=0{\text{ (No main effect of factor }}B{\text{, fuel additive)}}\\&{\begin{matrix}{}&{}\\\end{matrix}}{{H}_{1}}:{{\delta }_{j}}\neq 0{\text{ for at least one }}j\\&{\begin{matrix}3.&{}\\\end{matrix}}{{H}_{0}}:{{(\tau \delta )}_{11}}={{(\tau \delta )}_{12}}=...={{(\tau \delta )}_{33}}=0{\text{ (No interaction }}AB{\text{)}}\\&{\begin{matrix}{}&{}\\\end{matrix}}{{H}_{1}}:{{(\tau \delta )}_{ij}}\neq 0{\text{ for at least one }}ij\end{aligned}}\,\!}

The test statistics for the three tests are:

1.${\displaystyle {{({{F}_{0}})}_{A}}={\frac {M{{S}_{A}}}{M{{S}_{E}}}}\,\!}$
where ${\displaystyle M{{S}_{A}}\,\!}$ is the mean square for factor ${\displaystyle A\,\!}$ and ${\displaystyle M{{S}_{E}}\,\!}$ is the error mean square

2.${\displaystyle {{({{F}_{0}})}_{B}}={\frac {M{{S}_{B}}}{M{{S}_{E}}}}\,\!}$
where ${\displaystyle M{{S}_{B}}\,\!}$ is the mean square for factor ${\displaystyle B\,\!}$ and ${\displaystyle M{{S}_{E}}\,\!}$ is the error mean square

3.${\displaystyle {{({{F}_{0}})}_{AB}}={\frac {M{{S}_{AB}}}{M{{S}_{E}}}}\,\!}$
where ${\displaystyle M{{S}_{AB}}\,\!}$ is the mean square for interaction ${\displaystyle AB\,\!}$ and ${\displaystyle M{{S}_{E}}\,\!}$ is the error mean square

The ANOVA model for this experiment can be written as:

${\displaystyle {{Y}_{ijk}}=\mu +{{\tau }_{i}}+{{\delta }_{j}}+{{(\tau \delta )}_{ij}}+{{\epsilon }_{ijk}}\,\!}$

where ${\displaystyle {{\tau }_{i}}\,\!}$ represents the ${\displaystyle i\,\!}$th treatment of factor ${\displaystyle A\,\!}$ (speed) with ${\displaystyle i\,\!}$ =1, 2, 3; ${\displaystyle {{\delta }_{j}}\,\!}$ represents the ${\displaystyle j\,\!}$th treatment of factor ${\displaystyle B\,\!}$ (fuel additive) with ${\displaystyle j\,\!}$ =1, 2; and ${\displaystyle {{(\tau \delta )}_{ij}}\,\!}$ represents the interaction effect. In order to calculate the test statistics, it is convenient to express the ANOVA model of the equation given above in the form ${\displaystyle y=X\beta +\epsilon \,\!}$. This can be done as explained next.

#### Expression of the ANOVA Model as y = ΧΒ + ε

Since the effects ${\displaystyle {{\tau }_{i}}\,\!}$, ${\displaystyle {{\delta }_{j}}\,\!}$ and ${\displaystyle {{(\tau \delta )}_{ij}}\,\!}$ represent deviations from the overall mean, the following constraints exist. Constraints on ${\displaystyle {{\tau }_{i}}\,\!}$ are:

{\displaystyle {\begin{aligned}{\underset {i=1}{\overset {3}{\mathop {\sum } }}}\,{{\tau }_{i}}=&0\\{\text{or }}{{\tau }_{1}}+{{\tau }_{2}}+{{\tau }_{3}}=&0\end{aligned}}\,\!}

Therefore, only two of the ${\displaystyle {{\tau }_{i}}\,\!}$ effects are independent. Assuming that ${\displaystyle {{\tau }_{1}}\,\!}$ and ${\displaystyle {{\tau }_{2}}\,\!}$ are independent, ${\displaystyle {{\tau }_{3}}=-({{\tau }_{1}}+{{\tau }_{2}})\,\!}$. (The null hypothesis to test the significance of factor ${\displaystyle A\,\!}$ can be rewritten using only the independent effects as ${\displaystyle {{H}_{0}}:{{\tau }_{1}}={{\tau }_{2}}=0\,\!}$.) The DOE folio displays only the independent effects because only these effects are important to the analysis. The independent effects, ${\displaystyle {{\tau }_{1}}\,\!}$ and ${\displaystyle {{\tau }_{2}}\,\!}$, are displayed as A[1] and A[2] respectively because these are the effects associated with factor ${\displaystyle A\,\!}$ (speed). Constraints on ${\displaystyle {{\delta }_{j}}\,\!}$ are:

{\displaystyle {\begin{aligned}{\underset {j=1}{\overset {2}{\mathop {\sum } }}}\,{{\delta }_{j}}=&0\\{\text{or }}{{\delta }_{1}}+{{\delta }_{2}}=&0\end{aligned}}\,\!}

Therefore, only one of the ${\displaystyle {{\delta }_{j}}\,\!}$ effects are independent. Assuming that ${\displaystyle {{\delta }_{1}}\,\!}$ is independent, ${\displaystyle {{\delta }_{2}}=-{{\delta }_{1}}\,\!}$. (The null hypothesis to test the significance of factor ${\displaystyle B\,\!}$ can be rewritten using only the independent effect as ${\displaystyle {{H}_{0}}:{{\delta }_{1}}=0\,\!}$.) The independent effect ${\displaystyle {{\delta }_{1}}\,\!}$ is displayed as B:B in the DOE folio. Constraints on ${\displaystyle {{(\tau \delta )}_{ij}}\,\!}$ are:

{\displaystyle {\begin{aligned}{\underset {i=1}{\overset {3}{\mathop {\sum } }}}\,{{(\tau \delta )}_{ij}}=&0\\{\text{and }}{\underset {j=1}{\overset {2}{\mathop {\sum } }}}\,{{(\tau \delta )}_{ij}}=&0\\{\text{or }}{{(\tau \delta )}_{11}}+{{(\tau \delta )}_{21}}+{{(\tau \delta )}_{31}}=&0\\{{(\tau \delta )}_{12}}+{{(\tau \delta )}_{22}}+{{(\tau \delta )}_{32}}=&0\\{\text{and }}{{(\tau \delta )}_{11}}+{{(\tau \delta )}_{12}}=&0\\{{(\tau \delta )}_{21}}+{{(\tau \delta )}_{22}}=&0\\{{(\tau \delta )}_{31}}+{{(\tau \delta )}_{32}}=&0\end{aligned}}\,\!}

The last five equations given above represent four constraints, as only four of these five equations are independent. Therefore, only two out of the six ${\displaystyle {{(\tau \delta )}_{ij}}\,\!}$ effects are independent. Assuming that ${\displaystyle {{(\tau \delta )}_{11}}\,\!}$ and ${\displaystyle {{(\tau \delta )}_{21}}\,\!}$ are independent, the other four effects can be expressed in terms of these effects. (The null hypothesis to test the significance of interaction ${\displaystyle AB\,\!}$ can be rewritten using only the independent effects as ${\displaystyle {{H}_{0}}:{{(\tau \delta )}_{11}}={{(\tau \delta )}_{21}}=0\,\!}$.) The effects ${\displaystyle {{(\tau \delta )}_{11}}\,\!}$ and ${\displaystyle {{(\tau \delta )}_{21}}\,\!}$ are displayed as A[1]B and A[2]B respectively in the DOE folio.

The regression version of the ANOVA model can be obtained using indicator variables, similar to the case of the single factor experiment in Fitting ANOVA Models. Since factor ${\displaystyle A\,\!}$ has three levels, two indicator variables, ${\displaystyle {{x}_{1}}\,\!}$ and ${\displaystyle {{x}_{2}}\,\!}$, are required which need to be coded as shown next:

{\displaystyle {\begin{aligned}{\text{Treatment Effect }}{{\tau }_{1}}:&{{x}_{1}}=1,{\text{ }}{{x}_{2}}=0\\{\text{Treatment Effect }}{{\tau }_{2}}:&{{x}_{1}}=0,{\text{ }}{{x}_{2}}=1{\text{ }}\\{\text{Treatment Effect }}{{\tau }_{3}}:&{{x}_{1}}=-1,{\text{ }}{{x}_{2}}=-1{\text{ }}\end{aligned}}\,\!}

Factor ${\displaystyle B\,\!}$ has two levels and can be represented using one indicator variable, ${\displaystyle {{x}_{3}}\,\!}$, as follows:

{\displaystyle {\begin{aligned}{\text{Treatment Effect }}{{\delta }_{1}}:&{{x}_{3}}=1\\{\text{Treatment Effect }}{{\delta }_{2}}:&{{x}_{3}}=-1\end{aligned}}\,\!}

The ${\displaystyle AB\,\!}$ interaction will be represented by all possible terms resulting from the product of the indicator variables representing factors ${\displaystyle A\,\!}$ and ${\displaystyle B\,\!}$. There are two such terms here - ${\displaystyle {{x}_{1}}{{x}_{3}}\,\!}$ and ${\displaystyle {{x}_{2}}{{x}_{3}}\,\!}$. The regression version of the ANOVA model can finally be obtained as:

${\displaystyle Y=\mu +{{\tau }_{1}}\cdot {{x}_{1}}+{{\tau }_{2}}\cdot {{x}_{2}}+{{\delta }_{1}}\cdot {{x}_{3}}+{{(\tau \delta )}_{11}}\cdot {{x}_{1}}{{x}_{3}}+{{(\tau \delta )}_{21}}\cdot {{x}_{2}}{{x}_{3}}+\epsilon \,\!}$

In matrix notation this model can be expressed as:

${\displaystyle y=X\beta +\epsilon \,\!}$

where:

${\displaystyle y=\left[{\begin{matrix}{{Y}_{111}}\\{{Y}_{211}}\\{{Y}_{311}}\\{{Y}_{121}}\\{{Y}_{221}}\\{{Y}_{321}}\\{{Y}_{112}}\\{{Y}_{212}}\\.\\.\\{{Y}_{323}}\\\end{matrix}}\right]=X\beta +\epsilon =\left[{\begin{matrix}1&1&0&1&1&0\\1&0&1&1&0&1\\1&-1&-1&1&-1&-1\\1&1&0&-1&-1&0\\1&0&1&-1&0&-1\\1&-1&-1&-1&1&1\\1&1&0&1&1&0\\1&0&1&1&0&1\\.&.&.&.&.&.\\.&.&.&.&.&.\\1&-1&-1&-1&1&1\\\end{matrix}}\right]\left[{\begin{matrix}\mu \\{{\tau }_{1}}\\{{\tau }_{2}}\\{{\delta }_{1}}\\{{(\tau \delta )}_{11}}\\{{(\tau \delta )}_{21}}\\\end{matrix}}\right]+\left[{\begin{matrix}{{\epsilon }_{111}}\\{{\epsilon }_{211}}\\{{\epsilon }_{311}}\\{{\epsilon }_{121}}\\{{\epsilon }_{221}}\\{{\epsilon }_{321}}\\{{\epsilon }_{112}}\\{{\epsilon }_{212}}\\.\\.\\{{\epsilon }_{323}}\\\end{matrix}}\right]\,\!}$

The vector ${\displaystyle y\,\!}$ can be substituted with the response values from the above table to get:

${\displaystyle y=\left[{\begin{matrix}{{Y}_{111}}\\{{Y}_{211}}\\{{Y}_{311}}\\{{Y}_{121}}\\{{Y}_{221}}\\{{Y}_{321}}\\{{Y}_{112}}\\{{Y}_{212}}\\.\\.\\{{Y}_{323}}\\\end{matrix}}\right]=\left[{\begin{matrix}17.3\\18.9\\17.1\\18.7\\19.1\\18.8\\17.8\\18.2\\.\\.\\18.3\\\end{matrix}}\right]\,\!}$

Knowing ${\displaystyle y\,\!}$, ${\displaystyle X\,\!}$ and ${\displaystyle \beta \,\!}$, the sum of squares for the ANOVA model and the extra sum of squares for each of the factors can be calculated. These are used to calculate the mean squares that are used to obtain the test statistics.

#### Calculation of Sum of Squares for the Model

The model sum of squares, ${\displaystyle S{{S}_{TR}}\,\!}$, for the regression version of the ANOVA model can be obtained as:

{\displaystyle {\begin{aligned}S{{S}_{TR}}=&{{y}^{\prime }}[H-({\frac {1}{{{n}_{a}}\cdot {{n}_{b}}\cdot m}})J]y\\=&{{y}^{\prime }}[H-({\frac {1}{18}})J]y\\=&9.7311\end{aligned}}\,\!}

where ${\displaystyle H\,\!}$ is the hat matrix and ${\displaystyle J\,\!}$ is the matrix of ones. Since five effect terms (${\displaystyle {{\tau }_{1}}\,\!}$, ${\displaystyle {{\tau }_{2}}\,\!}$, ${\displaystyle {{\delta }_{1}}\,\!}$, ${\displaystyle {{(\tau \delta )}_{11}}\,\!}$ and ${\displaystyle {{(\tau \delta )}_{21}}\,\!}$) are used in the model, the number of degrees of freedom associated with ${\displaystyle S{{S}_{TR}}\,\!}$ is five (${\displaystyle dof(S{{S}_{TR}})=5\,\!}$).

The total sum of squares, ${\displaystyle S{{S}_{T}}\,\!}$, can be calculated as:

{\displaystyle {\begin{aligned}S{{S}_{T}}=&{{y}^{\prime }}[I-({\frac {1}{{{n}_{a}}\cdot {{n}_{b}}\cdot m}})J]y\\=&{{y}^{\prime }}[I-({\frac {1}{18}})J]y\\=&10.7178\end{aligned}}\,\!}

Since there are 18 observed response values, the number of degrees of freedom associated with the total sum of squares is 17 (${\displaystyle dof(S{{S}_{T}})=17\,\!}$). The error sum of squares can now be obtained:

{\displaystyle {\begin{aligned}S{{S}_{E}}=&S{{S}_{T}}-S{{S}_{TR}}\\=&10.7178-9.7311\\=&0.9867\end{aligned}}\,\!}

Since there are three replicates of the full factorial experiment, all of the error sum of squares is pure error. (This can also be seen from the preceding figure, where each treatment combination of the full factorial design is repeated three times.) The number of degrees of freedom associated with the error sum of squares is:

{\displaystyle {\begin{aligned}dof(S{{S}_{E}})=&dof(S{{S}_{T}})-dof(S{{S}_{TR}})\\=&17-5\\=&12\end{aligned}}\,\!}

#### Calculation of Extra Sum of Squares for the Factors

The sequential sum of squares for factor ${\displaystyle A\,\!}$ can be calculated as:

{\displaystyle {\begin{aligned}S{{S}_{A}}=&S{{S}_{TR}}(\mu ,{{\tau }_{1}},{{\tau }_{2}})-S{{S}_{TR}}(\mu )\\=&{{y}^{\prime }}[{{H}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}}-({\frac {1}{18}})J]y-0\end{aligned}}\,\!}

where ${\displaystyle {{H}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}}={{X}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}}{{(X_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}^{\prime }{{X}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}})}^{-1}}X_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}^{\prime }\,\!}$ and ${\displaystyle {{X}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}}\,\!}$ is the matrix containing only the first three columns of the ${\displaystyle X\,\!}$ matrix. Thus:

{\displaystyle {\begin{aligned}S{{S}_{A}}=&{{y}^{\prime }}[{{H}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}}-({\frac {1}{18}})J]y-0\\=&4.5811-0\\=&4.5811\end{aligned}}\,\!}

Since there are two independent effects (${\displaystyle {{\tau }_{1}}\,\!}$, ${\displaystyle {{\tau }_{2}}\,\!}$) for factor ${\displaystyle A\,\!}$, the degrees of freedom associated with ${\displaystyle S{{S}_{A}}\,\!}$ are two (${\displaystyle dof(S{{S}_{A}})=2\,\!}$).

Similarly, the sum of squares for factor ${\displaystyle B\,\!}$ can be calculated as:

{\displaystyle {\begin{aligned}S{{S}_{B}}=&S{{S}_{TR}}(\mu ,{{\tau }_{1}},{{\tau }_{2}},{{\delta }_{1}})-S{{S}_{TR}}(\mu ,{{\tau }_{1}},{{\tau }_{2}})\\=&{{y}^{\prime }}[{{H}_{\mu ,{{\tau }_{1}},{{\tau }_{2}},{{\delta }_{1}}}}-({\frac {1}{18}})J]y-{{y}^{\prime }}[{{H}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}}-({\frac {1}{18}})J]y\\=&9.4900-4.5811\\=&4.9089\end{aligned}}\,\!}

Since there is one independent effect, ${\displaystyle {{\delta }_{1}}\,\!}$, for factor ${\displaystyle B\,\!}$, the number of degrees of freedom associated with ${\displaystyle S{{S}_{B}}\,\!}$ is one (${\displaystyle dof(S{{S}_{B}})=1\,\!}$).

The sum of squares for the interaction ${\displaystyle AB\,\!}$ is:

{\displaystyle {\begin{aligned}S{{S}_{AB}}=&S{{S}_{TR}}(\mu ,{{\tau }_{1}},{{\tau }_{2}},{{\delta }_{1}},{{(\tau \delta )}_{11}},{{(\tau \delta )}_{21}})-S{{S}_{TR}}(\mu ,{{\tau }_{1}},{{\tau }_{2}},{{\delta }_{1}})\\=&S{{S}_{TR}}-S{{S}_{TR}}(\mu ,{{\tau }_{1}},{{\tau }_{2}},{{\delta }_{1}})\\=&9.7311-9.4900\\=&0.2411\end{aligned}}\,\!}

Since there are two independent interaction effects, ${\displaystyle {{(\tau \delta )}_{11}}\,\!}$ and ${\displaystyle {{(\tau \delta )}_{21}}\,\!}$, the number of degrees of freedom associated with ${\displaystyle S{{S}_{AB}}\,\!}$ is two (${\displaystyle dof(S{{S}_{AB}})=2\,\!}$).

#### Calculation of the Test Statistics

Knowing the sum of squares, the test statistic for each of the factors can be calculated. Analyzing the interaction first, the test statistic for interaction ${\displaystyle AB\,\!}$ is:

{\displaystyle {\begin{aligned}{{({{f}_{0}})}_{AB}}=&{\frac {M{{S}_{AB}}}{M{{S}_{E}}}}\\=&{\frac {0.2411/2}{0.9867/12}}\\=&1.47\end{aligned}}\,\!}

The ${\displaystyle p\,\!}$ value corresponding to this statistic, based on the ${\displaystyle F\,\!}$ distribution with 2 degrees of freedom in the numerator and 12 degrees of freedom in the denominator, is:

{\displaystyle {\begin{aligned}p{\text{ }}value=&1-P(F\leq {{({{f}_{0}})}_{AB}})\\=&1-0.7307\\=&0.2693\end{aligned}}\,\!}

Assuming that the desired significance level is 0.1, since ${\displaystyle p\,\!}$ value > 0.1, we fail to reject ${\displaystyle {{H}_{0}}:{{(\tau \delta )}_{ij}}=0\,\!}$ and conclude that the interaction between speed and fuel additive does not significantly affect the mileage of the sport utility vehicle. The DOE folio displays this result in the ANOVA table, as shown in the following figure. In the absence of the interaction, the analysis of main effects becomes important.

The test statistic for factor ${\displaystyle A\,\!}$ is:

{\displaystyle {\begin{aligned}{{({{f}_{0}})}_{A}}=&{\frac {M{{S}_{A}}}{M{{S}_{E}}}}\\=&{\frac {S{{S}_{A}}/dof(S{{S}_{A}})}{S{{S}_{E}}/dof(S{{S}_{E}})}}\\=&{\frac {4.5811/2}{0.9867/12}}\\=&27.86\end{aligned}}\,\!}

The ${\displaystyle p\,\!}$ value corresponding to this statistic based on the ${\displaystyle F\,\!}$ distribution with 2 degrees of freedom in the numerator and 12 degrees of freedom in the denominator is:

{\displaystyle {\begin{aligned}p{\text{ }}value=&1-P(F\leq {{({{f}_{0}})}_{A}})\\=&1-0.99997\\=&0.00003\end{aligned}}\,\!}

Since ${\displaystyle p\,\!}$ value < 0.1, ${\displaystyle {{H}_{0}}:{{\tau }_{i}}=0\,\!}$ is rejected and it is concluded that factor ${\displaystyle A\,\!}$ (or speed) has a significant effect on the mileage.

The test statistic for factor ${\displaystyle B\,\!}$ is:

{\displaystyle {\begin{aligned}{{({{f}_{0}})}_{B}}=&{\frac {M{{S}_{B}}}{M{{S}_{E}}}}\\=&{\frac {4.9089/1}{0.9867/12}}\\=&59.7\end{aligned}}\,\!}

The ${\displaystyle p\,\!}$ value corresponding to this statistic based on the ${\displaystyle F\,\!}$ distribution with 2 degrees of freedom in the numerator and 12 degrees of freedom in the denominator is:

{\displaystyle {\begin{aligned}p{\text{ }}value=&1-P(F\leq {{({{f}_{0}})}_{B}})\\=&1-0.999995\\=&0.000005\end{aligned}}\,\!}

Since ${\displaystyle p\,\!}$ value < 0.1, ${\displaystyle {{H}_{0}}:{{\delta }_{j}}=0\,\!}$ is rejected and it is concluded that factor ${\displaystyle B\,\!}$ (or fuel additive type) has a significant effect on the mileage. Therefore, it can be concluded that speed and fuel additive type affect the mileage of the vehicle significantly. The results are displayed in the ANOVA table of the following figure.

#### Calculation of Effect Coefficients

Results for the effect coefficients of the model of the regression version of the ANOVA model are displayed in the Regression Information table in the following figure. Calculations of the results in this table are discussed next. The effect coefficients can be calculated as follows:

{\displaystyle {\begin{aligned}{\hat {\beta }}=&{{({{X}^{\prime }}X)}^{-1}}{{X}^{\prime }}y\\=&\left[{\begin{matrix}18.2889\\-0.2056\\0.6944\\-0.5222\\0.0056\\0.1389\\\end{matrix}}\right]\end{aligned}}\,\!}

Therefore, ${\displaystyle {\hat {\mu }}=18.2889\,\!}$, ${\displaystyle {{\hat {\tau }}_{1}}=-0.2056\,\!}$, ${\displaystyle {{\hat {\tau }}_{2}}=0.6944\,\!}$ etc. As mentioned previously, these coefficients are displayed as Intercept, A[1] and A[2] respectively depending on the name of the factor used in the experimental design. The standard error for each of these estimates is obtained using the diagonal elements of the variance-covariance matrix ${\displaystyle C\,\!}$.

{\displaystyle {\begin{aligned}C=&{{\hat {\sigma }}^{2}}{{({{X}^{\prime }}X)}^{-1}}\\=&M{{S}_{E}}\cdot {{({{X}^{\prime }}X)}^{-1}}\\=&\left[{\begin{matrix}0.0046&0&0&0&0&0\\0&0.0091&-0.0046&0&0&0\\0&-0.0046&0.0091&0&0&0\\0&0&0&0.0046&0&0\\0&0&0&0&0.0091&-0.0046\\0&0&0&0&-0.0046&0.0091\\\end{matrix}}\right]\end{aligned}}\,\!}

For example, the standard error for ${\displaystyle {{\hat {\tau }}_{1}}\,\!}$ is:

{\displaystyle {\begin{aligned}se({{\hat {\tau }}_{1}})=&{\sqrt {{C}_{22}}}\\=&{\sqrt {0.0091}}\\=&0.0956\end{aligned}}\,\!}

Then the ${\displaystyle t\,\!}$ statistic for ${\displaystyle {{\hat {\tau }}_{1}}\,\!}$ can be obtained as:

{\displaystyle {\begin{aligned}{{t}_{0}}=&{\frac {{\hat {\tau }}_{1}}{se({{\hat {\tau }}_{1}})}}\\=&{\frac {-0.2056}{0.0956}}\\=&-2.1506\end{aligned}}\,\!}

The ${\displaystyle p\,\!}$ value corresponding to this statistic is:

Confidence intervals on ${\displaystyle {{\tau }_{1}}\,\!}$ can also be calculated. The 90% limits on ${\displaystyle {{\tau }_{1}}\,\!}$ are:

{\displaystyle {\begin{aligned}=&{{\hat {\tau }}_{1}}\pm {{t}_{\alpha /2,n-(k+1)}}{\sqrt {{C}_{22}}}\\=&{{\tau }_{1}}\pm {{t}_{0.05,12}}{\sqrt {{C}_{22}}}\\=&-0.2056\pm 0.1704\end{aligned}}\,\!}

Thus, the 90% limits on ${\displaystyle {{\tau }_{1}}\,\!}$ are ${\displaystyle -0.3760\,\!}$ and ${\displaystyle -0.0352\,\!}$ respectively. Results for other coefficients are obtained in a similar manner.

### Least Squares Means

The estimated mean response corresponding to the ${\displaystyle i\,\!}$th level of any factor is obtained using the adjusted estimated mean which is also called the least squares mean. For example, the mean response corresponding to the first level of factor ${\displaystyle A\,\!}$ is ${\displaystyle \mu +{{\tau }_{1}}\,\!}$. An estimate of this is ${\displaystyle {\hat {\mu }}+{{\hat {\tau }}_{1}}\,\!}$ or (${\displaystyle 18.2889+(-0.2056)=18.0833\,\!}$). Similarly, the estimated response at the third level of factor ${\displaystyle A\,\!}$ is ${\displaystyle {\hat {\mu }}+{{\hat {\tau }}_{3}}\,\!}$ or ${\displaystyle {\hat {\mu }}+(-{{\hat {\tau }}_{1}}-{{\hat {\tau }}_{2}})\,\!}$ or (${\displaystyle 18.2889+(0.2056-0.6944)=17.8001\,\!}$).

### Residual Analysis

As in the case of single factor experiments, plots of residuals can also be used to check for model adequacy in factorial experiments. Box-Cox transformations are also available in Weibull++ DOE folios for factorial experiments.