\documentclass[11pt]{article}

\author{Jeremy Morris}
\title{Chapter 3 Homework}

\usepackage{amssymb,amsmath,amsfonts}
\usepackage[dvips]{graphicx}
\addtolength{\hoffset}{-1.05cm}
\addtolength{\textwidth}{2.5cm}
\addtolength{\textheight}{2.5cm}

\begin{document}
\maketitle
\begin{enumerate}
\setcounter{enumi}{3}
\item \textit{A factor often used in designs is Weeks.  Give a set of circumstances under which Weeks could be considered a fixed factor and under which Weeks could be considered a random factor. }

The variable Weeks could be considered fixed if an experiment was conducted during each of a specific number of weeks.  It would be random if the design included randomly selecting the weeks during which the experiment would be conducted.

\item \textit{Write the general model for a four factor completely randomized design having three repeats.  Use the letters $A_{i}$ having two levels, $B_{j}$ having three levels, $C_{k}$ having four levels and $D_{l}$ having two levels.  How many experimental units are required for this experiment?}

The general model would be 
\begin{eqnarray*}
y_{ijklm} & = & \mu + A_{i} + B_{j} + AB_{ij} + C_{k} + AC_{ik} + BC_{jk} + ABC_{ijk} \\
 & & + D_{l} + AD_{il} + BD_{jl} + CD_{kl} + ABD_{ijl} + ACD_{ikl} \\
 && + BCD_{jkl} + ABCD_{ijkl} + \varepsilon_{m(ijkl)}
\end{eqnarray*}
Subject to the assumptions
$A_{i} \sim N(0,\sigma_{A}^{2})$, 
$B_{j} \sim N(0,\sigma_{B}^{2})$, 
$AB_{ij} \sim N(0,\sigma_{AB}^{2})$, 
$C_{k} \sim N(0,\sigma_{C}^{2})$, 
$AC_{ik} \sim N(0,\sigma_{AC}^{2})$, 
$BC_{jk} \sim N(0,\sigma_{BC}^{2})$, 
$ABC_{ijk} \sim N(0,\sigma_{ABC}^{2})$, 
$D_{l} \sim N(0,\sigma_{D}^{2})$, 
$AD_{il} \sim N(0,\sigma_{AD}^{2})$, 
$BD_{jl} \sim N(0,\sigma_{BD}^{2})$, 
$CD_{kl} \sim N(0,\sigma_{CD}^{2})$, 
$ABD_{ijl} \sim N(0,\sigma_{ABD}^{2})$, 
$BCD_{ikl} \sim N(0,\sigma_{BCD}^{2})$, 
$BCD_{jkl} \sim N(0,\sigma_{BCD}^{2})$, 
$ABCD_{ijkl} \sim N(0,\sigma_{ABCD}^{2})$, 
$\varepsilon_{m(ijkl)} \sim N(0,\sigma_{\varepsilon}^{2})$.  For the factors in our model we have $I = 2$, $J = 3$, $K = 4$, $L = 2$ and $M = 3$.  This means that there are $IJKLM = 144$ repetitions of the experiment.

\item \textit{Using $A_{i}$ fixed at three levels and $B_{j}$ fixed at two levels, sketch a picture having $A_{i}$ significant, $B_{j}$ and $AB_{ij}$ insignificant.  Sketch a picture having $A_{i}$ and $B_{j}$ insignificant but $AB_{ij}$ significant.  Sketch a picture having $B_{j}$ insignificant, $A_{i}$ and $AB_{ij}$ significant.}

\includegraphics[scale=0.25]{p6a.eps}
\includegraphics[scale=0.25]{p6b.eps}
\includegraphics[scale=0.25]{p6c.eps}

\setcounter{enumi}{11}
\item \textit{Use the rules given in Section 3.3 to derive the formulae for df, SS, and MS for the two factor completely randomized design given by (3.2.2)}

The two factor model for this problem is
\begin{eqnarray}
y_{ijk} & = & \mu + A_{i} + B_{j} + AB_{ij} + \varepsilon_{k(ij)}
\end{eqnarray}
And the formulae will be

\begin{center}
\begin{tabular}{l|l|l|l}
Source & df & SS & MS \\ \hline
$A_{i}$ & $I-1$ & $JK \sum_{i}(\bar{y}_{i\cdot\cdot} - \bar{y}_{\cdot\cdot\cdot})^{2}$ & $SS(A)/(I-1)$ \\
$B_{j}$ & $J-1$ & $IK \sum_{j}(\bar{y}_{\cdot j\cdot} - \bar{y}_{\cdot\cdot\cdot})^{2}$ & $SS(B)/(J-1)$ \\
$AB_{ij}$ & $(I-1)(J-1)$ & $K \sum_{i}\sum_{j} (\bar{y}_{ij\cdot} - \bar{y}_{i\cdot\cdot} - \bar{y}_{\cdot j\cdot} + \bar{y}_{\cdot\cdot\cdot})^{2}$ & $SS(AB)/(I-1)(J-1)$ \\
$\varepsilon_{k(ij)}$ & $IJ(K-1)$ & $\sum_{i}\sum_{j}\sum_{k} (\bar{y}_{ijk} - \bar{y}_{ij\cdot})^{2}$ & $SS(\varepsilon)/IJ(K-1)$ \\ \hline
Total & $IJK - 1$ & $\sum_{i}\sum_{j}\sum_{k} (\bar{y}_{ijk} - \bar{y}_{\cdot\cdot\cdot})^{2}$ & 
\end{tabular}
\end{center}

\setcounter{enumi}{14}
\item \textit{Assuming $A_{i}$ fixed and $B_{j}$ random, use the rules in Section 3.4 to derive the EMS values for the model (3.2.2)}

\begin{center}
\begin{tabular}{l|l|l|l|l|l}
 && I/f & J/r & K/r & \\
% && f & r & r & \\
Source & df & i & j & k & E(MS) \\ \hline
$A_{i}$ & $I-1$ & 0 & $J$ & $K$ & $\sigma_{\varepsilon}^{2} + K\sigma_{AB}^{2} + K\sigma_{B}^{2} + JK\Phi(A)$ \\
$B_{j}$ & $J-1$ & $I$ & $1$ & $K$ & $\sigma_{\varepsilon}^{2} + IK\sigma_{B}^{2}$ \\
$AB_{ij}$ & $(I-1)(J-1)$ & $0$ & $1$ & $K$ & $\sigma_{\varepsilon}^{2} + K\sigma_{AB}^{2}$ \\
$\varepsilon_{k(ij)}$ & $IJ(K-1)$ & 1 & 1 & 1 & $\sigma_{\varepsilon}^{2}$
\end{tabular}
\end{center}

\setcounter{enumi}{21}
\item \textit{For a three factor experiment with no repeats, derive the exact, approximate, and conservative tests under the following circumstances.  When the test is conservative, indicate which conclusion can be made and which conclusion cannot be made.}
	\begin{enumerate}
	\item \textit{All three factors are fixed.}

	\begin{center}
	\begin{tabular}{lllllll}
	& df & F/i& F/j& F/k &R/l &$EMS$\\ \hline
	$A_{i}$ &(I-1)& 0&J&K&1&$JK\Phi(A)$\\
	$B_{j}$ &(J-1)&I& 0&K&1&$IK\Phi(B)$\\
	$AB_{ij}$ &(I-1)(J-1)& 0& 0&K&1&$K\Phi(AB)$\\
	$C_{k}$ &(K-1)&I&J& 0&1&$IJ\Phi(C)$\\
	$AC_{ik}$ &(I-1)(K-1)& 0&J& 0&1&$J\Phi(AC)$\\
	$BC_{jk}$ &(J-1)(K-1)&I& 0& 0&1&$I\Phi(BC)$\\
	$ABC_{ijk}$ &(I-1)(J-1)(K-1)& 0& 0& 0&1&$\Phi(ABC)$\\
	$\varepsilon_{l(ijk)}$&0&1&1&1&0& - -
	\end{tabular}
	\end{center}

	All interactions are conservatively tested by $ABC$ for significance.  There is no test for $ABC$.

	\item \textit{Only the first factor is random.}

	\begin{center}
	\begin{tabular}{llllllll}
	& df & R/i& F/j& F/k&R/l&EMS\\ \hline
	$A_{i}$ &(I-1)& 1&J&K&1&$JK\sigma_{A}^{2}$\\
	$B_{j}$ &(J-1)&I& 0&K&1&$K\sigma_{AB}^{2} + K\Phi(B)$\\
	$AB_{ij}$ &(I-1)(J-1)& 1& 0&K&1&$K\sigma_{AB}^{2}$\\
	$C_{k}$ &(K-1)&I&J& 0&1&$J\sigma_{AC}^{2} + J\sigma_{C}^{2}$\\
	$AC_{ik}$ &(I-1)(K-1)& 1&J& 0&1&$J\sigma_{AC}^{2}$\\
	$BC_{jk}$ &(J-1)(K-1)&I& 0& 0&1&$\sigma_{ABC}^{2} + I\Phi(BC)$\\
	$ABC_{ijk}$ &(I-1)(J-1)(K-1)& 1& 0& 0&1& $\sigma_{ABC}^{2}$\\
	$\varepsilon_{l(i j k)}$&0& 1& 1& 1&0&- -
	\end{tabular}
	\end{center}

	The table shows that $AC$ tests $C$, $AB$ tests $B$ and $ABC$ tests $BC$.  We also have conservative tests (for significance) by $ABC$ for $A,AB$ and $AC$.  The second order interaction $ABC$ is not testable.

	\item \textit{Only the first factor is fixed.}

	\begin{center}
	\begin{tabular}{llllllll}
	& df & F/i& R/j& R/k&R/l&EMS\\ \hline 
	$A_{i}$ &(I-1)& 0&J&K&1&$\sigma_{ABC}^{2} + J\sigma_{AC}^{2} + K\sigma_{AB}^{2} + JK\Phi(A)$\\
	$B_{j}$ &(J-1)&I& 1&K&1&$I\sigma_{BC}^{2} + IK\sigma_{B}^{2}$\\
	$AB_{ij}$ &(I-1)(J-1)& 0& 1&K&1&$\sigma_{ABC}^{2} + K\sigma_{AB}^{2}$\\
	$C_{k}$ &(K-1)&I&J& 1&1&$I\sigma_{BC}^{2} + IJ\sigma_{C}^{2}$\\
	$AC_{ik}$ &(I-1)(K-1)& 0&J& 1&1&$\sigma_{ABC}^{2} + J\sigma_{AC}^{2}$\\
	$BC_{jk}$ &(J-1)(K-1)&I& 1& 1&1&$I\sigma_{BC}^{2}$\\
	$ABC_{ijk}$ &(I-1)(J-1)(K-1)& 0& 1& 1&1&$\sigma_{ABC}^{2}$\\
	$\varepsilon_{l(i j k)}$&0& 1& 1& 1&0& - -
	\end{tabular}
	\end{center}

	$ABC$ tests $AC$ and $AB$.  $BC$ tests $B$ and $C$.  $ABC$ conservatively tests $BC$ for significance.  $A$ is tested approximately with $AB + AC - ABC$.

	\item \textit{All three factors are random.}

	\begin{center}
	\begin{tabular}{llllllll}
	& df & R/i& R/j& R/k&R/l&EMS\\ \hline 
	$A_{i}$ &(I-1)& 1&J&K&1&$\sigma_{ABC}^{2} + J\sigma_{AC}^{2} + K\sigma_{AB} + KJ\sigma_{A}^{2}$\\
	$B_{j}$ &(J-1)&I& 1&K&1&$\sigma_{ABC}^{2} + I\sigma_{BC}^{2} + K\sigma_{AB}^{2} + IK\sigma_{B}^{2}$\\
	$AB_{ij}$ &(I-1)(J-1)& 1& 1&K&1&$\sigma_{ABC}^{2} + K\sigma_{AB}^{2}$\\
	$C_{k}$ &(K-1)&I&J& 1&1&$\sigma_{ABC}^{2} + I\sigma_{BC}^{2} + J\sigma_{AC}^{2} + IJ\sigma_{C}^{2}$\\
	$AC_{ik}$ &(I-1)(K-1)& 1&J& 1&1&$\sigma_{ABC}^{2} + J\sigma_{AC}^{2}$\\
	$BC_{jk}$ &(J-1)(K-1)&I& 1& 1&1&$\sigma_{ABC}^{2} + I\sigma_{BC}^{2}$\\
	$ABC_{ijk}$ &(I-1)(J-1)(K-1)& 1& 1& 1&1&$\sigma_{ABC}^{2}$\\
	$\varepsilon_{l(i j k)}$&& 1& 1& 1&0&- -
	\end{tabular}
	\end{center}

	$ABC$ tests $AB, AC$ and $BC$.  $A$ is approximately tested by $AB + AC - ABC$.  $B$ is approximately tested by $AB + BC - ABC$.  $C$ is approximately tested by $AC + BC - ABC$.  There is no test for $ABC$.

	\end{enumerate}

\item \textit{Repeat problem 3.22 assuming the three factor interaction is zero.}
	\begin{enumerate}
	\item \textit{All three factors are fixed.}

	\begin{center}
	\begin{tabular}{lllllll}
	& df & F/i& F/j& F/k &R/l &$EMS$\\ \hline
	$A_{i}$ &(I-1)& 0&J&K&1&$JK\Phi(A)$\\
	$B_{j}$ &(J-1)&I& 0&K&1&$IK\Phi(B)$\\
	$AB_{ij}$ &(I-1)(J-1)& 0& 0&K&1&$K\Phi(AB)$\\
	$C_{k}$ &(K-1)&I&J& 0&1&$IJ\Phi(C)$\\
	$AC_{ik}$ &(I-1)(K-1)& 0&J& 0&1&$J\Phi(AC)$\\
	$BC_{jk}$ &(J-1)(K-1)&I& 0& 0&1&$I\Phi(BC)$\\
	$ABC_{ijk}$ &(I-1)(J-1)(K-1)& 0& 0& 0&1&0\\
	$\varepsilon_{l(ijk)}$&0&1&1&1&0& - -
	\end{tabular}
	\end{center}

	All interactions can be tested using $ABC$ directly.

	\item \textit{Only the first factor is random.}

	\begin{center}
	\begin{tabular}{llllllll}
	& df & R/i& F/j& F/k&R/l&EMS\\ \hline
	$A_{i}$ &(I-1)& 1&J&K&1&$JK\sigma_{A}^{2}$\\
	$B_{j}$ &(J-1)&I& 0&K&1&$K\sigma_{AB}^{2} + K\Phi(B)$\\
	$AB_{ij}$ &(I-1)(J-1)& 1& 0&K&1&$K\sigma_{AB}^{2}$\\
	$C_{k}$ &(K-1)&I&J& 0&1&$J\sigma_{AC}^{2} + J\sigma_{C}^{2}$\\
	$AC_{ik}$ &(I-1)(K-1)& 1&J& 0&1&$J\sigma_{AC}^{2}$\\
	$BC_{jk}$ &(J-1)(K-1)&I& 0& 0&1&$I\Phi(BC)$\\
	$ABC_{ijk}$ &(I-1)(J-1)(K-1)& 1& 0& 0&1&0 \\
	$\varepsilon_{l(i j k)}$&0& 1& 1& 1&0&- -
	\end{tabular}
	\end{center}

	$ABC$ tests $A,AB,AC$ and $BC$.  $AB$ tests $B$.  $AC$ tests $C$.

	\item \textit{Only the first factor is fixed.}

	\begin{center}
	\begin{tabular}{llllllll}
	& df & F/i& R/j& R/k&R/l&EMS\\ \hline 
	$A_{i}$ &(I-1)& 0&J&K&1&$J\sigma_{AC}^{2} + K\sigma_{AB}^{2} + JK\Phi(A)$\\
	$B_{j}$ &(J-1)&I& 1&K&1&$I\sigma_{BC}^{2} + IK\sigma_{B}^{2}$\\
	$AB_{ij}$ &(I-1)(J-1)& 0& 1&K&1&$K\sigma_{AB}^{2}$\\
	$C_{k}$ &(K-1)&I&J& 1&1&$I\sigma_{BC}^{2} + IJ\sigma_{C}^{2}$\\
	$AC_{ik}$ &(I-1)(K-1)& 0&J& 1&1&$J\sigma_{AC}^{2}$\\
	$BC_{jk}$ &(J-1)(K-1)&I& 1& 1&1&$I\sigma_{BC}^{2}$\\
	$ABC_{ijk}$ &(I-1)(J-1)(K-1)& 0& 1& 1&1&0\\
	$\varepsilon_{l(i j k)}$&0& 1& 1& 1&0& - -
	\end{tabular}
	\end{center}

	$ABC$ tests $AB,AC$ and $BC$.  $BC$ tests $B$ and $C$.  $A$ can be approximately tested using $AB + AC - \sigma^{2}$.

	\item \textit{All three factors are random.}

	\begin{center}
	\begin{tabular}{llllllll}
	& df & R/i& R/j& R/k&R/l&EMS\\ \hline 
	$A_{i}$ &(I-1)& 1&J&K&1&$J\sigma_{AC}^{2} + K\sigma_{AB} + KJ\sigma_{A}^{2}$\\
	$B_{j}$ &(J-1)&I& 1&K&1&$I\sigma_{BC}^{2} + K\sigma_{AB}^{2} + IK\sigma_{B}^{2}$\\
	$AB_{ij}$ &(I-1)(J-1)& 1& 1&K&1&$K\sigma_{AB}^{2}$\\
	$C_{k}$ &(K-1)&I&J& 1&1&$I\sigma_{BC}^{2} + J\sigma_{AC}^{2} + IJ\sigma_{C}^{2}$\\
	$AC_{ik}$ &(I-1)(K-1)& 1&J& 1&1&$J\sigma_{AC}^{2}$\\
	$BC_{jk}$ &(J-1)(K-1)&I& 1& 1&1&$I\sigma_{BC}^{2}$\\
	$ABC_{ijk}$ &(I-1)(J-1)(K-1)& 1& 1& 1&1&0\\
	$\varepsilon_{l(i j k)}$&& 1& 1& 1&0&- -
	\end{tabular}
	\end{center}

	$ABC$ tests all first order interactions.  $A$ is approximately tested by $AB + AC - \sigma^{2}$.  $B$ is approximately tested by $AB + BC - \sigma^{2}$.  $C$ is approximately tested by $AC + BC - \sigma^{2}$.

	\end{enumerate}

\end{enumerate}

\end{document}
