\documentclass{seminar}
\usepackage{times}
\usepackage{graphics}
\usepackage{epsfig}
\usepackage{color}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{comment}
\newcommand{\bm}[1]{\mbox{\boldmath$ #1 $\unboldmath}}

\addtolength{\slidewidth}{2cm} \addtolength{\slideheight}{2cm}

% Makes the slides come out right side up
\special{! TeXDict begin /landplus90{true}store end }

\slideframe{none}

\definecolor{Blue}{rgb}{0.,0.,1.}
\definecolor{Red}{rgb}{1.,0.,0.}
\definecolor{Green}{rgb}{0.,1.,0.}

\def\~{{\tt\char'176}}

%\pagestyle{empty}

\usepackage{graphicx}

\renewcommand{\baselinestretch}{1.48}

\begin{document}

\newcommand{\heading}[1]{%
  \begin{center}
    \Large\bf
    \textcolor{Blue}{#1}
  \end{center}
  \vspace{1ex minus 1ex}}

\newcommand{\bc}{\begin{center}}
\newcommand{\ec}{\end{center}}
\newcommand{\bi}{\begin{itemize}}
\newcommand{\ei}{\end{itemize}}
\newcommand{\bs}{\begin{slide}}
\newcommand{\es}{\end{slide}}

%---------------------------------------------------------------------
% 1 -----------------------------------------------------------------

\bs
  \heading{Unit 3: Experiments with More Than One Factor}

\bc Sources : Chapter~3. \ec

\vspace{.1 in}

\bi
 \item Paired comparison design (Section 3.1).
 \item Randomized block design (Section 3.2).
 \item Two-way and multi-way layout with fixed effects (Sections 3.3 and 3.5).
 \item Latin and Graeco-Latin square design (Sections 3.6 and 3.7).
 \item Balanced incomplete block design (Section 3.8).
 \item Split-plot design (Section 3.9).
 \item Analysis of covariance (ANCOVA) (Section 3.10).
 \item Transformation of response (Section 3.11).
\ei
 \es




%---------------------------------------------------------------------
%  2 -----------------------------------------------------------------

\bs
  \heading{Sewage Experiment}
\bi
 \item {\bf Objective :}  To compare two methods MSI and SIB for
 determining chlorine content in sewage effluents;  $y$ =
 residual chlorine reading.
\begin{table}[htbp]
\tiny \caption{Residual Chlorine Readings, Sewage Experiment}
\begin{center}
\begin{tabular}{|l|rr|r|} \hline
\multicolumn{1}{|c|}{} & \multicolumn{2}{c|}{Method} &
\multicolumn{1}{c|}{} \\
Sample&MSI&SIB&$d_i$\\ \hline
 1      &  0.39 &              0.36 & $-$0.03\\
 2      &  0.84 &              1.35 &  0.51\\
 3      &  1.76 &              2.56 &  0.80\\
 4      &  3.35 &              3.92 &  0.57\\
 5      &  4.69 &              5.35 &  0.66\\
6      &  7.70 &             8.33   &  0.63\\
7      & 10.52 &             10.70  &  0.18\\
8      & 10.92 &             10.91  & $-$0.01\\ \hline
\end{tabular}
\label{tab:sewage}
\end{center}
\end{table}
\normalsize

\item {\bf Experimental Design :} Eight samples were collected at
different doses and contact times. Two methods were applied to
each of the eight samples. It is a {\it paired comparison} design
because the pair of treatments are applied to the same samples (or
units).
 \ei

 \es




%---------------------------------------------------------------------
%  3 -----------------------------------------------------------------

\bs
  \heading{Paired Comparison Design vs. Unpaired Design}
\vspace{0.3 in}

 \bi
   \item {\it Paired Comparison Design} : Two treatments are
   randomly assigned to each $block$ of $two$ units. Can eliminate
   block-to-block variation and is effective if such variation is
   large. \\Examples : pairs of twins, eyes, kidneys, left and right
   feet. (Subject-to-subject variation much larger than
   within-subject variation).

   \item {\it Unpaired Design} : Each treatment is applied to a
   $separate$ set of units, or called the {\it two-sample} problem.
   Useful if pairing is unnecessary; also it has more degrees of
   freedom for error estimation (see page~5).
\ei
 \vspace{3 in} \es




%---------------------------------------------------------------------
%  4 -----------------------------------------------------------------

\bs
  \heading{Paired $t$ tests}
\vspace{0.3 in}
 \bi
  \item {\bf Paired $t$ test :} Let $y_{i1}, y_{i2}$ be the responses of treatments~1
  and~2 for unit $i, i = 1,\ldots N$. Let $d_i=y_{i2}-y_{i1}$,
  $\bar{d}$ and $s_d^2$ the sample mean and variance of $d_i$.
\begin{eqnarray*}
t_{paired} = \sqrt{N} \bar{d}/ s_{d} \label{eqn:tPaired}
\end{eqnarray*}
The two treatments are declared  significantly different at level
$\alpha$ if
\begin{eqnarray}
|t_{paired}|> t_{N-1,\alpha/2}. \label{eqn:tPairedCV}
\end{eqnarray}
\ei \es




%---------------------------------------------------------------------
%  5 -----------------------------------------------------------------

\bs
  \heading{Unpaired $t$ tests}
\bi
  \item {\bf Unpaired $t$ test :} The unpaired $t$ test is appropriate if we randomly
  choose $N$ of the $2N$ units to receive one treatment and assign the remaining
  $N$ units to the second treatment.
 Let $\bar{y_i}$ and $s^2_i$ be the
sample mean and sample variance for the $i$th treatment, $i$ = 1
and 2. Define
\begin{eqnarray*}
t_{unpaired} =  ({\bar{y_2} - \bar{y_1}}) / \sqrt { (s^2_{2}/N)
+(s^2_{1}/N)}.
\end{eqnarray*}
The two treatments are declared significantly different at level
$\alpha$ if
\begin{eqnarray}\label{eqn:tunPaired}
|t_{unpaired}|> t_{2N-2,\alpha/2}.
\end{eqnarray}
Note that the degrees of freedom in (\ref{eqn:tPairedCV}) and
(\ref{eqn:tunPaired}) are $N-1$ and $2N-2$ respectively. The
unpaired $t$ test has more df's but make sure that the
unit-to-unit variation is under control (if this method is to be
used).
 \ei
\es





%---------------------------------------------------------------------
%  6 -----------------------------------------------------------------

\bs
  \heading{Analysis Results : $t$ tests}
\begin{eqnarray*}
 t_{paired}             &=& \frac{0.4138}{0.321/\sqrt{8}}=\frac{0.4138}{0.1135}=3.645, \\
 t_{unpaired}           &=& \frac{5.435-5.0212}{\sqrt{(17.811+17.012)/8}}=\frac{0.4138}{2.0863}=0.198. \\
\end{eqnarray*}
The $p$ values are
\begin{eqnarray*}
 Prob(|t_7|>3.645)      &=& 0.008,\\
 Prob(|t_{14}| >0.198) &=& 0.848.\\
 \end{eqnarray*}

\bi
 \item Unpaired $t$ test fails to declare significant difference
 because its denominator 2.0863 is too large. Why ? Because the
 denominator contains the sample-to-sample variation component.
\ei  \es




%---------------------------------------------------------------------
%  7 -----------------------------------------------------------------

\bs
  \heading{Analysis Results : ANOVA and $F$ tests}
\vspace{0.3 in}

 \bi

 \item Wrong to analyze by ignoring pairing. A better explanation is
 given by ANOVA.
 \item $F$ statistic in ANOVA for paired design equals
 $t^2_{paired}$; similarly, $F$ statistic in ANOVA for unpaired design equals
 $t^2_{unpaired}$. Data can be analyzed in two equivalent ways.
\item In the correct analysis (Table~2), the total variation is
decomposed into three components; the largest one is the
sample-to-sample variation (its $MS= 34.77$). In the unpaired
analysis (Table~3), this component is mistakenly included in the
residual $SS$, thus making the $F$ test powerless.

\ei \es



%---------------------------------------------------------------------
%  8 -----------------------------------------------------------------

\bs
  \heading{ANOVA Tables}

\begin{table}[htbp]
\caption{ANOVA Table, Sewage Experiment}
$ $\\
\large\small \centering
\begin{tabular} {|llrrr|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{Degrees of} &
\multicolumn{1}{c}{Sum of} & \multicolumn{1}{c}{Mean}  &
\multicolumn{1}{c|}{}  \\
\multicolumn{1}{|c}{Source} & \multicolumn{1}{c}{Freedom} &
\multicolumn{1}{c}{Squares} & \multicolumn{1}{c}{Squares}  &
\multicolumn{1}{c|}{$F$}  \\ \hline
sample&  7 &243.4042&34.77203&674.82\\
method&  1 &  0.6848& 0.68476& 13.29\\
residual &7 &  0.3607& 0.05153& \\ \hline
\end{tabular}
%\large\normalsize
\label{tab:ANOVAsewage}
\end{table}

\begin{table}[htbp]
\caption{ANOVA Table Ignoring Pairing, Sewage Experiment}
$ $\\
\large\small \centering
\begin{tabular} {|llrrl|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{Degrees of} &
\multicolumn{1}{c}{Sum of} & \multicolumn{1}{c}{Mean}  &
\multicolumn{1}{c|}{}  \\
\multicolumn{1}{|c}{Source} & \multicolumn{1}{c}{Freedom} &
\multicolumn{1}{c}{Squares} & \multicolumn{1}{c}{Squares}  &
\multicolumn{1}{c|}{$F$}  \\ \hline
method  &1  &    0.6848& 0.68476&0.04\\
residual&14 &  243.7649&17.41178& \\ \hline
\end{tabular}
%\large\normalsize
\label{tab:ANOVAsewageIgnore}
\end{table}
 \es






%---------------------------------------------------------------------
%  9 ----------------------------------------------------------------

\bs
  \heading{Randomized Block Design : Girder Experiment}

\bi
 \item Recall the principles of blocking and randomization in
Unit~1. In a randomized block design (RBD), $k$ treatments are
 randomly assigned to each block (of $k$ units); there are in
 total $b$ blocks. Total sample size $N=bk$.

\item Paired comparison design is a special case with $k=2$. (Why
?)

\item {\bf Objective : } To compare four methods for predicting
the shear strength for steel plate girders ($k=4, b=9$).


\begin{table}[htbp]
\normalsize\tiny \caption{Strength Data, Girder Experiment}
\begin{center}
\begin{tabular}{|l|llll|} \hline
\multicolumn{1}{|c|}{(Block)} &
\multicolumn{4}{c|}{Method} \\
Girder&Aarau&Karlsruhe&Lehigh&Cardiff\\ \hline
S1/1&0.772&1.186&1.061&1.025 \\
S2/1&0.744&1.151&0.992&0.905 \\
S3/1&0.767&1.322&1.063&0.930 \\
S4/1&0.745&1.339&1.062&0.899 \\
S5/1&0.725&1.200&1.065&0.871 \\
S1/2&0.844&1.402&1.178&1.004 \\
S2/2&0.831&1.365&1.037&0.853 \\
S3/2&0.867&1.537&1.086&0.858 \\
S4/2&0.859&1.559&1.052&0.805 \\ \hline
\end{tabular}
\label{tab:girder}
\end{center}
\tiny\normalsize
\end{table}




  \ei

\es





%---------------------------------------------------------------------
%  10 ----------------------------------------------------------------

\bs
  \heading{Model and Estimation}
%\vspace{0.3in}
Model for RBD :
\begin{eqnarray*}
y_{ij}= \eta + \alpha_i + \tau_j + \epsilon_{ij}, \; i=1, \ldots,
b; \; j=1, \ldots, k, \label{eqn:random-block}
\end{eqnarray*}
where $y_{ij}$ =  observation of the $j$th treatment in the $i$th
block, $\alpha_i$ = $i$th block effect, $\tau_j$ = $j$th treatment
effect,  $\epsilon_{ij}$ = errors, independent $N(0,\sigma^2)$.

\begin{eqnarray*}
y_{ij} & = & \hat{\eta} + \hat{\alpha}_i+\hat{\tau}_j + r_{ij} \nonumber \\
&= & \bar{y}_{\cdot \cdot} + ( \bar{y}_{i \cdot} - \bar{y}_{\cdot
\cdot}) +( \bar{y}_{\cdot j} - \bar{y}_{\cdot \cdot}) +( y_{ij} -
\bar{y}_{i \cdot} - \bar{y}_{\cdot j} + \bar{y}_{\cdot \cdot}) ,
\end{eqnarray*}
where
\begin{eqnarray*}
\begin{array}{l}
\hat{\eta}= \bar{y}_{\cdot \cdot}, \; \hat{\alpha}_i =  \bar{y}_{i
\cdot} - \bar{y}_{\cdot \cdot},\; \hat{\tau}_j =  \bar{y}_{ \cdot
j} - \bar{y}_{\cdot \cdot},\;
r_{ij} =  y_{ij} - \bar{y}_{i \cdot} - \bar{y}_{\cdot j} + \bar{y}_{\cdot \cdot}, \\
\bar{y}_{i \cdot}=k^{-1}\sum_{j=1}^{k} y_{ij},\; \bar{y}_{\cdot
j}=b^{-1}\sum_{i=1}^{b} y_{ij},\; \bar{y}_{\cdot
\cdot}=(bk)^{-1}\sum_{i=1}^{b} \sum_{j=1}^{k} y_{ij}.
\end{array}
\label{eqn:RBDeffects}
\end{eqnarray*}

\es



%---------------------------------------------------------------------
%  11 ----------------------------------------------------------------


\bs
  \heading{ANOVA}
%\vspace{0.15in}
 Subtracting $\bar{y}_{\cdot \cdot}$, squaring both
sides and summing over $i$ and $j$ yields
\begin{eqnarray*}
\sum_{i=1}^{b} \sum_{j=1}^{k} {(y_{ij} - \bar{y}_{\cdot \cdot})}^2
&  = & \sum_{i=1}^{b} k{( \bar{y}_{i \cdot} - \bar{y}_{\cdot
\cdot})}^2
+\sum_{j=1}^{k} b{( \bar{y}_{\cdot j} - \bar{y}_{\cdot \cdot})}^2 \nonumber \\
& & +\sum_{i=1}^{b} \sum_{j=1}^{k} {( y_{ij} - \bar{y}_{i \cdot} -
\bar{y}_{\cdot j}
 + \bar{y}_{\cdot \cdot})}^2 \label{eqn:ssb+sst+ssr} \\
& = & SS_b + SS_t + SS_r. \nonumber
\end{eqnarray*}


\begin{table}[htbp]
\normalsize\tiny \caption{ANOVA Table for Randomized Block Design}
$ $\\
\centering
\begin{tabular} {|lll|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{Degrees of} &
\multicolumn{1}{c|}{Sum of} \\
\multicolumn{1}{|c}{Source} & \multicolumn{1}{c}{Freedom} &
\multicolumn{1}{c|}{Squares} \\
\hline block& $b-1$ &
$\sum_{i=1}^{b} k {( \bar{y}_{i \cdot} - \bar{y}_{\cdot \cdot})}^{2} $\\
treatment& $k-1$ &
$\sum_{j=1}^{k} b {( \bar{y}_{\cdot j} - \bar{y}_{\cdot \cdot})}^{2}$\\
residual & $(b-1)(k-1)$ & $\sum_{i=1}^{b}  \sum_{j=1}^{k} {(
y_{ij} - \bar{y}_{i \cdot}-\bar{y}_{\cdot j} +
\bar{y}_{\cdot \cdot})}^{2}$\\
total & $bk-1$&
$\sum_{i=1}^{b} \sum_{j=1}^{k} {( y_{ij} - \bar{y}_{\cdot \cdot})}^{2}$\\
\hline
\end{tabular}
\label{tab:ANOVArandomizedBlock}
\end{table}
\tiny\normalsize
\es




%---------------------------------------------------------------------
%  12 ----------------------------------------------------------------

\bs
  \heading{Testing and Multiple Comparisons}
  \bi
  \item $H_0: \tau_1= \cdots = \tau_k$, can be tested by using the $F$
statistic
\begin{eqnarray}
F=\frac{SS_t /(k-1)}{SS_r /(b-1)(k-1)}, \label{eqn:FfornoTdiff}
\end{eqnarray}

 The $F$ test rejects $H_0$ at level $\alpha$ if $F > F_{k-1, (b-1)(k-1), \alpha}$.

\item \textit{If $H_0$ is rejected, multiple comparisons of the
$\tau_{j}$ should be performed.} \\ $t$ statistics for making
multiple comparisons :
\begin{eqnarray}
t_{ij}= \frac { \bar{y}_{ \cdot j}-\bar{y}_{\cdot i}
}{\hat{\sigma}\sqrt{1/b + 1/b}}, \label{eqn:tRB}
\end{eqnarray}
where $\hat{\sigma}^2$ is the mean square error in the ANOVA
table.

\item At level $\alpha$, the Tukey multiple comparison method
identifies ``treatments $i$ and $j$ as different'' if
\begin{displaymath}
|t_{ij}| >\frac{1}{\sqrt{2}} q_{k,(b-1)(k-1),\alpha}.
\end{displaymath}

\ei \es


%---------------------------------------------------------------------
%  13 ----------------------------------------------------------------

\bs
  \heading{Simultaneous Confidence Intervals}
\vspace{0.3 in}
   By solving
%\begin{displaymath}
\[
\frac{|(\bar{y}_{ \cdot j}-\bar{y}_{\cdot i})-(\tau_j - \tau_i)|}
{\hat \sigma  \sqrt{2/b}} \leq \frac{1}{\sqrt{2}}
q_{k,(b-1)(k-1),\alpha}
\]
%\end{displaymath}
for $\tau_j - \tau_i$, the simultaneous confidence intervals for
$\tau_j - \tau_i$ are
\begin{eqnarray*}
\bar{y}_{ \cdot j}-\bar{y}_{\cdot i} \pm
 q_{k,(b-1)(k-1),\alpha}
 \frac{\hat \sigma} { \sqrt{b}}
\label{eqn:ciRB}
\end{eqnarray*}
for all $i$ and $j$ pairs.

 \es



%---------------------------------------------------------------------
%  14 ----------------------------------------------------------------

\bs
  \heading{Analysis of Girder Experiment : F test}
\begin{table}[htbp]
\caption{ANOVA Table, Girder Experiment}
$ $\\
\normalsize\tiny  \centering
\begin{tabular} {|llllr|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{Degrees of} &
\multicolumn{1}{c}{Sum of} & \multicolumn{1}{c}{Mean}  &
\multicolumn{1}{c|}{}  \\
\multicolumn{1}{|c}{Source} & \multicolumn{1}{c}{Freedom} &
\multicolumn{1}{c}{Squares} & \multicolumn{1}{c}{Squares}  &
\multicolumn{1}{c|}{$F$}  \\ \hline
girder& 8 & 0.089 & 0.011&1.62\\
method& 3 & 1.514&0.505&73.03\\
residual &24& 0.166 & 0.007 & \\ \hline
\end{tabular}
\tiny \normalsize \label{tab:ANOVAgirder}
\end{table}
  \bi
\item The $F$ statistic in (3) has the value
$$ \frac{1.514/3}{0.166/24} =  73.03.$$ Therefore, the p value for
testing the difference between methods is $Prob(F_{3,24} >
73.03)$=0.00. The small p value suggests that the methods are
different.

  \ei
\es




%---------------------------------------------------------------------
%  15 ----------------------------------------------------------------

\bs
  \heading{Analysis of Girder Experiment : Multiple Comparisons}
\begin{table}[htbp]
\caption{Multiple Comparison $t$ Statistics, Girder Experiment}
\begin{center}
\begin{tabular}{|rrrrrr|} \hline
\multicolumn{1}{|c}{$A$ vs.\ $K$}  & \multicolumn{1}{c} {$A$ vs.\
$L$}  & \multicolumn{1}{c} {$A$ vs.\ $C$}  & \multicolumn{1}{c}
{$K$ vs.\ $L$}  & \multicolumn{1}{c} {$K$ vs.\ $C$}  &
\multicolumn{1}{c|}{$L$ vs.\ $C$}  \\ \hline
  13.91&
   6.92&
   2.82&
  -6.99&
 -11.09&
  -4.10\\ \hline
\end{tabular}
\end{center}
\label{tab:GirderTvalues}
\end{table}

  \bi \item The means for the four methods, $A$ for Aarau, $K$ for Karlsruhe, $L$ for Lehigh and
$C$ for $C$ardiff are 0.7949, 1.3401, 1.0662 and 0.9056.

\item The multiple comparison $t$ statistics based on (4) are
displayed in Table~\ref{tab:GirderTvalues}. For example, the $A$
vs.\ $K$ $t$ statistic is
%\begin{displaymath}
$
t_{12}=\frac{1.3401-0.7949}{\sqrt{0.007}\sqrt{2/9}}=13.91.
$
%\end{displaymath}
With $\alpha = 0.05$, $t_{24,  0.05/(6 \times 2)}= 2.875 $ for the
Bonferroni method. Since $k=4$ and ${k \choose 2} = 6$,
$\frac{1}{\sqrt{2}} q_{4,24,0.05} = \frac{3.90}{1.414} = 2.758$
for the Tukey method. Again, Tukey method is more powerful. ( Why
? )
  \ei
\es



%---------------------------------------------------------------------
%  16 ----------------------------------------------------------------

\bs
  \heading{Two-way layout}
 \bi \item This is similar to RBD. The only difference is that here we
 have two treatment factors instead of one treatment factor and one block factor.
 Interested in assessing interaction effect between the two
 treatments. In blocking, block$\times$treatment interaction is
 assumed negligible.

 \item {\bf Bolt experiment :} The goals was to test if there is
 any difference between two test media (bolt, mandrel) and among
 three plating methods (C\&W, HT, P\&O). Response $y$ is the
 torque of the locknut.

\begin{table}[htbp]
\caption{Torque Data, Bolt Experiment}
$ $\\
\centering
\begin{tabular}{|l|l|l|l|} \hline
&\multicolumn{1}{|c|}{C\&W} & \multicolumn{1}{|c|}{HT} &
\multicolumn{1}{|c|}{P\&O} \\ \hline
Bolt & 20, 16, 17, 18, 15, & 26, 40, 28, 38, 38, & 25, 40, 30, 17, 16, \\
& 16, 19, 14, 15, 24 & 30, 26, 38, 45, 38 & 45, 49, 33, 30, 20 \\
\hline
Mandrel & 24, 18, 17, 17, 15, & 32, 22, 30, 35, 32, & 10, 13, 17, 16, 15, \\
& 23, 14, 18, 12, 11 & 28, 27, 28, 30, 30 & 14, 11, 14, 15, 16 \\
\hline
\end{tabular}
\label{tab:dataBolt}
\end{table}
 \ei
\es






%---------------------------------------------------------------------
%  17 ----------------------------------------------------------------

\bs
  \heading{Model and Estimation}
%\vspace{0.3in}
\bi

\item Model :
\begin{eqnarray}
y_{ijl}= \eta + \alpha_i + \beta_j +\omega_{ij}+\epsilon_{ijl},\;
i=1, \ldots, I;\; j=1, \ldots, J;\; l=1, \ldots, n
\label{eqn:two-way}
\end{eqnarray}
where $y_{ijl}$ = observation for the $l$th replicate of the $i$th
level of factor $A$ and the $j$th level of factor $B$, $\alpha_i$
= $i$th main effect for $A$,  $\beta_j$ = $j$th main effect for
$B$, $\omega_{ij}$ = $(i,j)$th interaction effect between $A$ and
$B$ and  $\epsilon_{ijl}$ =  errors, independent
 $N(0,\sigma^2)$.

\item Estimation : \begin{eqnarray*}
y_{ijl} & = & \hat{\eta} + \hat{\alpha}_i+\hat{\beta}_j + \hat{\omega}_{ij}+ r_{ijl} \nonumber \\
& = & \bar{y}_{\cdot \cdot \cdot} + ( \bar{y}_{i \cdot \cdot} -
\bar{y}_{\cdot \cdot \cdot}) +( \bar{y}_{\cdot j \cdot} -
\bar{y}_{\cdot \cdot \cdot})
+( \bar{y}_{ij \cdot} - \bar{y}_{i \cdot \cdot} - \bar{y}_{\cdot j \cdot} + \bar{y}_{ \cdot \cdot \cdot}) \nonumber\\
&& + (y_{ijl}- \bar{y}_{ij \cdot} ),
\end{eqnarray*}
where
\begin{eqnarray*}
\hat{\eta}= \bar{y}_{\cdot \cdot \cdot},\; \hat{\alpha}_i =
\bar{y}_{i \cdot \cdot} - \bar{y}_{\cdot \cdot \cdot},\;
\hat{\beta}_j  = \bar{y}_{\cdot j \cdot} - \bar{y}_{\cdot \cdot \cdot}, \nonumber \\
\hat{\omega}_{ij} = \bar{y}_{ij \cdot} - \bar{y}_{i \cdot \cdot} -
\bar{y}_{\cdot j \cdot} + \bar{y}_{ \cdot \cdot \cdot},\; r_{ijl}
= y_{ijl}- \bar{y}_{ij \cdot} , \label{eqn:effectEstimates}
\end{eqnarray*}

\ei


\es

%---------------------------------------------------------------------
%  18 ----------------------------------------------------------------


\bs
  \heading{ANOVA}
%\vspace{0.15in}
\begin{table}[htbp]
\caption{ANOVA Table for Two-Way Layout}
$ $\\
\large\small \centering
\begin{tabular} {|lcl|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{Degrees of} &
\multicolumn{1}{c|}{Sum of} \\
\multicolumn{1}{|c}{Source} & \multicolumn{1}{c}{Freedom} &
\multicolumn{1}{c|}{Squares}  \\ \hline $A$& $I-1$ &
$nJ\sum_{i=1}^{I} {( \bar{y}_{i \cdot \cdot} - \bar{y}_{\cdot \cdot \cdot})}^{2}$\\
$B$& $J-1$ &
$nI \sum_{j=1}^{J} {( \bar{y}_{\cdot j \cdot} - \bar{y}_{\cdot \cdot \cdot})}^{2}$\\
$A \times B$& $(I-1)(J-1)$ & $n \sum_{i=1}^{I} \sum_{j=1}^{J} {(
\bar{y}_{i j \cdot} - \bar{y}_{i \cdot \cdot}
- \bar{y}_{\cdot j \cdot} + \bar{y}_{\cdot \cdot \cdot})}^{2}$\\
residual & $IJ(n-1)$ & $\sum_{i=1}^{I} \sum_{j=1}^{J}
\sum_{l=1}^{n} {( y_{ijl} - \bar{y}_{ij \cdot})}^{2}$\\
\hline total & $IJn-1$&
$\sum_{i=1}^{I} \sum_{j=1}^{J} \sum_{l=1}^{n} {( y_{ijl} - \bar{y}_{\cdot \cdot \cdot})}^{2}$\\
\hline
\end{tabular}
\large\normalsize \label{tab:ANOVAtwoway}
\end{table}


\es



%---------------------------------------------------------------------
%  19 ----------------------------------------------------------------
\bs
  \heading{Analysis of Bolt Experiment}

 %\vspace{.3 in}
 \begin{table}[htbp]
\caption{ANOVA Table, Bolt Experiment}
$ $\\
%\large\small
\centering \label{tab:boltANOVA}
\begin{tabular} {|lcrrr|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{Degrees of} &
\multicolumn{1}{c}{Sum of} & \multicolumn{1}{c}{Mean}  &
\multicolumn{1}{c|}{}  \\
\multicolumn{1}{|c}{Source} & \multicolumn{1}{c}{Freedom} &
\multicolumn{1}{c}{Squares} & \multicolumn{1}{c}{Squares}  &
\multicolumn{1}{c|}{$F$}  \\ \hline
test& 1 & 821.400 & 821.400 & 22.46\\
plating& 2 & 2290.633& 1145.317& 31.31\\
test $\times$ plating& 2 & 665.100 & 332.550 & 9.09\\
residual &54& 1975.200 & 36.578 & \\ \hline
\end{tabular}
%\large\normalsize
\end{table}

\bi \item {\bf Conclusions :} Both factors and their interactions
 are significant. Multiple comparisons of C\&W, HT and P\&O can be performed by using Tukey method with $k=3$ and 54 error df's.

 \item Another method is considered in the following pages.
 \ei
 \es


%---------------------------------------------------------------------
%  20 ----------------------------------------------------------------
\bs
  \heading{Two Qualitative Factors: a Regression Modeling Approach}

\bi

\item Motivation: need to find a model that allows the comparison
and estimation between levels of the qualitative factors. The
parameters $\alpha_i$ and $\beta_j$ in model (5) are not estimable
without putting constraints. For qualitative factors, use the {\bf
baseline constraint} $\alpha_1 = \beta_1 = 0$ and $w_{1j} = w_{i1}
= 0, i=1,2, j=1,2,3$ for the bolt experiment.

\item It can be shown that \\
\begin{eqnarray*}
E(y_{11})=\eta, \; E(y_{12})=\eta+\beta_2, \; E(y_{13} )=\eta+\beta_3,\\
E(y_{21})=\eta+\alpha_2, \;
E(y_{22})=\eta+\alpha_2+\beta_{2} +\omega_{22}, \\
E(y_{23})=\eta+\alpha_2+\beta_{3} +\omega_{23}.
\end{eqnarray*}
\ei

\es

%---------------------------------------------------------------------
%  21 ----------------------------------------------------------------
\bs
  \heading{Regression Model (continued)}

%\bi \item
 In the regression model $y = X \beta + \epsilon$,

\begin{eqnarray*}
\label{eqn:modelmatrixforbaseline} {\bf X} = \left(
\begin{array} {rrrrrr}
1 &  0 &  0 &  0  &  0 &  0  \\
1 &  0 &  1 &  0  &  0 &  0  \\
1 &  0 &  0 &  1  &  0 &  0  \\
1 &  1 &  0 &  0  &  0 &  0  \\
1 &  1 &  1 &  0  &  1 &  0  \\
1 &  1 &  0 &  1  &  0 &  1  \\
\end{array}
    \right) .
\end{eqnarray*}

%\ei
\es

%---------------------------------------------------------------------
%  22 ----------------------------------------------------------------

\bs
  \heading{Regression Model (continued)}

%\bi \item
 Interpretation of parameters

 \begin{eqnarray*}
\begin{array}{rcl}
\eta &=& E(y_{11}), \\
\alpha_2 &=& E(y_{21}) - E(y_{11}), \\
\beta_2 &=& E(y_{12}) - E(y_{11}), \\
\beta_3 &=& E(y_{13}) - E(y_{11}), \\
\omega_{22}&=& (E(y_{22}) - E(y_{21})) -  (E(y_{12}) - E(y_{11})), \\
\omega_{23}&=& (E(y_{23}) - E(y_{21})) -  (E(y_{13}) - E(y_{11})). \\
\end{array}
\label{eqn:paraequalmean}
\end{eqnarray*}

%\ei

\es



%---------------------------------------------------------------------
%  23 ----------------------------------------------------------------

\bs
  \heading{Regression Analysis Results}


\begin{table}[htbp]
\caption{Tests, Bolt Experiment}
\begin{center}
\begin{tabular}{|lrrrr|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{} &
\multicolumn{1}{c}{Standard} & \multicolumn{1}{c}{} &
\multicolumn{1}{c|}{} \\
\multicolumn{1}{|c}{Effect} & \multicolumn{1}{c}{Estimate} &
\multicolumn{1}{c}{Error} & \multicolumn{1}{c}{$t$} &
\multicolumn{1}{c|}{p value}\\ \hline
$\eta$          &17.4000 & 1.9125  &  9.10 & 0.000 \\
$\alpha_2$            &-0.5000 & 2.7047  & -0.18& 0.854 \\
$\beta_2$         &17.3000 & 2.7047  &  6.40 & 0.000 \\
$\beta_3$         &13.1000 & 2.7047  &  4.84& 0.000 \\
$\omega_{22}$&-4.8000 & 3.8251  & -1.25& 0.215 \\
$\omega_{23}$&-15.9000&  3.8251 &  -4.16&  0.000 \\ \hline
\end{tabular}
\end{center}
\label{tab:boltTests1}
\end{table}

 \bi
  \item Significant effects: $\hat{\beta}_2$ (C \& W and H \& T are
  different), $\hat{\beta}_3$ (C \& W and P \& O are different),
  $\hat{\omega}_{23}$ (difference between C\&W and P\&O varies from
  bolt to mandrel); $\hat{\alpha}_2$ not significant suggests
  no difference between bolt and mandrel.
  \ei
\es




%---------------------------------------------------------------------
%  24 ----------------------------------------------------------------

\bs
  \heading{Adjusted p Values}

  \vspace{0.3 in}


 The p values in Table~\ref{tab:boltTests1} are for each
 individual effect. Since five effects (excluding $\eta$) are
 considered $simultaneously$, we should, strictly speaking, adjust
 the p values when making a $joint$ statement about the five
 effects. In the spirit of the Bonferroni method (again justified
 by the Bonferroni's inequality in (2.15) of the book), we
 multiply the individual p value by the number of tests to obtain
 {\bf adjusted p value}. For $\hat{\omega}_{23}$, the adjusted
 p  value is $5\times 0.0001 = 0.0005$, still very significant.
 The adjusted p values, for $\hat{\beta}_2$ and $\hat{\beta}_3$
 are smaller.
\es



%---------------------------------------------------------------------
%  25 ----------------------------------------------------------------

\bs
  \heading{Box-Whisker Plot : Bolt Experiment}

\begin{figure}[htbp]
\centerline{\psfig{figure=picture/nutbox.ps,width=2.in,height=4.in,angle=-90}}
\caption{Box-Whisker Plots of Residuals, Bolt Experiment}
\label{fig:boxplotBolt}
\end{figure}
The plot suggests that the constant variance assumption in
(\ref{eqn:two-way}) does not hold and that the variance of $y$ for
bolt is larger than that for mandrel. These are aspects that
cannot be discovered by regression analysis alone. \es



%---------------------------------------------------------------------
%  26 ----------------------------------------------------------------

\bs
  \heading{Multiple-Way Layout}
\begin{table}[htbp]
\caption{ANOVA Table for Three-Way Layout}
%$ $\\
\large\small \centering
\begin{tabular} {|lll|} \hline
 %\multicolumn{1}{|c}{} & \multicolumn{1}{c}{Degrees of} &\multicolumn{1}{c|}{Sum of} \\
 \multicolumn{1}{|c}{Source} & \multicolumn{1}{c}{df} & \multicolumn{1}{c|}{Sum of Squares}  \\ \hline
$A$& $I-1$ & $\sum_{i=1}^I nJK (\hat{\alpha}_i)^2 $ \\
$B$& $J-1$ & $\sum_{j=1}^J nIK (\hat{\beta}_j)^2 $ \\
$C$& $K-1$ & $\sum_{k=1}^K nIJ (\hat{\delta}_k)^2 $ \\
$A \times B$& $(I-1)(J-1)$ & $\sum_{i=1}^I \sum_{j=1}^J nK
(\widehat{(\alpha \beta)}_{ij})^2 $\\
$A \times C$& $(I-1)(K-1)$ &
$\sum_{i=1}^I \sum_{k=1}^K nJ \widehat{(\alpha \delta)}_{ik})^2 $\\
$B \times C$& $(J-1)(K-1)$ &
$\sum_{j=1}^J \sum_{k=1}^K nI \widehat{(\beta \delta)}_{jk})^2 $\\
$A \times B \times C$& $(I-1)(J-1)(K-1)$ &
$\sum_{i=1}^I \sum_{j=1}^J \sum_{k=1}^K n (\hat{\gamma}_{ijk})^2 $\\
residual & $IJK(n-1)$ &
$\sum_{i=1}^I \sum_{j=1}^J \sum_{k=1}^K \sum_{l=1}^n {(y_{ijk l} - \bar{y}_{i j  k \cdot})}^2 $\\
total & $IJKn-1$& $\sum_{i=1}^I \sum_{j=1}^J \sum_{k=1}^K
\sum_{l=1}^n
{(y_{ijkl} - \bar{y}_{\cdot \cdot \cdot})}^2 $ \\
\hline
\end{tabular}
\large\normalsize \label{tab:ANOVAthreeway}
\end{table}

\bi \item $\hat{\alpha}_i$, $\hat{\beta}_j$,
$\hat{\alpha\beta}_{ij}$, etc given in (3.35) of the book.

\item Estimation, F test, residual analysis are similar to those
for two-way layout.

 \ei \es

%---------------------------------------------------------------------
%  33 ----------------------------------------------------------------

\bs

  \heading{Latin Square Design : Wear Experiment}

\vspace{.2 in}

 {\bf Wear Experiment :} Testing the abrasion
resistance of rubber-covered fabric, $y=$ loss in weight over a
 period of time.

One treatment factor : Material type A, B, C, D.

Two blocking factors : (1) four positions on the tester,\\
(2) four applications (four different times for setting up the
tester)

{\bf Latin square design of order $k$ : } Each of the $k$ Latin
letters (i.e., treatments) appears  once in each row and once  in
each column.

It is an extension of RBD to accommodate $two$ blocking factors.
Randomization applied to assignments to rows, columns, treatments.
(Collection of Latin Square Tables given in Appendix~3A of WH).

\es


%---------------------------------------------------------------------
%  34 ----------------------------------------------------------------

\bs

 \heading{Wear Experiment : Design and Data}

{\tiny
 \begin{table}[htbp]
%\caption{4$\times$4 Latin Square}
\caption{{\small Latin Square Design (columns correspond to
positions, rows correspond to applications and Latin letters
correspond to materials), Wear Experiment }}
\begin{center}
\begin{tabular}{|crrrr|} \hline
\multicolumn{1}{|c}{}  &
\multicolumn{4}{c|}{Position}  \\
\multicolumn{1}{|c}{Application}  & \multicolumn{1}{c}{1}  &
\multicolumn{1}{c}{2}  & \multicolumn{1}{c}{3}  &
\multicolumn{1}{c|}{4}  \\ \hline
1&C&D&B&A\\
2&A&B&D&C\\
3&D&C&A&B\\
4&B&A&C&D\\ \hline
\end{tabular}
\end{center}
\label{tab:4by4LS}
\end{table}

\begin{table}[htbp]
\caption{{\small Weight Loss Data, Wear Experiment}}
\begin{center}
\begin{tabular}{|crrrr|} \hline
\multicolumn{1}{|c}{}  &
\multicolumn{4}{c|}{Position}  \\
\multicolumn{1}{|c}{Application}  & \multicolumn{1}{c}{1}  &
\multicolumn{1}{c}{2}  & \multicolumn{1}{c}{3}  &
\multicolumn{1}{c|}{4}  \\ \hline
1&235&236&218&268\\
2&251&241&227&229\\
3&234&273&274&226\\
4&195&270&230&225\\ \hline
\end{tabular}
\end{center}
\label{tab:wearData}
\end{table}
}

\es

%---------------------------------------------------------------------
%  35 ----------------------------------------------------------------

\bs

  \heading{Model for Latin Square Design}

Model:
\begin{eqnarray*}
y_{ijl}= \eta + \alpha_i + \beta_j + \tau_l + \epsilon_{ijl},
%i=1, \ldots, k; j=1, \ldots, k; l=1, \ldots, k,
\label{eqn:latin-square}
\end{eqnarray*}

$l =$ Latin letter in the $(i, j)$ cell of the Latin Square,\\
$\alpha_i = i$th row effect, \\
$\beta_j = j$th column effect, \\
$\tau_l =l$th treatment (i.e., Latin letter) effect, \\
$\epsilon_{ijl}$ are independent $N(0,\sigma^2)$.\\

There are only $k^2$ values in the triplet ($i$, $j$, $l$)
dictated by the particular LS; this set is denoted by $S$.
\begin{eqnarray*}
y_{ijl} & = & \hat{\eta} + \hat{\alpha}_i+\hat{\beta}_j + \hat{\tau}_l+ r_{ijl} \nonumber \\
& = & \bar{y}_{\cdot \cdot \cdot} + ( \bar{y}_{i \cdot \cdot} -
\bar{y}_{\cdot \cdot \cdot}) +( \bar{y}_{\cdot j \cdot} -
\bar{y}_{\cdot \cdot \cdot})
+( \bar{y}_{\cdot \cdot l} - \bar{y}_{\cdot \cdot \cdot}) \nonumber \\
&& +( y_{ijl} - \bar{y}_{i \cdot \cdot} - \bar{y}_{\cdot j \cdot}
- \bar{y}_{\cdot \cdot l} + 2\bar{y}_{ \cdot \cdot \cdot}) ,
\end{eqnarray*}

ANOVA decomposition: similar formula (see (3.40) of WH)

\es

%---------------------------------------------------------------------
%  36 ----------------------------------------------------------------

\bs

  \heading{ANOVA for Latin Square Design}

{\tiny
\begin{table}[htbp]
\caption{ANOVA Table for Latin Square Design} $ $ \large\small
\centering
\begin{tabular} {|lll|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{Degrees of} &
\multicolumn{1}{c|}{Sum of} \\
\multicolumn{1}{|c}{Source} & \multicolumn{1}{c}{Freedom} &
\multicolumn{1}{c|}{Squares}  \\ \hline row& $k-1$ &
$k \sum_{i=1}^{k} {( \bar{y}_{i \cdot \cdot} - \bar{y}_{ \cdot \cdot \cdot})}^{2}$\\
column& $k-1$ &
$k \sum_{j=1}^{k} {( \bar{y}_{\cdot j \cdot} - \bar{y}_{ \cdot \cdot \cdot})}^{2}$\\
treatment& $k-1$ &
$k \sum_{l=1}^{k}  {( \bar{y}_{\cdot \cdot l} - \bar{y}_{\cdot \cdot \cdot})}^{2}$\\
residual & $(k-1)(k-2)$ & $\sum_{(i, j, l) \in S} {( y_{ijl} -
\bar{y}_{i \cdot \cdot} -\bar{y}_{\cdot j \cdot} -\bar{y}_{\cdot
\cdot l} +
2\bar{y}_{\cdot \cdot \cdot})}^{2}$\\
total &  $k^2 -1$&
$\sum_{(i, j, l) \in S} {( y_{ijl} - \bar{y}_{\cdot \cdot \cdot})}^{2}$\\
\hline
\end{tabular}
\large\normalsize \label{tab:ANOVA-ls}
\end{table}

\begin{table}[htbp]
\caption{ANOVA Table, Wear Experiment}
%\large\small
$ $\\
\centering
\begin{tabular} {|llrrr|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{Degrees of} &
\multicolumn{1}{c}{Sum of} & \multicolumn{1}{c}{Mean}  &
\multicolumn{1}{c|}{}  \\
\multicolumn{1}{|c}{Source} & \multicolumn{1}{c}{Freedom} &
\multicolumn{1}{c}{Squares} & \multicolumn{1}{c}{Squares}  &
\multicolumn{1}{c|}{$F$}  \\ \hline
application      & 3 &   986.5& 328.833& 5.37\\
position      & 3 &  1468.5& 489.500& 7.99\\
material      & 3 &  4621.5&1540.500&25.15\\
residual& 6 &   367.5&  61.250&\\ \hline
\end{tabular}
%\large\normalsize
\label{tab:ANOVAwear}
\end{table}
}

\es

%---------------------------------------------------------------------
%  37 ----------------------------------------------------------------

\bs

  \heading{$F$ Test and Multiple Comparisons}
\bi
  \item $H_0: \tau_1= \cdots = \tau_k$, can be tested by using the $F$
statistic
\begin{eqnarray*}
F=\frac{SS_t /(k-1)}{SS_r /(k-1)(k-2)}, \label{eqn:FfornoTdiff}
\end{eqnarray*}

 The $F$ test rejects $H_0$ at level $\alpha$ if $F > F_{k-1, (k-1)(k-2), \alpha}$.

\item If $H_0$ is rejected, multiple comparisons of the $\tau_{j}$
should be performed. \\ $t$ statistics for making multiple
comparisons :
\begin{eqnarray*}
t_{ij}= \frac { \bar{y}_{ \cdot \cdot j}-\bar{y}_{\cdot \cdot i}
}{\hat{\sigma}\sqrt{1/k + 1/k}}, \label{eqn:tRB}
\end{eqnarray*}
where $\hat{\sigma}^2$ is the mean square error in the ANOVA
table.

\item At level $\alpha$, the Tukey multiple comparison method
identifies ``treatments $i$ and $j$ as different'' if
\begin{displaymath}
|t_{ij}| >\frac{1}{\sqrt{2}} q_{k,(k-1)(k-2),\alpha}.
\end{displaymath}

\ei



\es


%---------------------------------------------------------------------
%  38 ----------------------------------------------------------------

\bs

  \heading{Analysis Results}
\bi

\item The p values for application and position are
0.039(=$Prob(F_{3,6}> 5.37)$) and 0.016(=$Prob(F_{3,6}> 7.99)$),
respectively. This indicates that blocking is important. \item The
treatment factor (material) has the most significance as indicated
by a p value of 0.0008 (= $Prob(F_{3,6}$ $>$ $25.15)$). \item With
$k$=4 and $(k-1)(k-2)$=6,
%***here not N-k, just df of error sums of squares ***,
the critical value for the Tukey multiple comparison method is
\begin{displaymath}
\frac{1}{\sqrt{2}}q_{4,6,0.05}=\frac{4.90}{\sqrt{2}}=3.46
\end{displaymath}
at the 0.05 level.
%> 4.90/sqrt(2) %[1] 3.464823
\item By comparing the multiple comparisons $t$ statistics given
in Table~\ref{tab:WearTvalues} with 3.46, material $A$ and $B$,
$A$ and $C$, $A$ and $D$ and $B$ and $C$ are identified as
different at 0.05 level.
  \ei



 \es
%---------------------------------------------------------------------
%  39 ----------------------------------------------------------------

\bs

  \heading{Multiple Comparisons Tables }

{\footnotesize

\begin{table}[htbp]
\caption{Multiple Comparison $t$ Statistics, Wear Experiment}
\begin{center}
\begin{tabular}{|rrrrrr|} \hline
\multicolumn{1}{|c}{$A$ vs.\ $B$}  & \multicolumn{1}{c} {$A$ vs.\
$C$}  & \multicolumn{1}{c} {$A$ vs.\ $D$}  & \multicolumn{1}{c}
{$B$ vs.\ $C$}  & \multicolumn{1}{c} {$B$ vs.\ $D$}  &
\multicolumn{1}{c|}{$C$ vs.\ $D$}  \\ \hline
 -8.27 &
 -4.34 &
 -6.37&
  3.93&
  1.90 &
 -2.03\\ \hline
\end{tabular}
\end{center}
\label{tab:WearTvalues}
\end{table}


\begin{table}[htbp]
\caption{ANOVA Table (Ignoring Blocking), Wear Experiment}
%\large\small
$ $\\
\centering
\begin{tabular} {|lrrrr|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{Degrees of} &
\multicolumn{1}{c}{Sum of} & \multicolumn{1}{c}{Mean}  &
\multicolumn{1}{c|}{}  \\
\multicolumn{1}{|c}{Source} & \multicolumn{1}{c}{Freedom} &
\multicolumn{1}{c}{Squares} & \multicolumn{1}{c}{Squares}  &
\multicolumn{1}{c|}{$F$}  \\ \hline
material &3  & 4621.5&1540.500&6.55\\
residual & 12 &  2822.5 &235.21 & \\  \hline
\end{tabular}
%\large\normalsize
\label{tab:ANOVAwearWOblock}
\end{table}


Effectiveness of blocking:\\
With blocking, $Pr(F_{3,6}$ $>$ $25.15)$ = 0.0008,\\
Without blocking, $Pr(F_{3,12}$ $>$ $6.55)$ = 0.007.\\
Therefore blocking can make a difference in decision making if
treatment effects are smaller.
}
 \es

%---------------------------------------------------------------------
%  40 ----------------------------------------------------------------

\bs

  \heading{Graeco-Latin Square Design}

\bi
 \item Two Latin squares are $orthogonal$ if each pair of letters
 appears once in the two squares, when superimposed. The
 super-imposed square is called a \emph{Graeco-Latin square}.

 %\begin{table}
\begin{center}
\begin{tabular}{ |ccc|} \hline
$A\alpha$ & $B\beta$ & $C\gamma$ \\
$B\gamma$ & $C\alpha$ & $A\beta$ \\
$C\beta$  & $A\gamma$ & $B\alpha$ \\
\hline \end{tabular}
\end{center}
%\end{table}

\item Useful for studying four factors (1 treatment, 3 blocking
factors; or 2 treatment, 2 blocking factors etc.) allowing one
more factor to be studied than in LS.

\ei \es

%---------------------------------------------------------------------
%  41 ----------------------------------------------------------------

\bs

  \heading{Model and ANOVA in Graeco-Latin Square Design}

Model:
\begin{eqnarray*}
  y_{ijlm} = \eta + \alpha_i + \beta_j + \tau_l + \zeta_m + \epsilon_{ijlm},
%   \ i,j,l,m=1,\ldots,k,
\label{eqn:GraecoLatinSquareModel}
\end{eqnarray*}
(Similar interpretation as in LS, and $\zeta_m$ is the $m$th
effect of Greek letters). $F$ test and Tukey's multiple
comparisons similar formulae.

\begin{table}[htbp]
\caption{ANOVA Table for Graeco-Latin Square Design} $ $
\large\small \centering
\begin{tabular} {|lll|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{Degrees of} &
\multicolumn{1}{c|}{Sum of} \\
\multicolumn{1}{|c}{Source} & \multicolumn{1}{c}{Freedom} &
\multicolumn{1}{c|}{Squares}  \\ \hline row& $k-1$ &
$k \sum_{i=1}^{k} {( \bar{y}_{i \cdot \cdot \cdot} - \bar{y}_{ \cdot \cdot \cdot \cdot})}^{2}$\\
column& $k-1$ &
$k \sum_{j=1}^{k} {( \bar{y}_{\cdot j \cdot \cdot} - \bar{y}_{ \cdot \cdot \cdot})}^{2}$\\
Latin letter& $k-1$ &
$k \sum_{l=1}^{k}  {( \bar{y}_{\cdot \cdot l \cdot} - \bar{y}_{\cdot \cdot \cdot \cdot})}^{2}$\\
Greek letter& $k-1$ &
$k \sum_{m=1}^{k}  {( \bar{y}_{\cdot \cdot \cdot m} - \bar{y}_{\cdot \cdot \cdot \cdot})}^{2}$\\
residual & $(k-3)(k-1)$ &
by subtraction\\
total &  $k^2 -1$&
$\sum_{(i, j, l, m) \in S} {( y_{ijlm} - \bar{y}_{\cdot \cdot \cdot \cdot})}^{2}$\\
\hline
\end{tabular}
\large\normalsize \label{tab:ANOVAGraecoLatinSquare}
\end{table}

\es

%---------------------------------------------------------------------
%  42 ----------------------------------------------------------------

\bs

  \heading{Incomplete Blocking}

{\small
 \bi
 \item Blocking is $incomplete$ if the number of treatments $t$ is
greater than the block size $k$. This happens if the nature of
blocking makes it difficult to form blocks of large size.
 \item Example : wine or ice cream tasting, block size limited by taste
 buds.
 \item On the other hand, RBD has $complete$ blocking.
 \item Example: Tire wear experiment. Compare four components
 A,B,C,D in terms of wear. Because of manufacturing limitations,
 each tire can be divided into only three sections with each
 section being made of one compound.
\ei

\begin{table}[htbp]
%\normalsize\tiny
\caption{Wear Data, Tire Experiment} $ $
\begin{center}
\begin{tabular}{|lllll|} \hline
\multicolumn{1}{|c}{} &
\multicolumn{4}{c|}{Compound} \\
Tire&A&B&C&D\\ \hline
1& 238&238&279 & \\
2&196&213&&308\\
3&254&&334&367\\
4 &&312&421&412\\ \hline
\end{tabular}
\label{tab:tire}
\end{center}
%\tiny\normalsize
\end{table}
}

 \es

 %---------------------------------------------------------------------
%  43 ----------------------------------------------------------------

\bs

  \heading{Balanced Incomplete Block Design (BIBD)}

 \bi
 \item A BIBD has $t$ treatments, and $b$ blocks of size $k$,
 $t>k$, each treatment replicated $r$ times, such that each pair
 of treatments appear in the $same$ number (denoted by $\lambda$)
 of blocks.\\
 In the wear experiment, $t=4$, $k=3$, $b=4$, $r=3$ and
$\lambda=2$. \\Two basic relations:
\begin{eqnarray*}
bk & = & rt,
\label{eqn:BIBDidentity1}\\
r(k-1) & = & \lambda (t-1) . \label{eqn:BIBDidentity2}
\end{eqnarray*}(Proof of (i) and (ii).)

\item For given $k$, $t$ and $b$, a BIBD may or may not exist.
When it does not, either adjust the values of $k$, $t$, $b$ to get
a BIBD, or if not possible, find a partially balanced incomplete
block design (PBIBD) (which is not covered in the book). Tables of
BIBD or PBIBD in books like Cochran and Cox (1957).

 \ei


 \es

%---------------------------------------------------------------------
% 1 -----------------------------------------------------------------

\bs
  \heading{Example of Split-plot Design: Wood Experiment}

 \bi
 \item Experiment objective : to study the water resistant property of wood.
 \item Two factors: A---wood pretreatment, 2-level; B---type of stain, 4-level.
 \item Completely randomized design: randomly apply the 8 combinations of A and B to 8 wood panels, such as in Table \ref{tabsplitplot1}.
 \item Problem: inconvenient to apply the pretreatment to a small wood panel.
\ei {\footnotesize
\begin{table}
\begin{center}
\caption{Completely Randomized Version of the Wood Experiment\label{tabsplitplot1}}{%
\begin{tabular}{@{}ccccccccc@{}}
\hline Run & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\
\hline
Pretreatment ($A$) & $A1$ & $A2$ & $A2$ & $A1$ & $A2$ & $A1$ & $A1$ & $A2$ \\
\hline
Stain ($B$) & $B2$ & $B4$ & $B1$ & $B1$ & $B3$ & $B4$ & $B3$ & $B2$ \\
\hline
\end{tabular}}
{}{}
\end{center}
\end{table}}
\es

%---------------------------------------------------------------------
% 2 -------------------------------------------------------------------
\bs
  \heading{Split-plot Design}
\bi \item Alternative Design: split-plot design in Table
\ref{tabsplitplot2}. \ei
\begin{table}
\begin{center}
\caption{Split-Plot Version of the Wood Experiment\label{tabsplitplot2}}{%
\begin{tabular}{@{}|c|c|c|c|c|c|c|c|@{}}
\hline
\multicolumn{4}{|c|}{First panel} & \multicolumn{4}{|c|}{Second panel} \\
\multicolumn{4}{|c|}{Pretreated with $A1$} & \multicolumn{4}{|c|}{Pretreated with $A2$} \\
\hline
$B3$ & $B2$ & $B4$ & $B1$ & $B2$ & $B1$ & $B4$ & $B3$ \\
\hline
\end{tabular}}
{}{}
\end{center}
\end{table}
\centering Justification: Easier to apply pretreatment to
\emph{large} wood panels. \es

%---------------------------------------------------------------------
% 3 -------------------------------------------------------------------
\bs
  \heading{Split-plot Design (Cont'd) }
\bi \item Split-plot design (and the name) has its origin in
agriculture.

\item Some factors need to be applied to large plots, called
\emph{whole plots}. In the example, the two big wood panels to
which pretreatement A1 and A2 are applied are whole plots.

\item Split each whole plot into smaller plots, called
\emph{subplots}. In the example, the four small wood panels within
the large panels are subplots.

\item Wood Experiment: 3 replications, 6 whole plots (two large
panels for A1 and A2 per replication). \ei \es

%---------------------------------------------------------------------
% 4 -------------------------------------------------------------------
\bs
  \heading{Data from the Wood Experiment}
{\tiny
\begin{table}
\begin{center}
\begin{tabular}{cccc|c}
\hline Whole Plot & Pretreatment type ($A$) & Stain type ($B$) &
Replication (Rep) & Resistance ($Y$)
\\\hline
4 & 2 & 2 & 1 & 53.5 \\
4 & 2 & 4 & 1 &32.5 \\
4 & 2 & 1 & 1 &46.6 \\
4 & 2 & 3 & 1 &35.4 \\
5 & 2 & 4 & 2 &44.6 \\
5 & 2 & 1 & 2 &52.2 \\
5 & 2 & 3 & 2 &45.9 \\
5 & 2 & 2 & 2 &48.3 \\
1 & 1 & 3 & 1 &40.8 \\
1 & 1 & 1 & 1 &43.0 \\
1 & 1 & 2 & 1 &51.8 \\
1 & 1 & 4 & 1 &45.5 \\
2 & 1 & 2 & 2 &60.9 \\
2 & 1 & 4 & 2 &55.3 \\
2 & 1 & 3 & 2 &51.1 \\
2 & 1 & 1 & 2 &57.4 \\
6 & 2 & 1 & 3 &32.1 \\
6 & 2 & 4 & 3 &30.1 \\
6 & 2 & 2 & 3 &34.4 \\
6 & 2 & 3 & 3 &32.2 \\
3 & 1 & 1 & 3 &52.8 \\
3 & 1 & 3 & 3 &51.7 \\
3 & 1 & 4 & 3 &55.3 \\
3 & 1 & 2 & 3 &59.2 \\
\hline
\end{tabular}
\end{center}
\end{table}}
\es

%---------------------------------------------------------------------
% 5 -------------------------------------------------------------------
\bs
  \heading{Incorrect Model and Analysis}
\bi \item Two-way layout model (factors $A$ and $B$ with $n$
replicates):
\begin{align*}
y_{ijk}&= \eta + \alpha_{i} + \beta_{j} + (\alpha \beta)_{ij} + \bm{\epsilon}_{ijk}, \nonumber\\
&\qquad \qquad \quad i = 1, \ldots, I; \quad j = 1, \ldots, J;
\quad k = 1, \ldots, n,
\end{align*}
where $I=2$, $J=4$, $n=3$.

\item ANOVA (table on next page) shows that only factor $A$ is
significant; neither $B$ nor $A\times B$ is significant.

\item The model is wrong: $A$ and $B$ use \emph{different}
randomization schemes. The error component should be separated
into two parts--the whole plot error and the subplot error. To
test the significance of various effects, we need to compare their
respective mean squares with two different error components. \ei
\es

%---------------------------------------------------------------------
% 6 -------------------------------------------------------------------
\bs
 \heading{Incorrect ANOVA Table}
\begin{table}
\vspace*{-5pt}
\caption{Incorrect ANOVA Table, Wood Experiment\label{tabsplitplot4}}{%
\begin{tabular}{@{}lcrrr@{}}
\hline Source &Degrees of Freedom &Sum of Squares &Mean Squares &$F$ \\
\hline
$A$ &\phantom{x}1 &\phantom{x}782.04 &\phantom{x}782.04 & 13.49 \\
$B$ &\phantom{x}3 & 266.00 & 88.67 & 1.53 \\
$A$ $\times$ $B$ &\phantom{x}3 &\phantom{x}62.79 &\phantom{x}20.93 &\phantom{x}0.36 \\
Residual &16 &927.88 &\phantom{xx}57.99 &{} \\
Total &23 &2038.72 &{} &{} \\
\hline
\end{tabular}}{}{}
\vspace*{-5pt}
\end{table}
 \bi
\item Only $A$ is significant.
 \ei
 \es

%---------------------------------------------------------------------
% 7 -------------------------------------------------------------------
\bs
  \heading{Correct Model}
\begin{align}
\label{eqsplitplot2}
y_{ijk} &= \eta + \tau_k + \alpha_{i} + (\tau \alpha)_{ki} + \beta_{j} + (\alpha \beta)_{ij} + (\tau \beta)_{kj} + (\tau \alpha \beta)_{kij}+\epsilon'_{ijk}, \nonumber\\
&\qquad \qquad \quad i = 1, \ldots, I; \quad j = 1, \ldots, J;
\quad k = 1, \ldots, n,
\end{align}
\bi
 \item $y_{ijk}$: observation for the $k$th replicate of the
$i$the level of factor $A$ and the $j$th level of factor $B$,
$\epsilon'_{ijk}$ are independent error terms.
 \item Treat $\tau_k$ as a {\bf random} effect (because there are
 potentially many other possible replications).
 \ei
\begin{center}
{\footnotesize
\begin{tabular}{|l|l||l|l|}\hline
\multicolumn{2}{|c||}{ Terms representing the whole plot} &
\multicolumn{2}{c|}{ Terms representing the subplot}\\\hline
$\tau_k$ & effect of $k$th replicate & $\beta_j$ & $j$th main effect of $B$\\
$\alpha_i$ & $i$th main effect for $A$ & $(\alpha \beta)_{ij}$ & $(i,j)$th interaction $A\times B$\\
$(\tau \alpha)_{ki}$ & $(k,i)$th interaction replicate$\times A$ & $(\tau \beta)_{kj}$ & $(k,j)$th interaction replicate$\times B$\\
& & $(\tau \alpha \beta)_{kij}$ &  $(k,i,j)$th interaction
replicate $\times A \times B$\\\hline
\end{tabular}}
\end{center}
\es

%---------------------------------------------------------------------
% 7' -------------------------------------------------------------------
\bs
  \heading{Model for Split-plot Design}
\bi
 \item Model (\ref{eqsplitplot2}) can be viewed as a three-way
 layout with $\alpha_i$ and $\beta_j$ as \emph{fixed}
 effects, $\tau_k$ as \emph{random} effects, $\tau_k \sim
 N(0,\sigma_{\tau}^2)$.
 \item whole plot error:
$(\tau\alpha)_{ki}\sim N(0, \sigma_{\tau\alpha}^2)$, for testing
$\alpha$ effects.
 \item subplot error: $\epsilon_{kij}= (\tau \beta)_{kj} + (\tau \alpha \beta)_{kij}+\epsilon'_{ijk} \sim
 N(0,\sigma^2_{\epsilon})$, for testing $\beta$ and $\alpha\beta$
 effects.
 \item Model (\ref{eqsplitplot2}) can be rewritten as
 \begin{equation}
 \label{eqsplitplot3}
 y_{ijk} = \eta + \tau_k + \alpha_{i} + (\tau
 \alpha)_{ki} + \beta_{j} + (\alpha \beta)_{ij} +  \epsilon_{kij}.
 \end{equation}
 \item Subplot error is usually \emph{smaller} than whole plot error
 because subplots are more homogeneous than whole plots.
 \ei
\es


%---------------------------------------------------------------------
% 7 -------------------------------------------------------------------
\bs
  \heading{ANOVA Decomposition}
 \bi
 \item Use the zero-sum constraints: {\footnotesize
$\sum_{i=1}^I \alpha_i = \sum_{j=1}^J \beta_j =
\sum_{i=1}^I\sum_{j=1}^J (\alpha \beta)_{ij} = 0$}, break up the
total sum of squares as a three-way layout with factors $A$, $B$,
and Rep: {\footnotesize  \[SST=SS_{\mbox{Rep}}+SS_{A}+SS_B+
SS_{\mbox{Rep}\times A }+SS_{A\times B }+ SS_{\mbox{Rep}\times B
}+ SS_{\mbox{Rep}\times A\times B}.\]}
  \item Define the sum of squares for the whole plot error
  $SS_{\mbox{whole}}$ and the sum of squares for the subplot error
  $SS_{\mbox{sub}}$ as:
\begin{align*}
SS_{\mbox{whole}} &= SS_{\mbox{Rep} \times A},\\
SS_{\mbox{sub}} &= SS_{\mbox{Rep} \times B} +SS_{\mbox{Rep} \times
A \times B}.
\end{align*}
ANOVA decomposition for the split-plot model:
\[ SST=SS_{\mbox{Rep}}+SS_{A}+SS_{\mbox{whole}}+SS_B+SS_{A\times
B}+SS_{\mbox{sub}}.\]
 \ei
  \es

%---------------------------------------------------------------------
% 8' -------------------------------------------------------------------
\bs
 \heading{ANOVA Decomposition (Cont'd)}
 \begin{table}
\begin{center}
\vspace*{-5pt}
\caption{Wood Experiment : Summarized data for whole plot analysis\label{tabsplitplot5}}{%
\begin{tabular}{@{}lcccc@{}}
\hline  & Rep 1 & Rep 2 & Rep 3 & Total \\
\hline
$A1$ & 181.1 & 224.7 & 219.0 & 624.8 \\
$A2$ & 168.0 & 191.0 & 128.8 & 487.8 \\
Total & 349.1 & 415.7 & 347.8 & 1112.6 \\
\hline
\end{tabular}}{}{}
\vspace*{-5pt}
\end{center}
\end{table}
\vspace{-0.5 cm}
\begin{align*}
SS_{A} &= (624.8^2 + 487.8^2)/12 - 1112.6^2/24 = 782.04, \\
SS_{\mbox{Rep}} &=  (349.1^2 + 415.7^2 + 347.8^2)/8 - 1112.6^2/24 = 376.99, \\
SS_{\mbox{whole}} &= SS_{\mbox{Rep} \times A} =
398.37,\\
SS_{\mbox{sub}} &= 927.88 - SS_{\mbox{whole}} -
SS_{\mbox{Rep}}=152.52.
\end{align*}
\es

%---------------------------------------------------------------------
% 8 -------------------------------------------------------------------
\bs
  \heading{Expected Mean Squares in ANOVA}
{\footnotesize
\begin{table}
\begin{center}
\vspace*{-5pt}
\begin{tabular}{lccc}
\hline Source & Effect &df & E(Mean Squares) \\
\hline
Replicate & $\tau_k$ &$n-1$ & $\sigma^2_{\epsilon} + J\sigma^2_{\tau\alpha}+ IJ \sigma^2_{\tau}$ \\\\
$A$ & $\alpha_i$ & $I-1$ & $\sigma^2_{\epsilon} + J \sigma^2_{\tau \alpha} + \frac{nJ \sum_{i=1}^I \alpha^2_{i}}{I-1}$ \\\\
Whole plot error & $(\tau \alpha)_{ki}$ & $(I-1)(n-1)$ & $\sigma^2_{\epsilon} + J \sigma^2_{\tau \alpha}$ \\\\
$B$ & $\beta_j$ & $J-1$ & $\sigma^2_{\epsilon} + \frac{nI \sum_{j=1}^J \beta^2_{j}}{IJ-1}$ \\\\
$A \times B$ & $(\alpha \beta)_{ij}$ & $(I-1)(J-1)$ & $\sigma^2_{\epsilon} + \frac{n \sum_{i=1}^I \sum_{j=1}^J (\alpha \beta)^2_{ij}}{(I-1)(J-1)}$ \\\\
Subplot error & $\epsilon_{kij}$ & $I(J-1)(n-1)$ & $\sigma^2_{\epsilon}$ \\\\
\hline
\end{tabular}
\vspace*{-5pt}
\end{center}
\end{table}}
Proofs are similar to but more tedious than in one-way random
effects model.
 \es

%---------------------------------------------------------------------
% 9 -------------------------------------------------------------------
\bs
  \heading{Hypothesis Testing}
\begin{align*}
F_A=\frac{MS_{A}}{MS_{\mbox{whole}}}\quad &\Rightarrow\quad
H_{01}: \alpha_1 = \ldots = \alpha_I,\\
F_B=\frac{MS_{B}}{MS_{\mbox{sub}}}\quad &\Rightarrow \quad
H_{02}: \beta_1 = \ldots =\beta_J,\\
F_{AB}=\frac{MS_{A\times B}}{MS_{\mbox{sub}}}\quad
&\Rightarrow\quad H_{03}:(\alpha \beta)_{ij} = \textrm{constant},
\ i = 1, \ldots, I,\ j = 1,
\ldots, J. \\
F_{Rep}=\frac{MS_{\mbox{Rep}}}{MS_{\mbox{whole}}}\quad
&\Rightarrow\quad H_{04}: \sigma_{\tau}=0.
\end{align*}
 \es

% 10 -------------------------------------------------------------------
\bs
 \heading{Correct ANOVA Analysis}
\begin{table}
\centering
 \vspace*{-5pt}
\caption{Correct ANOVA Table, Wood Experiment\label{tabsplitplot6}}{%
\begin{tabular}{@{}lcrrr@{}}
\hline Source &Degrees of Freedom &Sum of Squares &Mean Squares &$F$ \\
\hline
Replicate & 2 & 376.99 & 188.50 & 0.95 \\
$A$ & 1 & 782.04 & 782.04 & 3.93 \\
Whole plot error & 2 & 398.37 & 199.19 & {} \\ \hline
$B$ & 3 & 266.00 & 88.67 & 6.98 \\
$A$ $\times$ $B$ & 3 & 62.79 & 20.93 & 1.65 \\
Subplot error & 12 & 152.52 & 12.71 &{} \\ \hline
Total & 23 & 2038.72 &{} &{} \\
\hline
\end{tabular}}{}{}
%\vspace*{-5pt}
\end{table}
\bi
 \item p value for A testing $H_0:$ all $\alpha_i=0$ is 0.186.

\item p value for B testing $H_0:$ all $\beta_j=0$ is 0.006.
\ei
\es

% 11 -------------------------------------------------------------------
\bs
 \heading{Analysis Results}
 \bi
 \item Only $B$ is significant.
 \item Explanation for discrepancy: $MS_{\mbox{whole}}=199.19\gg
 MS_{\mbox{Residual}}=57.99\gg MS_{\mbox{sub}}=12.71$.
 \item To test $H_{04}:\sigma_{\tau}=0$, use
 \[
  \frac{MS_{\mbox{Rep}}}{MS_{\mbox{whole}}}=\frac{188.5}{199.19}=0.95.\]
$\Rightarrow$ no significant difference between three
replications.

\item When does testing $H_{04}$ make sense?

 \ei
\es




 %---------------------------------------------------------------------
%  44 ----------------------------------------------------------------

\bs

  \heading{Analysis of Covariance: Starch Experiment}

 \bi
 \item Data in Table 3.34 of WH. Goal: To compare the three
 treatments (canna, corn, potato) for making starch film,
 $y$ = break strength of film, covariate $x$ = film
 thickness. Known that $x$ affects $y$ (thicker films are
 stronger); thickness cannot be controlled but are measured after
 films are made.\\
 \textbf{Question}: How to perform treatment comparisons by
 incorporating the effect of the covariate $x$?

\item Model:
\begin{eqnarray*}
y_{ij}= \eta + \tau_i + \gamma x_{ij} + \epsilon_{ij}, \; i = 1,
\ldots, k, \; j = 1, \ldots, n_i, \label{eqn:ancovaII}
\end{eqnarray*}
$\tau_i$ = $i$th treatment effect\\
$x_{ij}$ = covariate value,\\
$\gamma$ = regression coefficient for the $x_{ij}$\\
$\epsilon_{ij}$ independent $N(0,\sigma^2)$.

\textbf{Special cases:}
 \begin{enumerate}
  \item When $\gamma x_{ij}$=0 (i.e., $x_{ij}$ not available or no $x$ effect), one-way layout.
  \item When $\tau_i$=0 (no treatment effect), simple linear
  regression.
  \end{enumerate}

 \ei


 \es


 %---------------------------------------------------------------------
%  45 ----------------------------------------------------------------

\bs

  \heading{Regression Model Approach}

\noindent Model :

\begin{equation}
\begin{array}{rclll}
y_{1j} & = &\eta+\gamma x_{1j}+\epsilon_{1j}, &j = 1,
\cdots, 13, \;i=1\; &\mbox{\rm (canna)}\\
y_{2j} & = & \eta+\tau_2+\gamma x_{2j}+\epsilon_{2j}, & j = 1,
\cdots, 19, \;i=2\; & \mbox{\rm (corn)}\\
y_{3j} & = & \eta+\tau_3+\gamma x_{3j}+\epsilon_{3j}, & j = 1,
\cdots, 17, \;i=3\; & \mbox{\rm (potato)}
\end{array}
\label{eqn:starchMBaseline}
\end{equation}
where \\
$\tau_1$ is set to zero (baseline constraint), \\
$\eta$ = intercept, \\
$\gamma$ = regression coefficient for thickness, \\
$\tau_2$ = canna vs. corn, and \\
$\tau_{3}$ = canna vs. potato.\\ (Write the model matrix for
(\ref{eqn:starchMBaseline})).

\noindent Run regression analysis in the usual way.

\es


 %---------------------------------------------------------------------
%  46 ----------------------------------------------------------------

\bs

  \heading{Regression Analysis of Starch Experiment}

{\footnotesize
\begin{table}[htbp]
\caption{Tests, Starch Experiment}
\begin{center}
\begin{tabular}{|lrrrr|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{} &
\multicolumn{1}{c}{Standard} & \multicolumn{1}{c}{} &
\multicolumn{1}{c|}{} \\
\multicolumn{1}|{c}{ Effect} & \multicolumn{1}{c}{Estimate} &
\multicolumn{1}{c}{Error} & \multicolumn{1}{c}{$t$} &
\multicolumn{1}{c|}{   p value}\\ \hline
intercept& 158.261& 179.775&    0.88  & 0.38\\
thickness&  62.501&  17.060&    3.66  & 0.00\\
canna vs.\ corn& -83.666&  86.095&   -0.97  & 0.34\\
canna vs.\ potato&  70.360&  67.781&    1.04  & 0.30\\[-5pt]
\multicolumn{5}{|c|}{$- - - - - - - - - - - - - - - - - - - - - - - - - -$}\\[-5pt]
corn vs.\ potato&  154.026&  107.762&    1.43  & 0.16 \\
\hline
\end{tabular}
\end{center}
\label{tab:StarchTests}
\end{table}
} In the table, corn vs. potato $= \hat{\tau}_3 - \hat{\tau}_2 =
70.360 - (-83.666)  =  154.026.$

\noindent No pair of film types has any significant difference
after adjusting for thickness effect. (So, how should the choice
be made between the three film types ?) Most of the variation is
explained by the covariate thickness.

 \es


 %---------------------------------------------------------------------
%  47 ----------------------------------------------------------------

\bs

  \heading{Multiple Comparisons}
\vspace{0.2 in}
%{\bf Multiple Comparisons}

$Var(\hat{\tau}_3)$ and $Var(\hat{\tau}_2)$ can be obtained  from
regression output.
 From (1.33) of WH,
$$Var(\hat{\beta})=\sigma^2(X^TX)^{-1}.$$ Using this,
$t_{(\hat{\tau}_3-\hat{\tau}_2)}$ can be found as
$Var(\hat{\tau}_3-\hat{\tau}_2)=Var(\hat{\tau}_3)+Var(\hat{\tau}_2)-2Cov(\hat{\tau}_3,\hat{\tau}_2)$.
The degrees of freedom for the $t$ statistic is same as that of
the residuals. The p values for the three tests are given in Table
\ref{tab:StarchTests}. For simultaneous testing, use adjusted p
values.


\es


 %---------------------------------------------------------------------
%  48 ----------------------------------------------------------------

\bs

  \heading{ANCOVA Table}

\vspace{0.3 in}

\begin{table}[htbp]
\caption{ANCOVA Table, Starch Experiment}
$ $\\
\centering \large\small
\begin{tabular} {|lrrrr|} \hline
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{Degrees of} &
\multicolumn{1}{c}{Sum of} & \multicolumn{1}{c}{Mean}  &
\multicolumn{1}{c|}{}  \\
\multicolumn{1}{|c}{Source} & \multicolumn{1}{c}{Freedom} &
\multicolumn{1}{c}{Squares} & \multicolumn{1}{c}{Squares}  &
\multicolumn{1}{c|}{$F$}  \\ \hline
thickness & 1 & 2553357&2553357&94.19\\
starch& 2 &   56725&  28362& 1.05\\
residual &45 & 1219940&  27110&\\ \hline
\end{tabular}
\label{tab:ANCOVAstarch} \large\normalsize
\end{table}

\es



%---------------------------------------------------------------------
%  27 ----------------------------------------------------------------

\bs
  \heading{Transformation of Response}

\vspace{0.3 in}

\bi
 \item Transform y before fitting a regression model. \\
 Theory: Suppose in the model $y = \mu + \epsilon$, $\sigma_y =
 [Var(y)]^{1/2}$, $\sigma_y \propto \mu^\alpha$.
 This can be detected by plotting residuals $r_{ij}$ = $y_{ij}$ - $\bar{y}_{i \cdot}$
against $\bar{y}_{i \cdot}$ (for replicated experiment) or
$r_{i}=y_{i}-\hat{y}_{i}$ against $\hat{y}_{i}$ (for unreplicated
experiment). (What pattern to look for ?)
 \item Error transmission formula:

 \[z = f(y) \approx f(\mu) + f'(\mu)(y-\mu) .\]
\begin{eqnarray*}
\sigma_{z}^{2}=Var{(z)}\approx(f'(\mu))^{2}Var(y)=(f'(\mu))^2\sigma_{y}^{2}.
\label{eqn:varZapp}
\end{eqnarray*}

\ei

\es

%---------------------------------------------------------------------
%  28 ----------------------------------------------------------------

\bs
  \heading{Power (Box-Cox) Transformation}
\begin{eqnarray}
z=f(y) &=& \left\{
\begin{array}{ll}
\displaystyle{\frac{y^{\lambda} -1} {\lambda}} , & \lambda \ne 0,\\
\ln y , & \lambda = 0,\\
\end{array}
\right.\\ \label{eqn:powerTransformation}
\nonumber f'(\mu) &=& \mu^{\lambda-1},\\
\nonumber \sigma_z \approx |f'(\mu)| \sigma_y &=&
\mu^{\lambda-1}\sigma_y \propto  \mu^{\lambda-1} \mu^{\alpha} =
\mu^{\lambda + \alpha -1 } . \label{eqn:varyapp}
\end{eqnarray}

 \bi
  \item Choosing $\lambda= 1- \alpha$ would make $\sigma_z$ {\it nearly
constant}.

\item Since $\alpha$ is unknown, $\lambda$ can be chosen by some
 statistical criterion (e.g., maximum likelihood). A simpler
 method is to try a few selected values of $\lambda$ (see Table
 28). In each transform, analyze the z data and choose the
 transformation (i.e., $\lambda$ value) such that\\
 (a) it gives a parsimonious model,\\
 (b) no unusual pattern in the residual plots,\\
 (c) good interpretation of the transformation.\\
 {\footnotesize Example of (c): $y$ = survival time, $y^{-1}$ = rate of dying in
 the example of Box-Cox(1964).}
\ei \es

%---------------------------------------------------------------------
%  29 ----------------------------------------------------------------

\bs
  \heading{Variance Stabilizing Transformations}

\begin{table}[htbp]
\caption{Variance Stabilizing Transformations}
\begin{center}
\begin{tabular}{|lrrl|} \hline
\multicolumn{1}{|c}{$\sigma_y \propto \mu^\alpha$}  &
\multicolumn{1}{c}{$\alpha$}  & \multicolumn{1}{c}{$\lambda = 1 -
\alpha$}  & \multicolumn{1}{c|}{Transformation}   \\ \hline
$\sigma_y \propto \mu^{3}$ & 3 & $-2$ &reciprocal squared \\
$\sigma_y \propto \mu^{2}$ & 2 & $-1$ &reciprocal \\
$\sigma_y \propto \mu^{3/2}$ & 3/2 & $-1/2$ &reciprocal square root \\
$\sigma_y \propto \mu$ & 1 & 0 & log\\
$\sigma_y \propto \mu^{1/2}$ & 1/2 & 1/2 &square root \\
$\sigma_y \propto {\rm constant}$ & 0 & 1 & original scale\\
$\sigma_y \propto \mu^{-1/2}$ & $-1/2$ & 3/2 &3/2 power\\
$\sigma_y \propto \mu^{-1}$ & $-1$ & 2 &square\\
\hline
\end{tabular}
\end{center}
\label{tab:transformation}
\end{table}

\es

%---------------------------------------------------------------------
%  30 ----------------------------------------------------------------

\bs
  \heading{Analysis of Drill Experiment}

 \bi
  \item Data in Table 3.40 of WH. Four factors A,B,C and D, each at two
  levels, using a $2^4$ design. Fit a model with 4 main effects
  and 6 two-factor interactions (2fi's). The $\hat{r}$-vs-$\hat{y}$ plot
  shows an increasing pattern.
 \ei
 \begin{figure}[htbp]
\centerline{\psfig{figure=picture/drillresvsfity.ps,width=2.
in,height=2.5 in,angle=-90}}
 \caption{$r_i$ vs. $\hat{y}_i$, Drill Experiment} \label{fig:resvsfityforDrill}
\end{figure}

\es



%---------------------------------------------------------------------
%  31 ----------------------------------------------------------------

\bs
  \heading{Scaled lambda plot}
\vspace{0.2 in} \bi \item For each of the eight transformations
$\lambda$ values in Table 28, a model of main effects and 2fi's is
fitted to the transformed $z=f(y)$. The $t$ statistic values for
the 10 effects are displayed.

\item {\bf Comments on plot :} For the log transformation
($\lambda=0$), the largest $t$ statistics ($C$, $B$, and $D$)
stand out.  The next best is $\lambda = -1/2$, but not as good
(Why ? It has an interaction $BC$). The log transform removes the
interaction term $BC$.


 On the original scale ($\lambda=1$), the four main effects do not
separate apart.

\item {\bf Conclusion :} Use log transformation.
 \ei

\es

%---------------------------------------------------------------------
%  32 ----------------------------------------------------------------

\bs

\heading{Scaled lambda plot : Drill Experiment}
 \begin{figure}[htbp]
\centerline{\psfig{figure=picture/boxcox_v3.ps,width=2.7in,height=3.9in,angle=270}}
\caption{Scaled $\lambda$ Plot (lambda denotes the power $\lambda$
in the transformation (9))} \label{fig:LambdaPlot}
\end{figure}

\es

\bs
  \heading{Comments on Board}
 \vspace{3 in} \es

\end{document}


\begin{comment}


%---------------------------------------------------------------------
% 49 -----------------------------------------------------------------

\bs
  \heading{Split-plot Design}

\vspace{0.2 in}
\begin{center}
\textbf{An experiment to improve yield}
\end{center}

\vspace{0.2 in}

 \bi
 \item Objective : To study the effect of three types of irrigation methods ($A$) and four different weed
 control methods ($B$) on yield of a crop.
 \item Considering the minimum area necessary for using a particular
 irrigation method, 9 plots (experimental units) are available
 (Figure 1).
 \item Since fertility of the land is suspected to increase in the direction as
 shown in Figure 1, three blocks are created.
 \item In each block $3 \times 4 = 12$ treatment combinations are
 to be tested.
 \ei
\es



%---------------------------------------------------------------------
% 50 -------------------------------------------------------------------

\bs
  \heading{Main(Whole) Plots and Whole-Plot Treatments}

\begin{figure}[htbp]
\centerline{\psfig{figure=picture/splitplot1.eps,width=4.in,height=2.in,angle=0}}
\caption{The whole plots and the blocks} \label{fig:splitplot1}
\end{figure}

\bi
 \item We thus have 9 \emph{whole plots} or \emph{whole plots} and the three levels of factor $A$ (irrigation
 methods) are called the \emph{whole plot treatments}.
 \item How should the four levels of factor $B$ (weed control
 method) be applied?
\ei \es


%---------------------------------------------------------------------
% 51 -------------------------------------------------------------------

\bs
  \heading{Sub Plots and Sub-Plot Treatments}

\begin{figure}[htbp]
\centerline{\psfig{figure=picture/splitplot2.eps,width=4.in,height=2.in,angle=0}}
\caption{Subplots within whole plots} \label{fig:splitplot1}
\end{figure}

\bi
 \item Each whole plot is divided into four \emph{subplots} or \emph{split-plots}.
 \item Four types of weed control methods are applied to these
 four subplots.
 \item This is called a \emph{split-plot} experiment and the
 design is a \emph{split-plot} design.
\ei \es



%---------------------------------------------------------------------
% 52-------------------------------------------------------------------

\bs

\heading{Experimental Data and Linear Model}

\begin{figure}[htbp]
\centerline{\psfig{figure=picture/splitplot3.eps,width=3in,height=1.5in,angle=0}}
\caption{Measured yield in each subplot} \label{fig:splitplot1}
\end{figure}


 \bi
  \item The linear model for the split-plot design is
    \begin{eqnarray}
    y_{ijk} = \mu + \tau_i + \alpha_j + (\tau \alpha)_{ij} +
    \beta_k + (\tau \beta)_{ik} + (\alpha \beta)_{jk} + (\tau
    \alpha \beta)_{ijk} + \epsilon_{ijk}, \\
    i = 1,2, \ldots, r, \;\; j = 1,2, \ldots, a, \;\; k = 1,2, \ldots,
    b. \nonumber
    \end{eqnarray}
   \item Here, $r =$ number of blocks = 3, $a =$ number of whole plot
    treatments = 3, and $b =$ number of subplot treatments = 4.
 \ei

\es



%---------------------------------------------------------------------
% 53-----------------------------------------------------------------

\bs
  \heading{Components of the linear model}
In the linear model
\begin{eqnarray*}
    y_{ijk} = \mu + \tau_i + \alpha_j + (\tau \alpha)_{ij} +
    \beta_k + (\tau \beta)_{ik} + (\alpha \beta)_{jk} + (\tau
    \alpha \beta)_{ijk} + \epsilon_{ijk}, \\
    i = 1,2, \ldots, r, \;\; j = 1,2, \ldots, a, \;\; k = 1,2, \ldots,
    b.
    \end{eqnarray*}
    \bi
     \item $y_{ijk}$ : response corresponding to the $i^{th}$ block,
   $j^{th}$ level of whole plot treatment, $k^{th}$ level of
   subplot treatment.
     \item Terms representing the whole plot are
        \small
        \bi
           \item $\tau_i$ : effect of $i^{th}$ block,
           \item $\alpha_j$ : effect of $j^{th}$ level of whole plot factor
           ($A$ or irrigation type),
           \item $(\tau \alpha)_{ij}$ : block $\times A$
           interaction; also treated as \textbf{whole plot error}.
        \ei
        \normalsize
      \item Terms representing the subplot are
        \bi
          \small
           \item $\beta_k$ : effect of $k^{th}$ level of subplot factor
           ($B$ or weed control method),
           \item $(\tau \beta)_{ik}$ : block $\times B$
           interaction.
           \item $(\alpha \beta)_{ij}$ : $A \times B$
           interaction.
           \item $(\tau \alpha \beta)_{ijk}$ : block $\times A \times B$
           interaction (three-factor);also treated as \textbf{sub-plot error}.
        \ei
       \normalsize
    \ei \es


%---------------------------------------------------------------------
% 54-----------------------------------------------------------------

\bs
  \heading{Model Assumptions and Expected Mean Squares}
\scriptsize \bi
 \item In this experiment, $\alpha_j$ and $\beta_k$ are \emph{fixed}
 effects.
 \item $\tau_i$ are \emph{random} effects; $\tau_i \sim N(0,
 \sigma^2_{\tau})$ (Note that blocks could have been chosen
 differently).
 \item Any interaction involving $\tau$ is also a \emph{random} effect.
 In particular, $(\tau \alpha)_{ij} \sim N(0,
 \sigma^2_{\tau \alpha}), \; \; (\tau \beta)_{ik} \sim N(0,
 \sigma^2_{\tau \beta}), \; \; (\tau \alpha \beta)_{ijk} \sim N(0,
 \sigma^2_{\tau \alpha \beta})$.
 \item $\epsilon_{ijk} \sim N(0, \sigma^2)$.
 \item Based on the above, expected mean squares for each component
 can be derived. These are shown in Table 1.
\ei

\begin{table}[htbp]
\scriptsize \caption{\small Expected Mean Squares of model
components}
\begin{center}
\begin{tabular}{|l|c|c|} \hline
 & Model component & Expected Mean Square\\ \hline
            & $\tau_i$  & $\sigma^2 + ab \sigma^2_{\tau}$ \\
 Whole plot & $\alpha_j$ & $\sigma^2 + b \sigma^2_{\tau \alpha} + \frac{rb \sum \alpha^2_j}{a-1}$ \\
            & $(\tau \alpha)_{ij}$ & $\sigma^2 + b \sigma^2_{\tau \alpha}$
            \\ \hline
            & $\beta_k$ & $\sigma^2 + a \sigma^2_{\tau \beta} + \frac{ra \sum \beta^2_k}{b-1}$ \\
            & $(\tau \beta)_{ik}$ & $\sigma^2 + a \sigma^2_{\tau \beta}$ \\
Subplot     & $(\alpha \beta)_{jk}$ & $\sigma^2 + \sigma^2_{\tau
\alpha \beta} + \frac{r \sum \sum (\alpha \beta)^2_{jk}}{(a-1)(b-1)}$   \\
            & $(\tau \alpha \beta)_{ijk}$ & $\sigma^2 + \sigma^2_{\tau \alpha \beta}$ \\
            & $\epsilon_{ijk}$ & $\sigma^2$ (Not estimable) \\ \hline
\end{tabular}
\label{tab:ems}
\end{center}
\end{table}
\normalsize

\es
%---------------------------------------------------------------------
% 55 ---------------------------------------------------------------

\bs
  \heading{Analysis of yield data}

\begin{table}[htbp]
\scriptsize \caption{\small Expected Mean Squares of model
components}
\begin{center}
\begin{tabular}{|lrrrrr|} \hline
 Source & df & SS & MS & F & $p$-value\\ \hline
 Blocks & 2 & 49.389 & 24.694 &  & \\
 Irrigation method $(A)$ & 2 & 89.556 & 44.778 & 7.33 & 0.046 \\
 Whole plot error (Blocks $\times A$)& 4 & 24.444 & 6.111 & & \\ \hline
 Weed control method $(B)$ & 3 & 289.889 & 96.630 & 48.54 & 0.000 \\
 Blocks $\times B$ & 6 & 11.944 & 1.991 &  & \\
 $A \times B$ & 6 & 51.111 & 8.519 & 3.24 & 0.039 \\
 Subplot error (Blocks $\times A \times B$) & 12 & 31.556 & 2.630 & &\\
 Total & 35 & 547.889 & & & \\ \hline
\end{tabular}
\label{tab:yieldanalysis}
\end{center}
\end{table}
\scriptsize

 \bi
   \item $F_A = MS(A)/MS$(Whole plot error).
   \item $F_B = MS(B)/MS$(Block $\times B$).
   \item $F_{AB} = MS(A \times B) / MS$(Subplot error).
   \item Both the factors as well as their interaction have a
   significant effect (at level 0.05) on yield.
   \item Note that the subplot error is less than the whole plot
   error. Should this be true in general? Why?
 \ei

\es

\end{document}
