# 5.8.5. Example: design and analysis of a three-factor experiment¶

This example should be done by yourself. It is based on Question 19 in the exercises for Chapter 5 in Box, Hunter and Hunter (2nd edition).

The data are from a plastics molding factory that must treat its waste before discharge. The $$y$$-variable represents the average amount of pollutant discharged (lb per day), while the three factors that were varied were

• $$C$$ = the chemical compound added (choose either chemical P or chemical Q)

• $$T$$ = the treatment temperature (72 °F or 100 °F)

• $$S$$ = the stirring speed (200 rpm or 400 rpm)

• $$y$$ = the amount of pollutant discharged (lb per day)

Experiment

Order

$$C$$

$$T$$ [°F]

$$S$$ [rpm]

$$y$$ [lb]

1

5

Choice P

72

200

5

2

6

Choice Q

72

200

30

3

1

Choice P

100

200

6

4

4

Choice Q

100

200

33

5

2

Choice P

72

400

4

6

7

Choice Q

72

400

3

7

3

Choice P

100

400

5

8

8

Choice Q

100

400

4

1. Draw a geometric figure that illustrates the data from this experiment.

2. Calculate the main effect for each factor by hand.

For the C effect, there are four estimates of $$C$$:

$\displaystyle \frac{(+25) + (+27) + (-1) + (-1)}{4} = \frac{50}{4} = \bf{12.5}$

For the T effect, there are four estimates of $$T$$:

$\displaystyle \frac{(+1) + (+3) + (+1) + (+1)}{4} = \frac{6}{4} = \bf{1.5}$

For the S effect, there are four estimates of $$S$$:

$\displaystyle \frac{(-27) + (-1) + (-29) + (-1)}{4} = \frac{-58}{4} = \bf{-14.5}$
3. Calculate the 3 two-factor interactions (2fi) by hand, recalling that interactions are defined as the half difference going from high to low.

For the CT interaction, there are two estimates of $$CT$$. Recall that interactions are calculated as the half difference going from high to low. Consider the change in $$C$$ when

• $$T_\text{high}$$ (at $$S$$ high) = $$4 - 5 = -1$$

• $$T_\text{low}$$ (at $$S$$ high) = $$3 - 4 = -1$$

This gives a first estimate of $$[(-1) - (-1)]/2 = 0$$. Similarly,

• $$T_\text{high}$$ (at $$S$$ low) = $$33 - 6 = +27$$

• $$T_\text{low}$$ (at $$S$$ low) = $$30 - 5 = +25$$

gives a second estimate of $$[(+27) - (+25)]/2 = +1$$.

The average CT interaction is therefore $$(0 + 1)/2 = \mathbf{0.5}$$. You can interchange $$C$$ and $$T$$ and still get the same result.

For the CS interaction, there are two estimates of $$CS$$. Consider the change in $$C$$ when

• $$S_\text{high}$$ (at $$T$$ high) = $$4 - 5 = -1$$

• $$S_\text{low}$$ (at $$T$$ high) = $$33 - 6 = +27$$

This gives a first estimate of $$[(-1) - (+27)]/2 = -14$$. Similarly,

• $$S_\text{high}$$ (at $$T$$ low) = $$3 - 4 = -1$$

• $$S_\text{low}$$ (at $$T$$ low) = $$30 - 5 = +25$$

gives a second estimate of $$[(-1) - (+25)]/2 = -13$$.

The average CS interaction is therefore $$(-13 - 14)/2 = \mathbf{-13.5}$$. You can interchange $$C$$ and $$S$$ and still get the same result.

For the ST interaction, there are two estimates of $$ST$$: $$(-1 + 0)/2 = \mathbf{-0.5}$$. Calculate in the same way as above.

4. Calculate the single three-factor interaction (3fi).

There is only a single estimate of $$CTS$$. The $$CT$$ effect at high $$S$$ is 0, and the $$CT$$ effect at low $$S$$ is $$+1$$. The $$CTS$$ interaction is then $$[(0) - (+1)] / 2 = \mathbf{-0.5}$$.

You can also calculate this by considering the $$CS$$ effect at the two levels of $$T$$, or by considering the $$ST$$ effect at the two levels of $$C$$. All three approaches give the same result.

5. Compute the main effects and interactions using matrix algebra and a least squares model.

$\begin{split}\begin{bmatrix} 5\\30\\6\\33\\4\\3\\5\\4 \end{bmatrix} &= \begin{bmatrix} +1 & -1 & -1 & -1 & +1 & \mathbf{+1} & +1 & -1\\ +1 & +1 & -1 & -1 & -1 & \mathbf{-1} & +1 & +1\\ +1 & -1 & +1 & -1 & -1 & \mathbf{+1} & -1 & +1\\ +1 & +1 & +1 & -1 & +1 & \mathbf{-1} & -1 & -1\\ +1 & -1 & -1 & +1 & +1 & \mathbf{-1} & -1 & +1\\ +1 & +1 & -1 & +1 & -1 & \mathbf{+1} & -1 & -1\\ +1 & -1 & +1 & +1 & -1 & \mathbf{-1} & +1 & -1\\ +1 & +1 & +1 & +1 & +1 & \mathbf{+1} & +1 & +1\\ \end{bmatrix} \begin{bmatrix} b_0 \\ b_C \\ b_T \\ b_{S} \\ b_{CT} \\ b_{CS} \\ b_{TS} \\ b_{CTS} \end{bmatrix} \\ \mathbf{y} &= \mathbf{X} \mathbf{b}\end{split}$
6. Use computer software to build the following model and verify that:

$y = 11.25 + 6.25x_C + 0.75x_T -7.25x_S + 0.25 x_C x_T -6.75 x_C x_S -0.25 x_T x_S - 0.25 x_C x_T x_S$

Learning notes:

• The chemical compound could be coded either as (chemical P = $$-1$$, chemical Q = $$+1$$) or (chemical P = $$+1$$, chemical Q = $$-1$$). The interpretation of the $$x_C$$ coefficient is the same, regardless of the coding.

• Just the tabulation of the raw data gives us some interpretation of the results. Why? Since the variables are manipulated independently, we can just look at the relationship of each factor to $$y$$, without considering the others. It is expected that the chemical compound and speed have a strong effect on $$y$$, but we can also see the chemical $$\times$$ speed interaction. You can see this last interpretation by writing out the full $$\mathbf{X}$$ design matrix and comparing the bold column, associated with the $$b_\text{CS}$$ term, with the $$y$$ column.

A note about magnitude of effects

In this text we quantify the effect as the change in response over half the range of the factor. For example, if the center point is 400 K, the lower level is 375 K and the upper level is 425 K, then an effect of "-5" represents a reduction in $$y$$ of 5 units for every increase of 25 K in $$x$$.

We use this representation because it corresponds with the results calculated from least-squares software. Putting the matrix of $$-1$$ and $$+1$$ entries into the software as $$\mathbf{X}$$, along with the corresponding vector of responses, $$y$$, you can calculate these effects as $$\mathbf{b} = \left(\mathbf{X}^T\mathbf{X}\right)^{-1}\mathbf{X}\mathbf{y}$$.

Other textbooks, specifically Box, Hunter and Hunter, will report effects that are double ours. This is because they consider the effect to be the change from the lower level to the upper level (double the distance). The advantage of their representation is that binary factors (catalyst A or B; agitator on or off) can be readily interpreted, whereas in our notation, the effect is a little harder to describe (simply double it!).

The advantage of our methodology, though, is that the results calculated by hand would be the same as those from any computer software with respect to the magnitude of the coefficients and the standard errors, particularly in the case of duplicate runs and experiments with center points.

Remember: our effects are half those reported in Box, Hunter and Hunter, and in some other textbooks; our standard error would also be half of theirs. The conclusions drawn will always be the same, as long as one is consistent.