Design and analysis of experiments (2011)

Course notes

 * [[Image:Nuvola_mimetypes_pdf.png|20px|link=http://learnche.org/pid]] (PDF) Course notes
 * Please print pages from Chapter 5.
 * The full PDF is provided so that hyperlinks for cross-sections will work as expected.

Projector overheads
class_date       = 7 March: covered slides 1 to 12 9 March: covered slides 16 to 28 10 March: covered slides 29 to 42 16 March: covered slides 42, 46 to 50, 63 to 66 17 March: guest speaker 21 March: covered slides 67 to 76 23 March: covered 77 to 88, and 103-107 24 March: covered 108 to 119 button_label     = Create my projector slides! show_page_layout = 1 show_frame_option = 1 pdf_file         = Overheads-DOE-2011.pdf

Guest speaker overheads
class_date       = 17 March button_label     = Create my projector slides! show_page_layout = 1 show_frame_option = 1 pdf_file         = Stats-Class-DOE-Presentation-Emily-Nichols.pdf

Audio recordings of 2011 classes
Thanks to the various students responsible for recording and making these files available

3-factor example
 The data are from a plastics molding factory which must treat its waste before discharge. The :math:`y` variable represents the average amount of pollutant discharged [lb per day], while the 3 factors that were varied were:

-	:math:`C`: the chemical compound added [A or B]	-	:math:`T`: the treatment temperature [72°F or 100°F] -	:math:`S`: the stirring speed [200 rpm or 400 rpm] -	:math:`y`: the amount of pollutant discharged [lb per day]

.. tabularcolumns:: |l|l||c|c|c||c|

+---+---+---+-+-+-+	| Experiment| Order | :math:`C`    | :math:`T` [°F]  | :math:`S` [rpm] | :math:`y` [lb]  | +===========+=======+===============+=================+=================+=================+	| 1        | 5     | A             | 72              | 200             | 5               | +---+---+---+-+-+-+	| 2        | 6     | B             | 72              | 200             | 30              | +---+---+---+-+-+-+	| 3        | 1     | A             | 100             | 200             | 6               | +---+---+---+-+-+-+	| 4        | 4     | B             | 100             | 200             | 33              | +---+---+---+-+-+-+	| 5        | 2     | A             | 72              | 400             | 4               | +---+---+---+-+-+-+	| 6        | 7     | B             | 72              | 400             | 3               | +---+---+---+-+-+-+	| 7        | 3     | A             | 100             | 400             | 5               | +---+---+---+-+-+-+	| 8        | 8     | B             | 100             | 400             | 4               | +---+---+---+-+-+-+

We showed the cube plot for this system in the class on 10 March. From the cube plot we could already see the main factors, and even the **CS** interaction was noticeable.


 * **C effect**: There are 4 estimates of :math:`C = \displaystyle \frac{(+25) + (+27) + (-1) + (-1)}{4} = \frac{50}{4} = \bf{12.5}`
 * **T effect**: There are 4 estimates of :math:`T = \displaystyle \frac{(+1) + (+3) + (+1) + (+1)}{4} = \frac{6}{4} = \bf{1.5}`
 * **S effect**: There are 4 estimates of :math:`S = \displaystyle \frac{(-27) + (-1) + (-29) + (-1)}{4} = \frac{58}{4} = \bf{-14.5}`
 * **CT interaction**: There are 2 estimates of :math:`CT`. Recall that interactions are calculated as the half difference going from high to low.  Consider the change in :math:`C` when

-	:math:`T_\text{high}` (at :math:`S` high) = 4 - 5 = -1 -	:math:`T_\text{low}` (at :math:`S` high) = 3 - 4 = -1 -	First estimate = [(-1) - (-1)]/2 = 0 -	:math:`T_\text{high}` (at :math:`S` low) = 33 - 6 = +27 -	:math:`T_\text{low}` (at :math:`S` low) = 30 - 5 = +25 -	Second estimate = [(+27) - (+25)]/2 = +1 -	Average **CT** interaction = (0 + 1)/2 = **0.5** -	You can interchange :math:`C` and :math:`T` and still get the same result.


 * **CS interaction**: There are 2 estimates of :math:`CS`.  Consider the change in :math:`C` when

-	:math:`S_\text{high}` (at :math:`T` high) = 4 - 5 = -1 -	:math:`S_\text{low}` (at :math:`T` high) = 33 - 6 = +27 -	First estimate = [(-1) - (+27)]/2 = -14 -	:math:`S_\text{high}` (at :math:`T` low) = 3 - 4 = -1 -	:math:`S_\text{low}` (at :math:`T` low) = 30 - 5 = +25 -	Second estimate = [(-1) - (+25)]/2 = -13

-	Average **CS** interaction = (-13 - 14)/2 = **-13.5** -	You can interchange :math:`C` and :math:`S` and still get the same result.
 * **ST interaction**: There are 2 estimates of :math:`ST`: (-1 + 0)/2 = **-0.5**, calculate in the same way as above.


 * **CTS interaction**: There is only a single estimate of :math:`CTS`:

-	:math:`CT` effect at high :math:`S` = 0 -	:math:`CT` effect at low :math:`S` = +1 -	:math:`CTS` interaction = [(0) - (+1)] / 2 = **-0.5** -	You can calculate this also by considering the :math:`CS` effect at the two levels of :math:`T` -	Or, you can calculate this by considering the :math:`ST` effect at the two levels of :math:`C`. -	All 3 approaches give the same result.

Next, use computer software to verify that

.. math::

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

The :math:`\mathbf{X}` matrix and :math:`\mathbf{y}` vector used to calculate the least squares model:

.. math::

\begin{bmatrix} 5\\30\\6\\33\\4\\3\\5\\4 \end{bmatrix} &= \begin{bmatrix} +1 & -1 & -1 & -1 & +1 & +1 & +1 & -1\\ +1 & +1 & -1 & -1 & -1 & -1 & +1 & +1\\	               +1 & -1 & +1 & -1 & -1 & +1 & -1 & +1\\	                +1 & +1 & +1 & -1 & +1 & -1 & -1 & -1\\	                +1 & -1 & -1 & +1 & +1 & -1 & -1 & +1\\	                +1 & +1 & -1 & +1 & -1 & +1 & -1 & -1\\	                +1 & -1 & +1 & +1 & -1 & -1 & +1 & -1\\	                +1 & +1 & +1 & +1 & +1 & +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}

Some advice
You can easily create your own response surfaces and visualize them. Then practice on them before and during the take-home exam. Here are equations for the 4 examples given in class on Thursday:


 * A simple optimum: \(y = 83 +9.4x_A +7.1x_B -6 x_A x_B - 7.4 x_A^2 -3.7 x_B^2\)
 * A stationary ridge: \(y = 83 + 10.0x_A + 5.6x_B - 7.6 x_A x_B - 6.9 x_A^2 - 2.0 x_B^2\)
 * A rising ridge: \(y = 83 + 8.8x_A + 8.2x_B - 7.6 x_A x_B - 7.0 x_A^2 - 2.4 x_B^2\)
 * A saddle point: \(y = 83 + 11.1x_A + 4.1x_B - 9.4 x_A x_B - 6.5 x_A^2 - 0.4 x_B^2\)

Binary variables should be treated exactly like continuous variables in all respects during the optimization. The only difference is that it makes sense to visualize and use them at the two levels.

Plotting code
MATLAB code used in class on 23 March 2011 to do the first factorial:

MATLAB code used in class on 24 March 2011 to continue with the central composite design factorial: