Analysis of Variance

Etienne Adolphe Piot (1825-1910) was a French painter.

 

We have sections

The independent variables for analysis of variance models are called factors or treatments. For instance, in an investigation of the effect of price on sales of a luxury item, the factor being studied is price. Similarly, in a study comparing the appeal of four different television programs, the factor under investigation is type of television program. A level of a factor is a particular form of that factor. For example, in the pricing study, three prices are used. Each of these prices is a level of the factor under study, and we say that the price factor has three levels in this study.

Investigations differ as to the number of factors studied. Some are single-factor studies, where only one factor is of concern. For instance, the study of the appeal of four different television programs mentioned earlier is an example of single-factor study. In multifactor studies, two or more factors are investigated simultaneously. An example of a multifactor investigation is a study of the effects of temperature and concentration of the solvent upon the yield of a certain chemical process. Here, two factors, temperature and concentration, are studied simultaneously to obtain information about their effects.

\begin{equation}{\label{a}}\tag{A}\mbox{}\end{equation}

Single-Factor ANOVA Model.

We denote by \(r\) the number of levels of the factor under study, and we denote any one of these levels by the index \(i\) for \(i=1,\cdots ,r\). The number of cases for the \(i\)th factor level is denoted by \(n_{i}\), and the total number of cases in the study is denoted by \(n_{T}\), where \(n_{T}=\sum_{i=1}^{r} n_{i}\). The index \(j\) will be used to identify the given case or trial for a particular factor level. We let \(Y_{ij}\) denote the \(j\)th observation on the dependent (response) variable for the \(i\)th factor level. For instance, \(Y_{ij}\) is the productivity of the \(j\)th employee in the \(i\)th plant, or the sales volume of the \(j\)th store featuring the \(i\)th type of shelf display. Since the number of cases or trials for the \(i\)th factor level is denoted by \(n_{i}\), we have \(j=1,\cdots ,n_{i}\). ANOVA model can now be stated as

\[Y_{ij}=\mu_{i}+\varepsilon_{ij}\]

for \(i=1,\cdots ,r\) and \(j=1,\cdots ,n_{i}\).

  • \(Y_{ij}\) is the value of the response variable in the \(j\)th trial for the \(i\)th factor level.
  • \(\mu_{i}\) are parameters.
  • \(\varepsilon_{ij}\) are independent \(N(0,\sigma^{2})\).

We have the following features of the model.

(i) Since \(\mathbb{E}(\varepsilon_{ij})=0\), it follows \(\mathbb{E}(Y_{ij})=0\). Therefore, all observations for the \(i\)th factor level have the same expectation \(\mu_{i}\).

(ii) Since \(\mu_{i}\) is a constant, it follows \(\mathbb{V}(Y_{ij})=\mathbb{V}(\varepsilon_{ij})=\sigma^{2}\). Therefore, all observations have the same variance regardless of factor level.

(iii) Since each \(\varepsilon_{ij}\) is normally distributed and \(Y_{ij}\) is a linear combination of \(\varepsilon_{ij}\), it follows that each \(Y_{ij}\) is also normally distributed.

(iv) Since the \(\varepsilon_{ij}\) are independent, it follows that \(Y_{ij}\) are independent \(N(\mu_{i},\sigma^{2})\).

\begin{equation}{\label{let2ex1}}\tag{1}\mbox{}\end{equation}

Example \ref{let2ex1}. A food company wished to test four different package designs for a new product. Ten stores, with approximately equal sales volumes, are selected as the experimental units. The data is displayed below.

\[\begin{array}{c|ccc|ccc}\hline
\mbox{Package Design} & \mbox{Store ($j$)} & &&&&\\
\hline i & 1 & 2 & 3 & \mbox{Total} & \mbox{Mean} & \mbox{Number of Stores}\\
\hline 1 & 12 & 18 & & 30 & 15 & 2\\
2 & 14 & 1 & 13 & 39 & 13 & 3\\
3 & 19 & 17 & 21 &  57 & 19 & 3\\
4 & 24 & 30 & & 54 &  27 & 2\\
\hline \mbox{All designs} &&&& 180 & 18 & 10\\
\hline\end{array}\]

The total of the observations for the \(i\)th factor level is denoted by \(Y_{i\cdot}\)

\[Y_{i\cdot}=\sum_{j=1}^{n_{i}}Y_{ij}.\]

Therefore, the dot in \(Y_{i\cdot}\) indicates an aggregation over the \(j\)th index. The sample mean for the \(i\)th factor level is denoted by \(\bar{Y}_{i\cdot}\) given by

\[\bar{Y}_{i\cdot}=\frac{\sum_{j=1}^{n_{i}} Y_{ij}}{n_{i}}=\frac{Y_{i\cdot}}{n_{i}}\]

The total of all observations is denoted by \(Y_{\cdot\cdot}\) given by

\[Y_{\cdot\cdot}=\sum_{i=1}^{r}\sum_{j=1}^{n_{i}} Y_{ij},\]

where two dots indicate aggregation over both the \(i\) and \(j\) indices. Finally, the overall mean for all observations is denoted by \(\bar{Y}_{\cdot\cdot}\) given by

\[\bar{Y}_{\cdot\cdot}=\frac{\sum_{i=1}^{r}\sum_{j=1}^{n_{i}} Y_{ij}}{n_{T}}=\frac{Y_{\cdot\cdot}}{n_{T}}.\]

Then, we have the corresponding table from Example \ref{let2ex1} below

\[\begin{array}{c|ccc|ccc}\hline
\hline\mbox{Factor Level} & \mbox{Sample Unit ($j$)} &&&&&\\
i & 1 & 2 & 3 & \mbox{Total} & \mbox{Mean} & \mbox{Number of Sample Units}\\
\hline 1 & Y_{11} & Y_{12} & & Y_{1\cdot} & \bar{Y}_{1\cdot} & n_{1}\\
2 & Y_{21} & Y_{22} & Y_{23} & Y_{2\cdot} & \bar{Y}_{2\cdot} & n_{2}\\
3 & Y_{31} & Y_{32} & Y_{33} & Y_{3\cdot} & \bar{Y}_{3\cdot} & n_{3}\\
4 & Y_{41} & Y_{42} & & Y_{4\cdot} & \bar{Y}_{4\cdot} & n_{4}\\
\hline \mbox{All factor levels} &&&& Y_{\cdot\cdot} & \bar{Y}_{\cdot\cdot} & n_{T}\\
\hline\end{array}\]

According to the least squares criterion, the following quantity has to be minimized

\[Q=\sum_{i}\sum_{j} (Y_{ij}-\mu_{i})^{2}.\]

It is well known that the sample mean minimizes \(Q\). Therefore, the least squares estimator of \(\mu_{i}\), denoted by \(\hat{\mu}_{i}\), is \(\hat{\mu}_{i}=\bar{Y}_{i\cdot}\). Therefore, the fitted value for observation \(Y_{ij}\), denoted by \(\hat{Y}_{ij}\), is simply the corresponding factor level sample mean \(\hat{Y}_{ij}=\bar{Y}_{i\cdot}\). It can be shown that the least squares estimators are also MLE for the ANOVA model.

The residuals \(e_{ij}\) is defined as the difference between the observed value and fitted value given by

\[e_{ij}=Y_{ij}-\hat{Y}_{ij}=Y_{ij}-\bar{Y}_{i\cdot}.\]

It can be shown \(\sum_{j}e_{ij}=0\) for \(i=1,\cdots ,r\). Since

\[Y_{ij}-\bar{Y}_{\cdot\cdot}=(\bar{Y}_{i\cdot}-\bar{Y}_{\cdot\cdot})+ (Y_{ij}-\bar{Y}_{i\cdot}),\]

it can be shown

\[\sum_{i} (Y_{ij}-\bar{Y}_{\cdot\cdot})^{2}=\sum_{i} n_{i}(\bar{Y}_{i\cdot}-\bar{Y}_{\cdot\cdot})^{2}+\sum_{i}\sum_{j}(Y_{ij}-\bar{Y}_{i\cdot})^{2}.\]

Let the total sum of squares, denoted by \(SSTO\), be defined by

\[SSTO=\sum_{i} (Y_{ij}-\bar{Y}_{\cdot\cdot})^{2},\]

the treatment sum of squares, denoted by \(SSTR\), be defined by

\[SSTR=\sum_{i} n_{i}(\bar{Y}_{i\cdot}-\bar{Y}_{\cdot\cdot})^{2}\]

and the error sum of squares, denoted by \(SSE\), be defined by

\[SSE=\sum_{i}\sum_{j} (Y_{ij}-\bar{Y}_{i\cdot})^{2}=\sum_{i}\sum_{j}e_{ij}^{2}.\]

Therefore, we have the following relation

\[SSTO=SSTR+SSE.\]

For convenient computations regarding formulas \(SSTO\), \(SSTR\) and \(SSE\), we provide the equivalent computational formulas given below

\begin{align*} SSTO & =\sum_{i}\sum_{j} Y_{ij}^{2}-\frac{Y_{\cdot\cdot}^{2}}{n_{T}}\\ SSTR & =\sum_{i}\frac{Y_{i\cdot}^{2}}{n_{i}}-\frac{Y_{\cdot\cdot}^{2}}{n_{T}}\\ SSE & =\sum_{i}\sum_{j} Y_{ij}^{2}-\sum_{i}\frac{Y_{i\cdot}^{2}}{n_{i}}\end{align*}

  • The \(SSTO\) has \(n_{T}-1\) degrees of freedom associated with it. There are altogether \(n_{T}\) deviations \(Y_{ij}-\bar{Y}_{\cdot\cdot}\), but one degree of freedom is lost, since the deviations are not independent in that they must sum to zero, i.e., \(\sum\sum (Y_{ij}-\bar{Y}_{\cdot\cdot})=0\).
  • The \(SSTR\) has \(r-1\) degrees of freedom associated with it. There are \(r\) estimated factor level mean deviations \(\bar{Y}_{i\cdot}-\bar{Y}_{\cdot\cdot}\), but one degree of freedom is lost, since the deviations are not independent in that the weighted sum must equal zero, i.e., \(\sum n_{i}(\bar{Y}_{i\cdot}-\bar{Y}_{\cdot\cdot})=0\).
  • The \(SSE\) has \(n_{T}-r\) degrees of freedom associated with it. This can be seen by considering the component of \(SSE\) for the \(i\)th factor level \[\sum_{j=1}^{n_{i}}(Y_{ij}-\bar{Y}_{i\cdot})^{2}.\] The above expression is the equivalence of a total sum of squares considering only the \(i\)th factor level. Hence, there are \(n_{i}-1\) degrees of freedom associated with this sum of squares. Since \(SSE\) is a sum of component sums of squares, the degrees of freedom associated with \(SSE\) are the sum of the component degrees of freedom \[(n_{1}-1)+(n_{2}-1)+\cdots +(n_{r}-1)=n_{T}-r.\]

The mean squares are obtained as follows

\[MSTR=\frac{SSTR}{r-1}\mbox{ and }MSE=\frac{SSE}{n_{T}-r},\]

where \(MSTR\) stands for treatment mean square and \(MSE\) stands for error mean square. Let

\[\mu_{\cdot}=\frac{\sum n_{i}\mu_{i}}{n_{T}}.\]

The expectation of \(MSE\) and \(MSTR\) can be shown as \(\mathbb{E}(MSE)=\sigma^{2}\) and

\[\mathbb{E}(MSTR)=\sigma^{2}+\frac{\sum n_{i}(\mu_{i}-\mu_{\cdot})^{2}}{r-1}.\]

Therefore \(MSE\) is an unbiased estimator of the variance of the error terms \(\varepsilon_{ij}\). We obtain the following ANOVA table for single-factor

\[\begin{array}{ccccc}\hline
\hline \mbox{Source of Variation} & SS & df & MS & \mathbb{E}(MS)\\
\hline \mbox{Between treatments} & SSTR=\sum n_{i}(\bar{Y}_{i\cdot}- \bar{Y}_{\cdot\cdot})^{2} & r-1 & {\displaystyle MSTR=\frac{SSTR}{r-1}}
& {\displaystyle \sigma^{2}+\frac{\sum n_{i}(\mu_{i}-\mu_{\cdot})^{2}}{r-1}}\\
\mbox{Error (within treatments)} & SSE=\sum\sum (Y_{ij}-\bar{Y}_{i\cdot})^{2} & n_{T}-r & {\displaystyle MSE=\frac{SSE}{n_{T}-r}} & \sigma^{2}\\
\hline \mbox{Total} & SSTO=\sum\sum (Y_{ij}-\bar{Y}_{\cdot\cdot})^{2} & n_{T}-1 &&\\
\hline\end{array}\]

The ANOVA table for Example \ref{let2ex1} is given by

\[\begin{array}{cccc}\hline
\hline \mbox{Source of Variation} & SS & df & MS \\
\hline \mbox{Between designs} & 258 & 3 & 86\\
\mbox{Error} & 46 & 6 &  7.67\\
\hline \mbox{Total} & 304 & 9 & \\
\hline\end{array}\]

Frequently, experimenters want to compare more than two treatments: yields of several different corn hybrids, result due to three or more teaching techniques, or miles per gallon obtained from many different types of compact cars. Sometimes the different treatments distributions of the resulting observations are due to changing the level of a certain factor, (e.g., different doses of a given drug). Therefoe, the consideration of the equality of the different means of the various distributions comes under the analysis of a  one-factor experiment. Let us consider \(m\) normal distributions with unknown means \(\mu_{1},\mu_{2},\cdots ,\mu_{m}\), respectively, and an unknown but common variance \(\sigma^{2}\). One inference that we wish to consider is a test of the equality of the \(m\) means, namely

\[H_{0}:\mu_{1}=\mu_{2}=\cdots =\mu_{m}=\mu ,\]

$\mu$ unspecified, against all possible alternative hypotheses \(H_{1}\). In order to test this hypothesis, we shall take independent random samples from these distributions. Let \(X_{i1},X_{i2},\cdots ,X_{in_{i}}\) represent a random sample of size \(n_{i}\) from the normal distribution \(N(\mu_{i},\sigma^{2})\) for \(i=1,2,\cdots ,m\).  Let \(n=n_{1}+n_{2}+\cdots +n_{m}\),

\[\bar{X}_{\cdot\cdot}=\frac{1}{n}\sum_{i=1}^{m}\sum_{j=1}^{n_{i}} X_{ij},\]

and

\[\bar{X}_{i\cdot}=\frac{1}{n_{i}}\sum_{j=1}^{n_{i}} X_{ij}\]

for \(i=1,\cdots ,m\). To determine a critical region for a test of \(H_{0}\), we shall first partition the sum of squares with the variance of the combined samples into two parts. This sum of squares is given by

\begin{align*}
SSTO & =\sum_{i=1}^{m}\sum_{j=1}^{n_{i}} (X_{ij}-\bar{X}_{\cdot\cdot})^{2}\\
& =\sum_{i=1}^{m}\sum_{j=1}^{n_{i}} (X_{ij}-\bar{X}_{i\cdot}+\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot})^{2}\\
& =\sum_{i=1}^{m}\sum_{j=1}^{n_{i}} (X_{ij}-\bar{X}_{i\cdot})^{2}+\sum_{i=1}^{m}\sum_{j=1}^{n_{i}} (\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot})^{2}+2\sum_{i=1}^{m}\sum_{j=1}^{n_{i}} (X_{ij}-\bar{X}_{i\cdot})(\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot}).
\end{align*}

The last term of the right-hand member of this identity may be written as

\[2\sum_{i=1}^{m}\left [(\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot})\sum_{j=1}^{n_{i}} (X_{ij}-\bar{X}_{i\cdot})\right ]=2\sum_{i=1}^{m}(\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot})(n_{i}\bar{X}_{i\cdot}-n_{i}\bar{X}_{i\cdot})=0,\]

and the preceding term may be written as

\[\sum_{i=1}^{m}\sum_{j=1}^{n_{i}} (\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot})^{2}=\sum_{i=1}^{m} n_{i}(\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot})^{2}.\]

Therefore, we have

\[SSTO=\sum_{i=1}^{m}\sum_{j=1}^{n_{i}} (X_{ij}-\bar{X}_{i\cdot})^{2}+\sum_{i=1}^{m} n_{i}(\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot})^{2}.\]\]

Let

\[SSE=\sum_{i=1}^{m}\sum_{j=1}^{n_{i}} (X_{ij}-\bar{X}_{\cdot})^{2},\]

the sum of squares within treatments, groups, or classes, often called the error sum of squares, and

\[SST=\sum_{i=1}^{m} n_{i}(\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot})^{2},\]

the sum of squares among the different treatments, groups, or classes, often called between treatment sum of squares. Therefore, we have 

\[SSTO=SSE+SST.\]

When \(H_{0}\) is true, we may regard \(X_{ij}\) for \(i=1,\cdots ,m\) and \(j=1,\cdots ,n_{i}\), as a random sample of size \(n=n_{1}+n_{2}+\cdots +n_{m}\) from the normal distribution \(N(\mu ,\sigma^{2})\). Then \(SSTO/(n-1)\) is an unbiased estimator of \(\sigma^{2}\), since \(SSTO/\sigma^{2}\) is \(\chi^{2}(n-1)\) satisfying \(\mathbb{E}[SSTO/\sigma^{2}]=n-1\) and \(\mathbb{E}[SSTO/(n-1)]=\sigma^{2}\). An unbiased estimator of \(\sigma^{2}\) based upon the sample from the \(i\)th distribution is given by 

\[W_{i}=\frac{\sum_{j=1}^{n_{i}} (X_{ij}-\bar{X}_{i\cdot})^{2}}{n_{i}-1}\mbox{ for }i=1,2,\cdots ,m,\]

since \((n_{i}-1)W_{i}/\sigma^{2}\) is \(\chi^{2}(n_{i}-1)\). Therefore, we obtain

\[\mathbb{E}\left [\frac{(n_{i}-1)W_{i}}{\sigma^{2}}\right ]=n_{i}-1,\]

which implies

\[\mathbb{E}(W_{i})=\sigma^{2}, i=1,2,\cdots ,m.\]

It follows that the sum of \(m\) of these independent chi-square random variables, namely

\[\sum_{i=1}^{m} \frac{(n_{i}-1)W_{i}}{\sigma^{2}}=\frac{SSE}{\sigma^{2}},\]

is also chi-square with

\[(n_{1}-1)+(n_{2}-1)+\cdots +(n_{m}-1)=n-m\]

degrees of freedom. Hence \(SSE/(n-m)\) is an unbiased estimator of \(\sigma^{2}\). Now, we have 

\[\frac{SSTO}{\sigma^{2}}=\frac{SSE}{\sigma^{2}}+\frac{SST}{\sigma^{2}},\]

where

\[\frac{SSTO}{\sigma^{2}}\mbox{ is }\chi^{2}(n-1)\]

and

\[\frac{SSE}{\sigma^{2}}\mbox{ is }\chi^{2}(n-m).\]

Since \(SST\geq 0\), there is a theorem that states that \(SSE\) and \(SST\) are independent and the distribution of \(SST/\sigma^{2}\) is \(\chi^{2}(m-1)\).

The sums of squares \(SST\), \(SSE\), and \(SSTO\), are examples of quadratic forms in the variables \(X_{ij}\) for \(i=1,\cdots ,m\) and \(j=1,\cdots ,n_{i}\). That is, each term in these sums of squares is of second degree in \(X_{ij}\). Furthermore, the coefficients of the variables are real numbers. Thus, these sums of squares are called real quadratic forms.

\begin{equation}{\label{ch5t1}}\tag{2}\mbox{T}\end{equation}

Theorem \ref{ch5t1}. Let

\[Q=Q_{1}+Q_{2}+\cdots +Q_{k},\]

where \(Q,Q_{1},\cdots ,Q_{k}\) are \(k+1\) real quadratic forms in \(n\) mutually independent random variables normally distributed with the same variance \(\sigma^{2}\). Let \(Q/\sigma^{2}, Q_{1}/\sigma^{2},\cdots ,Q_{k}/\sigma^{2}\) have chi-square distributions with \(r,r_{1},\cdots ,r_{k}\) degrees of freedom, respectively. Suppose that each \(Q_{k}\) is nonnegative. Then, we have the following properties.

(i) \(Q_{1},\cdots ,Q_{k}\) are mutually independent.

(ii) \(Q_{k}/\sigma^{2}\) has chi-square distribution with \(r_{k}=r-(r_{1}+\cdots +r_{k-1})\) degrees of freedom. \(\sharp\)

Since under \(H_{0}\), \(SST/\sigma^{2}\) is \(\chi^{2}(m-1)\), we have \(\mathbb{E}[SST/\sigma^{2}]=m-1\), i.e., \(\mathbb{E}[SST/(m-1)]=\sigma^{2}\). Now, the estimator of \(\sigma^{2}\), which is based on \(SSE\), namely \(SSE/(n-m)\), is always unbiased whether \(H_{0}\) is true or false. However, if the means \(\mu_{1},\mu_{2},\cdots ,\mu_{m}\) are not equal, the expected value of the estimator based on \(SST\) will be greater than \(\sigma^{2}\). To make this last statement clear, we have

\begin{align*}
\mathbb{E}[SST] & =\mathbb{E}\left [\sum_{i=1}^{m} n_{i}(\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot})^{2}\right ]\\ & =\mathbb{E}\left [\sum_{i=1}^{m}n_{i}\bar{X}^{2}_{i\cdot}-n\bar{X}^{2}_{\cdot\cdot}\right ]\\
& =\sum_{i=1}^{m} n_{i}[Var(\bar{X}_{i\cdot})+\mathbb{E}^{2}(\bar{X}_{i\cdot})]-n[Var(\bar{X}_{\cdot\cdot})+\mathbb{E}^{2}(\bar{X}_{\cdot\cdot})]\\
& =\sum_{i=1}^{m} n_{i}\left [\frac{\sigma^{2}}{n_{i}}+\mu^{2}_{i}\right ]-n\left [\frac{\sigma^{2}}{n}+\bar{\mu}^{2}\right ]\\
& =(m-1)\sigma^{2}+\sum_{i=1}^{m} n_{i}(\mu_{i}-\bar{\mu})^{2},
\end{align*}

where

\[\bar{\mu}=(1/n)\sum_{i=1}^{m} n_{i}\mu_{i}.\]

If \(\mu_{1}=\mu_{2}=\cdots =\mu_{m}=\mu\), then we have

\[\mathbb{E}\left (\frac{SST}{m-1}\right )=\sigma^{2}.\]

If the means are not all equal, then we have 
\[\mathbb{E}\left [\frac{SST}{m-1}\right ]=\sigma^{2}+\sum_{i=1}^{m} n_{i}\frac{(\mu_{i}-\bar{\mu})^{2}}{m-1}>\sigma^{2}.\]

We can base our test of \(H_{0}\) on the ratio of \(SST/(m-1)\) and \(SSE/(n-m)\), both of which are unbiased estimators of \(\sigma^{2}\), provided that \

\[H_{0}:\mu_{1}=\mu_{2}=\cdots =\mu_{m}\]

is true such that, under \(H_{0}\), the ratio would assume values near \(1\). However, as the means \(\mu_{1},\mu_{2},\cdots ,\mu_{m}\) begin to differ, this ratio tends to become large, since \(\mathbb{E}[SST/(m-1)]\) gets larger. Under \(H_{0}\), the ratio

\[\frac{SST/(m-1)}{SSE/(n-m)}=\frac{[SST/\sigma^{2}]/(m-1)}{[SSE/\sigma^{2}]/(n-m)}=F\]

has an \(F\) distribution with \(m-1\) and \(n-m\) degrees of freedom because \(SST/\sigma^{2}\) and \(SSE/\sigma^{2}\) are independent chi-square random variables. We would reject \(H_{0}\) if the observed value of \(F\) is too large since this would indicate that we have a relatively large \(SST\), which suggests that the means are unequal. Therefore, the critical region is of the form \(F\geq F_{\alpha}(m-1,n-m)\). The information for tests of the equality of several means is often summarized in an ANOVA table like that given in the following table, where the mean square \(MS\) is the sum of squares \(SS\) divided by its degree of freedom.

\[\begin{array}{lcccc}
\hline \mbox{Source} & \mbox{Sum of Squares} & \mbox{Degrees of} & \mbox{Mean Square} & \mbox{$F$-Ratio}\\
& SS & \mbox{Freedom} & MS & \\ 
\hline \mbox{Treatment} & SST & m-1 & {\displaystyle MST=\frac{SST}{m-1}} & {\displaystyle \frac{MST}{MSE}}\\
\mbox{Error} & SSE & n-m & {\displaystyle MSE=\frac{SSE}{n-m}} &\\
\mbox{Total} & SSTO & n-1 & &\\ 
\hline\end{array}\]

Example.  Let \(X_{1},X_{2},X_{3},X_{4}\) be independent random variables that have normal distributions \(N(\mu_{i},\sigma^{2})\) for \(i=1,2,3,4\). We shall test

\[H_{0}:\mu_{1}=\mu_{2}=\mu_{3}=\mu_{4}=\mu\]

against all alternatives based on a random sample of size \(n_{i}=3\) from each of the four distributions. A critical region of size \(\alpha =0.05\) is given by

\[F=\frac{SST/(4-1)}{SSE/(12-4)}\geq 4.07=F_{0.05}(3,8).\]

The observed data are given in the following table

\[\begin{array}{c|ccc|c}
\hline & \mbox{Data} &&& \bar{X}_{i\cdot}\\ 
\hline X_{1} & 13 & 8 & 9 & 10\\
X_{2} & 11 & 11 & 13 & 13\\
X_{3} & 8 & 12 & 7 & 9\\
X_{4} & 11 & 15 & 10 & 12\\ 
\hline \bar{X}_{\cdot\cdot} & && & 11\\ 
\hline\end{array}\]

For these data, the calculated \(SSTO\), \(SSE\), and \(SST\) are given by

\begin{align*}
SSTO & =(13-11)^{2}+(8-11)^{2}+\cdots +(15-11)^{2}+(10-11)^{2}=80;\\
SSE & =(13-10)^{2}+(8-10)^{2}+\cdots +(15-12)^{2}+(10-12)^{2}=50;\\
SST & =3[(10-11)^{2}+(13-11)^{2}+(9-11)^{2}+(12-11)^{2}]=30.
\end{align*}

Since \(SSTO=SSE+SST\), only two of the three values need to be calculated from the data directly. The computed value of \(F\) is given by 

\[\frac{30/3}{50/8}=1.6<4.07,\]

which says that \(H_{0}\) is not rejected. The \(p\)-value is the probability, under \(H_{0}\), of observing an \(F\) that is at least as large as this observed \(F\). It is often given by computer programs. The information for this example is summarized in the following ANOVA table. Again we note that the \(F\) statistic is the ratio of two appropriate mean squares.

\[\begin{array}{lccccc}
\hline \mbox{Source} & \mbox{Sum of Squares} & \mbox{Degrees of} & \mbox{Mean Square} & \mbox{\(F\)-Ratio} & \mbox{\(p\)-value}\\
& SS & \mbox{Freedom} & MS &\\ 
\hline \mbox{Treatment} & 30 & 3 & {\displaystyle MST=\frac{30}{3}} & {\displaystyle \frac{MST}{MSE}=1.6} & 0.264\\
\mbox{Error} & 50 & 8 & {\displaystyle MSE=\frac{50}{8}} &&\\
\mbox{Total} & 80 & 11 & & &\\ 
\hline\end{array}\]

Formulas that sometimes simplify the calculations of \(SSTO\), \(SST\), and \(SSE\) are given by 

\begin{align*} SSTO & =\sum_{i=1}^{m}\sum_{j=1}^{n_{i}} X_{ij}^{2}-\frac{1}{n}\left [\sum_{i=1}^{m}\sum_{j=1}^{n_{i}} X_{ij}\right ]^{2}\\
SST & =\sum_{i=1}^{m}\frac{1}{n_{i}}\left [\sum_{j=1}^{n_{i}} X_{ij}\right ]^{2}-\frac{1}{n}\left [\sum_{i=1}^{m}\sum_{j=1}^{n_{i}} X_{ij}\right ]^{2}\\
SSE & =SSTO-SST.\end{align*}

Example.  A window that is manufactured for an automobile has five studs for attaching it. A company that manufactures these windows performs “pull-out tests” to determine the force needed to pull a stud out of the window. Let \(X_{i}\) for \(i=1,2,3,4,5\) equal the force required at position \(i\). Assume that the distribution of \(X_{i}\) is \(N(\mu_{i},\sigma^{2})\). We shall test that the null hypothesis

\[H_{0}:\mu_{1}=\mu_{2}=\mu_{3}=\mu_{4}=\mu_{5}\]

using \(7\) independent observations at each position. At an \(\alpha =0.01\) significance level, \(H_{0}\) is rejected if the computed

\[F=\frac{SST/(5-1)}{SSE/(35-5)}\geq 4.02=F_{0.01}(4,30).\]

The observed data along with certain sums are given in the following table

\[\begin{array}{c|ccccccc|c|c}
\hline & \mbox{Data} &&&&&& & \sum_{j=1}^{7} x_{ij} & \sum_{j=1}^{7} x_{ij}^{2}\\ 
\hline X_{1} & 92 & 90 & 87 & 105 & 86 & 83 & 102 & 645 & 59847\\
X_{2} & 100 & 108 & 98 & 110 & 114 & 97 & 94 &  721 & 74609\\
X_{3} & 143 & 149 & 138 & 136 & 139 & 120 & 145 &  970 & 134936\\
X_{4} & 147 & 144 & 160 & 149 & 152 & 131 & 134 & 1017 & 148367\\
X_{5} & 142 & 155 & 119 & 134 & 133 & 146 & 152 & 981 & 138415\\ 
\hline \mbox{Total} & &&&&&& & 4334 & 556174\\ 
\hline\end{array}\]

For these data, we have 

\begin{align*}
SSTO & =556174-\frac{1}{35}\cdot 4334^{2}=19500.97\\
SST & =\frac{1}{7}\left (645^{2}+721^{2}+970^{2}+1017^{2}+981^{2}-\frac{1}{35}\cdot 4334^{2}\right )=16672.11\\
SSE & =19500.97-166721.11=2828.86.
\end{align*}

Since the computed \(F\) is

\[F=\frac{16672.11/4}{2828.86/30}=44.20,\]

the null hypothesis is clearly rejected. This information is summarized in the following table

\[\begin{array}{lcccc}
\hline \mbox{Source} & \mbox{Sum of Squares} & \mbox{Degrees of} & \mbox{Mean Square} & \mbox{\(F\)-Ratio}\\
& SS & \mbox{Freedom} & MS &\\ 
\hline \mbox{Treatment} & 16672.11 & 4 & MST=4168.03 & {\displaystyle \frac{MST}{MSE}=44.20}\\
\mbox{Error} & 2828.86 & 30 & MSE=94.30 &\\
\mbox{Total} & 19500.97 & 34 & &\\ 
\hline\end{array}\]

Now, we are going to test whether or not the factor level means \(\mu_{i}\) are equal. The following testing hypotheses is considered

\[\begin{array}{l}
H_{0}:\mu_{1}=\mu_{2}=\cdots =\mu_{r}\\
H_{a}:\mbox{not all \(\mu_{i}\) are equal}
\end{array}\]

The test statistic to be used is \(F^{*}=\frac{MSTR}{MSE}\). When all treatment means \(\mu_{i}\) are equal, each observation \(Y_{ij}\) has the same expectation. Then, Cochran’s theorem says that, when \(H_{0}\) holds, \(\frac{SSE}{\sigma^{2}}\) and \(\frac{SSTR}{\sigma^{2}}\) are independent \(\chi_{n_{T}-r}^{2}\) and \(\chi_{r-1}^{2}\) random variables, respectively. It follows that, when \(H_{0}\) holds, \(F^{*}\) is distributed as \(F_{r-1,n_{T}-r}\). The decision rule to control the level of significance at \(\alpha\) is given by

\[\begin{array}{l}
\mbox{If }F^{*}\leq F_{1-\alpha ;r-1,n_{T}-r},\mbox{ we conclude }H_{0}\\ \mbox{If }F^{*}>F_{1-\alpha ;r-1,n_{T}-r},\mbox{ we conclude }H_{a}
\end{array}\]

From Example \ref{let2ex1}, we wish to test whether or not mean sales are the same for the four designs

\[\begin{array}{l}
H_{0}:\mu_{1}=\mu_{2}=\mu_{3}=\mu_{4}\\
H_{a}:\mbox{not all \(\mu_{i}\) are equal}
\end{array}\]

Suppose that we wish to control the risk of making a Type I error at \(\alpha =0.05\). We require \(F_{0.95;3,6}=4.76\). Therefore, the decision rule is given by

\[\begin{array}{l}
\mbox{If }F^{*}\leq 4.76,\mbox{ we conclude }H_{0}\\ \mbox{If }F^{*}>4.76,\mbox{ we conclude }H_{a}
\end{array}\]

Using the above ANOVA table, the test statistic is given by

\[F^{*}=\frac{MSTR}{MSE}=\frac{86}{7.67}=11.2>4.76.\]

We conclude \(H_{a}\), which means that the factor level means \(\mu_{i}\) are not equal, or that the four different designs do not lead to the same mean sales volume. Therefore, we conclude that there is a relation between design and sales volume.

\begin{equation}{\label{b}}\tag{B}\mbox{}\end{equation}

Two-Factor ANOVA Model.

Suppose that we have two factors \(A\) and \(B\). The mean response for a given treatment in a two-factor study is denoted by \(\mu_{ij}\), where \(i\) refers to the level of factor \(A\) for \(i=1,\cdots ,a\) and \(j\) refers to the level of factor \(B\) for \(j=1,\cdots ,b\). We illustrate a simple two-factor study in which the effects of gender and age on learning a task. The age factor has been defined in terms of only three factor levels (young, middle, old), as shown in the following

\[\mbox{Table 1: Mean Learning Time — Age Effect but No Gender Effect with No Interactions}\]

\[\begin{array}{lcccc}\hline
& \mbox{Factor \(B\)–Age} &&&\\
\mbox{Factor \(A\)–Gender} & \mbox{\(j=1\) Young} & \mbox{\(j=2\) Middle} & \mbox{\(j=3\) Old} & \mbox{Row Average}\\
\hline \mbox{\(i=1\) Male} & 9(\mu_{11}) & 11(\mu_{12}) & 16(\mu_{13}) & 12(\mu_{1\cdot})\\
\mbox{\(i=2\) Female} & 9(\mu_{21}) & 11(\mu_{22}) & 16(\mu_{23}) & 12(\mu_{2\cdot})\\
\hline \mbox{Column Average} & 9(\mu_{\cdot 1}) & 11(\mu_{\cdot 2}) & 16(\mu_{\cdot 3}) & 12(\mu_{\cdot\cdot})\\ \hline\end{array}\]

The main gender effects are given by 

\begin{align*} \alpha_{1}  & =\mu_{1\cdot}-\mu_{\cdot\cdot}=12-12=0\\ \alpha_{2} & =\mu_{2\cdot}-\mu_{\cdot\cdot}=12-12=0.\end{align*}

The main age effects are given by 
\begin{align*} \beta_{1} & =\mu_{\cdot 1}-\mu_{\cdot\cdot}=9-12=-3\\
\beta_{2} & =\mu_{\cdot 2}-\mu_{\cdot\cdot}=11-12=-1\\
\beta_{3} & =\mu_{\cdot 3}-\mu_{\cdot\cdot}=16-12=4\end{align*}

The treatment means in Table 1 for the learning example indicate that the mean learning times for men and women are the same for each group. On the other hand, the mean learning time increases with age for each gender. Therefore, gender has no effect on mean learning time, but age does. The column average for the \(j\)th column is denoted by \(\mu_{\cdot j}\) with

\[\mu_{\cdot j}=\frac{\sum_{i=1}^{a} \mu_{ij}}{a}.\]

The row average for the \(i\)th row is denoted by \(\mu_{i\cdot}\) with

\[\mu_{i\cdot}=\frac{\sum_{j=1}^{b} \mu_{ij}}{b}.\]

The overall mean learning time for all ages and both genders is denoted by \(\mu_{\cdot\cdot}\) with

\begin{align*} \mu_{\cdot\cdot} & =\frac{\sum_{i}\sum_{j} \mu_{ij}}{ab}\\ & =\frac{\sum_{i} \mu_{i\cdot}}{a}\\ & =\frac{\sum_{j} \mu_{\cdot j}}{b}\end{align*}

The main effect of factor \(A\) at the \(i\)th level is defined by \(\alpha_{i}=\mu_{i\cdot}-\mu_{\cdot\cdot}\), and the main effect of factor \(B\) at the \(j\)th level is defined by \(\beta_{j}=\mu_{\cdot j}-\mu_{\cdot\cdot}\).

It can be shown \(\sum_{i} \alpha_{i}=0\) and \(\sum_{j} \beta_{j}=0\). From Table 1, we have

\begin{equation}{\label{let2e5}}\tag{3}\mu_{ij}=\mu_{\cdot\cdot}+\alpha_{i}+\beta_{j},\end{equation}

which can be expressed equivalently as

\begin{equation}{\label{let2e6}}\tag{4}\mu_{ij}=\mu_{i\cdot}+\mu_{\cdot j}-\mu_{\cdot\cdot}\end{equation}

It can also be shown that each treatment mean \(\mu_{ij}\) in Table 1(a) can be expressed in terms of three other treatment means

\begin{equation}{\label{let2e7}}\tag{5}\mu_{ij}=\mu_{ij’}+\mu_{i’j}-\mu_{i’j’}\mbox{ for }i\neq i’\mbox{ and }j\neq j’\end{equation}

When all treatment means can be expressed in the form of (\ref{let2e5}), (\ref{let2e6}) or (\ref{let2e7}), we say that the factors do not interact, or that no factor interactions are present, or that the factor effects are additive. The significance of no factor interactions is that the effects of the two factors can be described separately merely by analyzing the factor level means or the factor main effects. Therefore, in the learning example in Table 1, the two gender means signify that gender has no influence regardless of age, and the three age means portray the influence of age regardless of gender. The analysis of factor effects is therefore quite simple when there are no factor interactions.

The following Table 2 contains another illustration of factor effects that do not interact. The situation here differs from that of Table 1 in that not only age but also gender affect the learning time. This is evident from the fact that the mean learning times for men and women are not the same for any age group.

\[\mbox{Table 2: Mean Learning Time — Age Effect and Gender Effects with No Interactions}\]

\[\begin{array}{lcccc}\hline
& \mbox{Factor \(B\)–Age} &&&\\
\mbox{Factor \(A\)–Gender} & \mbox{\(j=1\) Young} & \mbox{\(j=2\) Middle} & \mbox{\(j=3\) Old} & \mbox{Row Average}\\
\hline \mbox{\(i=1\) Male} & 11(\mu_{11}) & 13(\mu_{12}) & 18(\mu_{13}) & 14(\mu_{1\cdot})\\
\mbox{$i=2$ Female} & 7(\mu_{21}) & 9(\mu_{22}) & 14(\mu_{23}) & 10(\mu_{2\cdot})\\
\hline \mbox{Column Average} & 9(\mu_{\cdot 1}) & 11(\mu_{\cdot 2}) & 16(\mu_{\cdot 3}) & 12(\mu_{\cdot\cdot})\\
\hline\end{array}\]

The main gender effects are given by

\begin{align*} \alpha_{1} & =\mu_{1\cdot}-\mu_{\cdot\cdot}=14-12=2\\  \alpha_{2} & =\mu_{2\cdot}-\mu_{\cdot\cdot}=10-12=-2\end{align*}

The main age effects are given by 

\begin{align*} \beta_{1} & =\mu_{\cdot 1}-\mu_{\cdot\cdot}=9-12=-3\\
\beta_{2} & =\mu_{\cdot 2}-\mu_{\cdot\cdot}=11-12=-1\\
\beta_{3} & =\mu_{\cdot 3}-\mu_{\cdot\cdot}=16-12=4\end{align*}

In Table 2, every mean response can be decomposed as

\[\mu_{ij}=\mu_{\cdot\cdot}+\alpha_{i}+\beta_{j}.\]

Therefore, the two factors do not interact and the factor effects can be separately analyzed by examining the factor level means \(\mu_{i\cdot}\) and \(\mu_{\cdot j}\), respectively.

The following Table 3(a) contains an illustration for the learning example where the factor effects do interact. The mean learning times for the different gender-age combinations in Table 3(a) indicate that gender has no effect on learning time for young persons but has a substantial effect for old persons. This differential influence of gender, which depends on the age of the persons, implies that the age and gender factors interact in their effect on learning time.

\[\mbox{Table 3: Mean Learning Time — Age Effect and Gender Effect with Interactions}\]

\[\begin{array}{lccccc}\hline
& \mbox{Factor \(B\)–Age} &&&&\\
\mbox{Factor \(A\)–Gender} & \mbox{\(j=1\) Young} & \mbox{\(j=2\) Middle} & \mbox{\(j=3\) Old} & \mbox{Row Average} & \mbox{Main Gender Effect}\\
\hline \mbox{\(i=1\) Male} & 9(\mu_{11}) & 12(\mu_{12}) & 18(\mu_{13}) & 13(\mu_{1\cdot}) & 1(\alpha_{1})\\
\mbox{$i=2$ Female} & 9(\mu_{21}) & 10(\mu_{22}) & 14(\mu_{23}) & 11(\mu_{2\cdot}) & -1(\alpha_{2})\\
\hline \mbox{Column Average} & 9(\mu_{\cdot 1}) & 11(\mu_{\cdot 2}) & 16(\mu_{\cdot 3}) & 12(\mu_{\cdot\cdot}) &\\
\mbox{Main Age Effect} & -3(\beta_{1}) & -1(\beta_{2}) & 4(\beta_{3}) &&\\
\hline\end{array}\]

The interactions are given below

\[\begin{array}{ccccc}\hline & j=1 &  j=2 &  j=3 & \mbox{Row Average}\\
\hline i=1 & -1 & 0 & 1 & 0\\
i=2 & 1 & 0 & -1 &  0 \\
\hline \mbox{Column Average} & 0 & 0 & 0 & 0\\ \hline\end{array}\]

The difference between the treatment mean \(\mu_{ij}\) and the value \(\mu_{\cdot\cdot}+\alpha_{i}+\beta_{j}\) is called the interaction effect, or more simply the interaction, of the \(i\)th level of factor \(A\) with the \(j\)th level of factor \(B\), and is denoted by \((\alpha\beta )_{ij}\). Therefore, we defined \((\alpha\beta )_{ij}\) as

\[(\alpha\beta )_{ij}=\mu_{ij}-(\mu_{\cdot\cdot}+\alpha_{i}+\beta_{j}).\]

Replacing \(\alpha_{i}\) and \(\beta_{j}\) by their definitions, respectively, we obtain the equivalent definition

\[(\alpha\beta )_{ij}=\mu_{ij}-\mu_{i\cdot}-\mu_{\cdot j}+\mu_{\cdot\cdot}.\]

We still have another alternative definition given by

\[(\alpha\beta )_{ij}=\mu_{ij}-\mu_{ij’}-\mu_{i’j}+\mu_{i’j’}\mbox{ for }i\neq i’\mbox{ and }j\neq j’.\]

It can be shown \(\sum_{i} (\alpha\beta )_{ij}=0\) for \(j=1,\cdots ,b\) and \(\sum_{j} (\alpha\beta )_{ij}=0\) for \(i=1,\cdots ,a\). Consequently, the sum of all interactions is also zero given by \(\sum_{i}\sum_{j} (\alpha\beta )_{ij}=0\).

The \(k\)th observation ($k=1,\cdots ,n$) for the treatment where \(A\) is at the \(i\)th level and \(B\) at the \(j\)th level is denoted by \(Y_{ijk}\) for \(i=1,\cdots ,a\) and \(j=1,\cdots ,b\). Therefore, the total number of cases for the two-factor study is \(n_{T}=abn\). The ANOVA model for two-factor is given by

\[Y_{ijk}=\mu_{ij}+\varepsilon_{ijk}\]

for \(i=1,\cdots ,a\), \(j=1,\cdots ,b\) and \(k=1,\cdots ,n\).

  • \(\mu_{ij}\) are parameters.
  • \(\varepsilon_{ijk}\) are independent \(N(0,\sigma^{2})\).

We have the following features of the model

(i) Since \(\mathbb{E}(\varepsilon_{ijk})=0\), it follows \(\mathbb{E}(Y_{ijk})=\mu_{ij}\).

(ii) Since \(\mu_{ij}\) is a constant, the variance of \(Y_{ijk}\) is \(\mathbb{V}(Y_{ijk})=\mathbb{V}(\varepsilon_{ijk})=\sigma^{2}\).

(iii) Since the error terms \(\varepsilon_{ijk}\) are independent and normally distributed, the observations \(Y_{ijk}\) are also independent \(N(\mu_{ij},\sigma^{2})\).

\begin{equation}{\label{let2ex3}}\tag{6}\mbox{}\end{equation}

Example \ref{let2ex3} Now, we consider the following data for two-factor study

\[\begin{array}{lcccc}\hline
& \mbox{Factor \(B\) (display width)} & &&\\
\mbox{Factor \(A\) (display height)} & j & &&\\
i & \mbox{\(B_{1}\)(regular)} & \mbox{\(B_{2}\)(wide)} & \mbox{Row Total} & \mbox{Display Height Average}\\
\hline \mbox{\(A_{1}\)(Bottom)} & 47(Y_{111}) & 46(Y_{121}) &&\\
& 43(Y_{112}) & 40(Y_{122}) &&\\
\mbox{Total} & 90(Y_{11\cdot}) & 86(Y_{12\cdot}) & 176(Y_{1\cdot\cdot}) &\\
\mbox{Average} & 45(\bar{Y}_{11\cdot}) & 43(\bar{Y}_{12\cdot}) && 44(\bar{Y}_{1\cdot\cdot})\\ \hline \mbox{\(A_{2}\)(Middle)} & 62(Y_{211}) & 67(Y_{221}) &&\\
& 68(Y_{212}) & 71(Y_{222}) &&\\
\mbox{Total} & 130(Y_{21\cdot}) & 138(Y_{22\cdot}) & 268(Y_{2\cdot\cdot}) &\\
\mbox{Average} & 65(\bar{Y}_{21\cdot}) & 69(\bar{Y}_{22\cdot}) && 67(\bar{Y}_{2\cdot\cdot})\\ \hline \mbox{\(A_{3}\)(Top)} & 41(Y_{311}) & 42(Y_{321}) &&\\
& 39(Y_{312}) & 46(Y_{322}) &&\\
\mbox{Total} & 80(Y_{31\cdot}) & 88(Y_{32\cdot}) & 168(Y_{3\cdot\cdot}) &\\
\mbox{Average} & 40(\bar{Y}_{31\cdot}) & 44(\bar{Y}_{32\cdot}) &&
42(\bar{Y}_{3\cdot\cdot})\\ \hline \mbox{Column Total} &  300(Y_{\cdot 1\cdot}) & 312(Y_{\cdot 2\cdot}) &
612(Y_{\cdot\cdot\cdot}) &\\
\mbox{Display Width Average} & 50(\bar{Y}_{\cdot 1\cdot}) & 52(\bar{Y}_{\cdot 2\cdot}) && 51(\bar{Y}_{\cdot\cdot\cdot})\\
\hline\end{array}\]

An observation is denoted by \(Y_{ijk}\). The subscripts \(i\) and \(j\) specify the levels of factors \(A\) and \(B\), respectively, and the subscript \(k\) refers to the given case of trial for a particular treatment. \(\sharp\)

The sum of observations for the treatment corresponding to the \(i\)th level of factor \(A\) and the \(j\)th level of factor \(B\) is

\[Y_{ij\cdot}=\sum_{k=1}^{n} Y_{ijk}.\]

The corresponding mean is \(\bar{Y}_{ij\cdot}=\frac{Y_{ij\cdot}}{n}\). The total of all observations for the \(i\)th factor level of \(A\) is

\[Y_{i\cdot\cdot}=\sum_{j=1}^{b}\sum_{k=1}^{n} Y_{ijk}\]

and the corresponding mean is \(\bar{Y}_{i\cdot\cdot}=\frac{Y_{i\cdot\cdot}}{bn}\). The total of all observations for the \(j\)th factor level of \(B\) is

\[Y_{\cdot j\cdot}=\sum_{i=1}^{a}\sum_{k=1}^{n} Y_{ijk}\]

and the corresponding mean is \(\bar{Y}_{\cdot j\cdot}=\frac{Y_{\cdot i\cdot}}{an}\). Finally, the sum of all observations is

\[Y_{\cdot\cdot\cdot}=\sum_{i=1}^{a}\sum_{j=1}^{b}\sum_{k=1}^{n} Y_{ijk}\]

and the overall mean is \(\bar{Y}_{\cdot\cdot\cdot}=\frac{Y_{\cdot\cdot\cdot}}{nab}\). The least squares criterion is

\[Q=\sum_{i}\sum_{j}\sum_{k} (Y_{ijk}-\mu_{ij})^{2}\]

When we perform the minimization of \(Q\), we obtain the least squares estimators \(\hat{\mu}_{ij}=\bar{Y}_{ij\cdot}\). Therefore, the fitted values are the estimated treatment means \(\hat{Y}_{ijk}=\hat{\mu}_{ij}=\bar{Y}_{ij\cdot}\). The residuals, as usual, are defined as the difference between the observed value and fitted value is given by

\[e_{ijk}=Y_{ijk}-\hat{Y}{ijk}=Y{ijk}-\bar{Y}_{ij\cdot}.\]

It can be shown that the least squares estimators are MLE. Let

\begin{align*} SSTO & =\sum_{i}\sum_{j}\sum_{k} (Y_{ijk}-\bar{Y}_{\cdot\cdot\cdot})^{2}\\ SSTR & =n\sum_{i}\sum_{j} (\bar{Y}_{ij\cdot}- \bar{Y}_{\cdot\cdot\cdot})^{2}\\ SSE & =\sum_{i}\sum_{j}\sum_{k} e_{ijk}^{2}=\sum_{i}\sum_{j}\sum_{k} (Y_{ijk}-\bar{Y}_{ij\cdot})^{2}\end{align*}

where \(SSTR\) reflects the variability between the \(ab\) estimated treatment means and is the ordinary treatment sum of squares, and \(SSE\) reflects the variability within the treatments and is the usual error sum of squares. Since

\[Y_{ijk}-\bar{Y}_{\cdot\cdot\cdot}=(\bar{Y}_{ij\cdot}-\bar{Y}_{\cdot\cdot\cdot})+(Y_{ijk}-\bar{Y}_{ij\cdot}),\]

it can be shown

\[\sum_{i}\sum_{j}\sum_{k} (Y_{ijk}-\bar{Y}_{\cdot\cdot\cdot})^{2}= n\sum_{i}\sum_{j} (\bar{Y}_{ij\cdot}-\bar{Y}_{\cdot\cdot\cdot})^{2}+\sum_{i}\sum_{j}\sum_{k} (Y_{ijk}-\bar{Y}_{ij\cdot})^{2}.\]

Therefore, we have

\[SSTO=SSTR+SSE.\]

Let

\begin{align*} SSA & =nb\sum_{i} (\bar{Y}_{i\cdot\cdot}- \bar{Y}_{\cdot\cdot\cdot})^{2}\\ SSB & =na\sum_{j} (\bar{Y}_{\cdot j\cdot}- \bar{Y}_{\cdot\cdot\cdot})^{2}\\ SSAB & =n\sum_{i}\sum_{j} (\bar{Y}_{ij\cdot}-\bar{Y}_{i\cdot\cdot}-\bar{Y}_{\cdot j\cdot}+\bar{Y}_{\cdot\cdot\cdot})^{2}\end{align*}

Since

\[\bar{Y}_{ij\cdot}-\bar{Y}_{\cdot\cdot\cdot}=\underbrace{\bar{Y}_{i\cdot\cdot}-\bar{Y}_{\cdot\cdot\cdot}}_{\scriptsize A\mbox{ main effect}}+ \underbrace{\bar{Y}_{\cdot j\cdot}-\bar{Y}_{\cdot\cdot\cdot}}_{\scriptsize B\mbox{ main effect}}+\underbrace{\bar{Y}_{ij\cdot}- \bar{Y}_{i\cdot\cdot}-\bar{Y}_{\cdot j\cdot}+\bar{Y}_{\cdot\cdot\cdot}}_{\scriptsize AB\mbox{ interaction effect}},\]

it can be shown

\[n\sum_{i}\sum_{j} (\bar{Y}_{ij\cdot}-\bar{Y}_{\cdot\cdot\cdot})^{2}=nb\sum_{i} (\bar{Y}_{i\cdot\cdot}-\bar{Y}_{\cdot\cdot\cdot})^{2}+na\sum_{j} (\bar{Y}_{\cdot j\cdot}-\bar{Y}_{\cdot\cdot\cdot})^{2}+n\sum_{i}\sum_{j} (\bar{Y}_{ij\cdot}-\bar{Y}_{i\cdot\cdot}-\bar{Y}_{\cdot j\cdot}+\bar{Y}_{\cdot\cdot\cdot})^{2}.\]

Therefore, we have

\[SSTR=SSA+SSB+SSAB\]

and

\[SSTO=SSA+SSB+SSAB+SSE.\]

  • The \(SSA\), called the factor \(A\) sum of squares, measures the variability of the estimated factor \(A\) level means \(\bar{Y}_{i\cdot\cdot}\).
  • The \(SSB\), called the factor \(B\) sum of squares, measures the variability of the estimated factor \(B\) level means \(\bar{Y}_{\cdot j\cdot}\).
  • The \(SSAB\), called the $AB$ interaction sum of squares, measure the variability of the estimated interactions \(\bar{Y}_{ij\cdot}- \bar{Y}_{i\cdot\cdot}-\bar{Y}_{\cdot j\cdot}+\bar{Y}_{\cdot\cdot\cdot}\) for the \(ab\) treatments.

We have the following equivalent computational formulas.

\begin{align*} SSTO & =\sum_{i}\sum_{j}\sum_{k} Y_{ijk}^{2}-\frac{Y_{\cdot\cdot\cdot}^{2}}{nab}\\
SSTR & =\frac{\sum_{i}\sum_{j} Y_{ij\cdot}^{2}}{n}-\frac{Y_{\cdot\cdot\cdot}^{2}}{nab}\\
SSE & =\sum_{i}\sum_{j}\sum_{k} Y_{ijk}^{2}-\frac{\sum_{i}{j} Y_{ij\cdot}^{2}}{n}\\
SSA & =\frac{\sum_{i} Y_{i\cdot\cdot}^{2}}{nb}-\frac{Y_{\cdot\cdot\cdot}^{2}}{nab}\\
SSB & =\frac{\sum_{j} Y_{\cdot j\cdot}^{2}}{na}-\frac{Y_{\cdot\cdot\cdot}^{2}}{nab}\\
SSAB & =SSTO-SSE-SSA-SSB=SSTR-SSA-SSB.\end{align*}

For two-factor studies with \(n\) cases for each treatment, there are a total of \(n_{T}=nab\) cases and \(r=ab\) treatments. Therefore, the degrees of freedom associated with \(SSTO\), \(SSTR\) and \(SSE\) are \(nab-1\), \(ab-1\) and \(nab-ab=(n-1)ab\), respectively. For the further breakdown of the treatment sum of squares \(SSTR\), we can also obtain a breakdown of the associated \(ab-1\) degrees of freedom. The \(SSA\) has \(a-1\) degrees of freedom associated with it. There are \(a\) factor level deviations \(\bar{Y}_{i\cdot\cdot}-\bar{Y}_{\cdot\cdot\cdot}\), but one degree of freedom is lost because the deviations are subject to one restriction, i.e., \(\sum (\bar{Y}_{i\cdot\cdot}-\bar{Y}_{\cdot\cdot\cdot})=0\). Similarly, the \(SSB\) has \(b-1\) degrees of freedom associated with it. The degrees of freedom associated with \(SSAB\) is the remainder given by

\[(ab-1)-(a-1)-(b-1)=(a-1)(b-1).\]

The degrees of freedom associated with \(SSAB\) may be understood as follows. There are \(ab\) interaction terms. These are subject to \(b\) restrictions since

\[\sum_{i} (\bar{Y}_{ij\cdot}-\bar{Y}_{i\cdot\cdot}-\bar{Y}_{\cdot j\cdot}+ \bar{Y}_{\cdot\cdot\cdot})=0\]

for \(j=1,\cdots ,b\). There are \(a\) additional restrictions since

\[\sum_{j} (\bar{Y}_{ij\cdot}-\bar{Y}_{i\cdot\cdot}-\bar{Y}_{\cdot j\cdot}+ \bar{Y}_{\cdot\cdot\cdot})=0\]

for \(i=1,\cdots ,a\). However, only \(a-1\) of these latter restrictions are independent, since the last one is implied by the previous \(b\) restrictions. There are \(b+(a-1)\) independent restrictions. Therefore, the degrees of freedom is given by

\[ab-(b+a-1)=(a-1)(b-1).\]

Mean squares are obtained in the usual way by dividing the sum of squares by their associated degrees of freedom. Then, we have

\[MSA=\frac{SSA}{a-1}, MSB=\frac{SSB}{b-1}\mbox{ and }MSAB=\frac{SSAB}{(a-1)(b-1)}.\]

The expectation of mean squares can be shown below

\begin{align*} \mathbb{E}(MSE) & =\sigma^{2}\\
\mathbb{E}(MSTR) & =\sigma^{2}+\frac{n}{ab-1}\sum_{i}\sum_{j} (\mu_{ij}-\mu_{\cdot\cdot})^{2}\\
\mathbb{E}(MSA) & =\sigma^{2}+nb\frac{\sum_{i} \alpha_{i}^{2}}{a-1}=\sigma^{2}+nb\frac{\sum_{i} (\mu_{i\cdot}-\mu_{\cdot\cdot})^{2}}{a-1}\\
\mathbb{E}(MSB) & =\sigma^{2}+na\frac{\sum_{j} \beta_{j}^{2}}{b-1}=\sigma^{2}+na\frac{\sum_{j} (\mu_{\cdot j}-\mu_{\cdot\cdot})^{2}}{b-1}\\
\mathbb{E}(MSAB) & =\sigma^{2}+n\frac{\sum_{i}\sum_{j}(\alpha\beta )_{ij}^{2}}{(a-1)(b-1)}=\sigma^{2}+n\frac{\sum_{i}\sum_{j}(\mu_{ij}-\mu_{i\cdot}-\mu_{\cdot j}+\mu_{\cdot\cdot})^{2}}{(a-1)(b-1)}\end{align*}

Then, we have the following ANOVA table for two-factor study

\[\begin{array}{lccc}\hline \mbox{Source of Variation} & SS & df & MS \\
\hline \mbox{Between Treatments} & SSTR=n\sum\sum (\bar{Y}_{ij\cdot}- \bar{Y}_{\cdot\cdot\cdot})^{2} & ab-1 & {\displaystyle MSTR=\frac{SSTR}{ab-1}} \\
\hline \mbox{Factor \(A\)} & SSA=nb\sum (\bar{Y}_{i\cdot\cdot}- \bar{Y}_{\cdot\cdot\cdot})^{2} & a-1 & {\displaystyle MSA=\frac{SSA}{a-1}} \\
\mbox{Factor \(B\)} & SSB=na\sum (\bar{Y}_{\cdot j\cdot}- \bar{Y}_{\cdot\cdot\cdot})^{2} & b-1 & ${\displaystyle MSB=\frac{SSB}{b-1}} \\
\mbox{Factor \(AB\)} & SSAB=n\sum\sum (\bar{Y}_{ij\cdot}-\bar{Y}_{i\cdot\cdot}-\bar{Y}_{\cdot j\cdot}+\bar{Y}_{\cdot\cdot\cdot})^{2} & (a-1)(b-1) & {\displaystyle MSAB=\frac{SSAB}{(a-1)(b-1)}} \\
\hline \mbox{Error} & SSE=\sum\sum\sum (Y_{ijk}-\bar{Y}_{ij\cdot})^{2} & (n-1)ab & {\displaystyle MSE=\frac{SSE}{(n-1)ab}}\\ \hline \mbox{Total} & SSTO=\sum\sum\sum (Y_{ijk}-\bar{Y}_{\cdot\cdot\cdot})^{2} & nab-1 &\\
\hline\end{array}\]

Returning to Example \ref{let2ex3}, we have the following ANOVA table

\[\begin{array}{lccc}
\hline \mbox{Source of Variation} & SS & df & MS\\
\hline \mbox{Between Treatments} & 1580 & 5 & 316\\
\hline \mbox{Factor \(A\) (display height)} & 1544 & 2 & 772\\
\mbox{Factor \(B\) (display width)} & 12 & 1 & 12\\
\mbox{\(AB\) interactions} & 24 & 2 & 12\\
\hline \mbox{Error} & 62 & 6 & 10.3\\
\hline \mbox{Total} & 1642 & 11 &\\
\hline\end{array}\]

(i) To test whether or not the two factors interact, we consider

\[\begin{array}{l}
H_{0}:\mu_{ij}-\mu_{i\cdot}-\mu_{\cdot j}+\mu_{\cdot\cdot}=0\mbox{ for all }i,j\\
H_{a}:\mu_{ij}-\mu_{i\cdot}-\mu_{\cdot j}+\mu_{\cdot\cdot}\neq 0\mbox{ for some }i,j
\end{array}\]

or equivalently

\[\begin{array}{l}
H_{0}:\mbox{all }(\alpha\beta )_{ij}=0\\ H_{a}:\mbox{not all }(\alpha\beta )_{ij}\mbox{ equal zero}
\end{array}\]

The test statistic is \(F^{*}=\frac{MSAB}{MSE}\). When \(H_{0}\) holds, \(F^{*}\) is distributed as \(F_{(a-1)(b-1),(n-1)ab}\). The decision rule to control the Type I error at \(\alpha\) is given by

\[\begin{array}{l}
\mbox{If }F^{*}\leq F_{1-\alpha ;(a-1)(b-1),(n-1)ab},\mbox{ we conclude }H_{0}\\ \mbox{If }F^{*}>F_{1-\alpha ;(a-1)(b-1),(n-1)ab},\mbox{ we conclude }H_{a}\end{array}\]

(ii) To test whether or not \(A\) main effects are present, we consider

\[\begin{array}{l}
H_{0}:\mu_{1\cdot}=\mu_{2\cdot}=\cdots =\mu_{a\cdot}\\
H_{a}:\mbox{not all }\mu_{i\cdot}\mbox{ are equal}
\end{array}\]

or equivalently

\[\begin{array}{l}
H_{0}:\alpha_{1}=\alpha_{2}=\cdots =\alpha_{a}=0\\
H_{a}:\mbox{not all }\alpha_{i}\mbox{ equal zero}
\end{array}\]

We use the test statistic \(F^{*}=\frac{MSA}{MSE}\). When \(H_{0}\) holds, \(F^{*}\) is distributed as \(F_{a-1,(n-1)ab}\). The decision rule to control Type I error at \(\alpha\) is given by

\[\begin{array}{l}
\mbox{If }F^{*}\leq F_{1-\alpha ;a-1,(n-1)ab},\mbox{ we conclude }H_{0}\\ \mbox{If }F^{*}>F_{1-\alpha ;a-1,(n-1)ab},\mbox{ we conclude }H_{a}
\end{array}\]

(iii) To test whether or not \(B\) main effects are present, we consider

\[\begin{array}{l}
H_{0}:\mu_{\cdot 1}=\mu_{\cdot 2}=\cdots =\mu_{\cdot b}\\
H_{a}:\mbox{not all }\mu_{\cdot j}\mbox{ are equal}
\end{array}\]

or equivalently

\[\begin{array}{l}
H_{0}:\beta_{1}=\beta_{2}=\cdots =\beta_{b}=0\\
H_{a}:\mbox{not all }\beta_{j}\mbox{ equal zero}
\end{array}\]

We use the test statistic \(F^{*}=\frac{MSB}{MSE}\). When \(H_{0}\) holds, \(F^{*}\) is distributed as \(F_{b-1,(n-1)ab}\). The decision rule to control Type I error at \(\alpha\) is given by

\[\begin{array}{l}
\mbox{If }F^{*}\leq F_{1-\alpha ;b-1,(n-1)ab},\mbox{ we conclude }H_{0}\\ \mbox{If }F^{*}>F_{1-\alpha ;b-1,(n-1)ab},\mbox{ we conclude }H_{a}
\end{array}\]

Example. We shall investigate in Example \ref{let2ex3} the presence of display height and display width effects using a level of significance of \(\alpha =0.05\) for each test. First we begin by testing whether or not interaction effects are present

\[\begin{array}{l}
H_{0}:\mbox{all }(\alpha\beta )_{ij}=0\\ H_{a}:\mbox{not all }(\alpha\beta )_{ij}\mbox{ equal zero}
\end{array}\]

Since the Type I error at \(\alpha\) is \(\alpha =0.05\), we require \(F_{0.95;2,6}=5.14\). From Table 6, we obtain

\[F^{*}=\frac{MSAB}{MSE}=\frac{12}{10.3}=1.17<5.14.\]

We conclude \(H_{0}\), which says that display height and display width do not interact in their effects on sales.

Since the two factors do not interact, we turn to testing for display height (factor \(A\)) main effects. From Table 6, the test statistic is

\[F^{*}=\frac{MSA}{MSE}=\frac{772}{10.3}=75>5.14=F_{0.95;2,6}.\]

We conclude \(H_{a}\), which says that not all factor \(A\) level means \(\mu_{i}\) are equal, or that some definite effects associated with height of display level exist. Finally, we test for display width (factor \(B\)) main effects. The test statistic is

\[F^{*}=\frac{MSB}{MSE}=\frac{12}{10.3}=1.17<5.99=F_{0.95;1,6}.\]

We conclude \(H_{0}\), which says that all \(\mu_{\cdot j}\) are equal, or that display width has no effects on sales. \(\sharp\)

The test of the equality of several means considered in the above discussion is an example of a statistical inference method called the analysis of variance (ANOVA). This method derives its name from the fact the quadratic form \(SSTO=(n-1)S^{2}\), the total sum of squares about the combined sample mean, is decomposed into component parts and analysed. Now, other problems in the analysis of variance will be investigated. Here we restrict our observations to the two-factor case, but the reader can see how it can be extended to three-factor and other cases. Consider a situation in which it is desirable to investigate the effects of two factors that influence an outcome of an experiment. For example, a teaching method and the size of a class might influence a student’s score on a standard test; or the type of car and the grade of gasoline used might change the number of miles per gallon. The first analysis of variance model that we discuss is referred to as a two-sample classification with one observation per cell. In particular, assume that there are two factors (attributes), one of which has \(a\) levels and the other \(b\) levels. Therefore, there are \(n=ab\) possible outcomes, each of which determines a cell. Let us think of these cells as being arranged in \(a\) rows and \(b\) columns. We take one observation per cell, and we denote the observation in the \(i\)th row and \(j\)th column by \(X_{ij}\). Furthermore, we assume that \(X_{ij}\) is \(N(\mu_{ij},\sigma^{2})\) for \(i=1,\cdots ,a\) and \(j=1,\cdots , b\), and that the \(n=ab\) random variables are independent. We shall assume that the means \(\mu_{ij}\) are composed of a row effect, a column effect, and an overall effect in some additive way, namely

\[\mu_{ij}=\mu +\alpha_{i}+ \beta_{j},\]

where

\[\sum_{i=1}^{a} \alpha_{i}=0\mbox{ and }\sum_{j=1}^{b} \beta_{j}=0.\]

The parameter \(\alpha_{i}\) represents the \(i\)th row effect, and the parameter \(\beta_{j}\) represents the \(j\)th column effect. There is no loss in generality in assuming that

\[\sum_{i=1}^{a} \alpha_{i}=\sum_{j=1}^{b}\beta_{j}=0.\]

To see this, let

\[\mu_{ij}=\mu^{\prime}+\alpha_{i}^{\prime}+\beta_{j}^{\prime}.\]

We write

\[\bar{\alpha}^{\prime}=\frac{1}{a}\sum_{i=1}^{a} \alpha_{i}^{\prime}\]

and

\[\bar{\beta}^{\prime}=\frac{1}{b}\sum_{j=1}^{b}\beta_{j}^{\prime}.\]

Then, wee have

\begin{align*} \mu_{ij} & =(\mu^{\prime}+\bar{\alpha}^{\prime}+\bar{\beta}^{\prime}+(\alpha_{i}^{\prime}-\bar{\alpha}^{\prime})+(\beta_{j}^{\prime}-\bar{\beta}^{\prime})\\ & =\mu +\alpha_{i}+\beta_{j},\end{align*}

where \(\sum_{i=1}^{a} \alpha_{i}=0\) and \(\sum_{j=1}^{b} \beta_{j}=0\).

To test the hypothesis that there is no row effect, we would test

\[H_{A}:\alpha_{1}=\alpha_{2}=\cdots =\alpha_{a}=0\]

since \(\sum_{i=1}^{a} \alpha_{i}=0\). Similarly, to test that there is no column effect, we would test

\[H_{B}:\beta_{1}=\beta_{2}=\cdots =\beta_{b}=0\]

since \(\sum_{j=1}^{b} \beta_{j}=0\). To test these hypotheses, we shall again partition the total sum of squares into several component parts. Let

\begin{align*} \bar{X}_{i\cdot} & =\frac{1}{b}\sum_{j=1}^{b} X_{ij},\\ \bar{X}_{\cdot j} & =\frac{1}{a}\sum_{i=1}^{a} X_{ij},\\ \bar{X}_{\cdot\cdot} & =\frac{1}{ab}\sum_{i=1}^{a}\sum_{j=1}^{b} X_{ij}.\end{align*}

Then, we have

\begin{align*}
SSTO & =\sum_{i=1}^{a}\sum_{j=1}^{b} (X_{ij}-\bar{X}_{\cdot\cdot})^{2}\\
& =\sum_{i=1}^{a}\sum_{j=1}^{b} [(\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot})+(\bar{X}_{\cdot j}-\bar{X}_{\cdot\cdot})+(X_{ij}-\bar{X}_{i\cdot}-
\bar{X}_{\cdot j}+\bar{X}_{\cdot\cdot})]^{2}\\
& =b\sum_{i=1}^{a} (\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot})^{2}+a\sum_{j=1}^{b} (\bar{X}_{\cdot j}-\bar{X}_{\cdot\cdot})^{2}+
\sum_{i=1}^{a}\sum_{j=1}^{b} (X_{ij}-\bar{X}_{i\cdot}-\bar{X}_{\cdot j}+\bar{X}_{\cdot\cdot})^{2}\\
& =SSA+SSB+SSE,
\end{align*}

where \(SSA\) is the sum of squares among levels of factor \(A\) or among rows, \(SSB\) is the sum of squares levels of factor \(B\) or among columns, and \(SSE\) is the error or residual sum of squares. It can be shown that the three “cross-product” terms in the square of the trinomial sum to zero. The distribution of the error sum of squares does not depends on the mean \(\mu_{ij}\), provided that the additive model is correct, and hence its distribution is the same whether \(H_{A}\) or \(H_{B}\) is true or not. Therefore, \(SSE\) acts as a “measuring stick” as did \(SSE\) in the previous section. This can be seen more clearly by writing

\begin{align*}
SSE & =\sum_{i=1}^{a}\sum_{j=1}^{b} (X_{ij}-\bar{X}_{i\cdot}-\bar{X}_{\cdot j}+\bar{X}_{\cdot\cdot})^{2}\\
& =\sum_{i=1}^{a}\sum_{j=1}^{b} [X_{ij}-(\bar{X}_{i\cdot}-\bar{X}_{\cdot\cdot})-(\bar{X}_{\cdot j}-\bar{X}_{\cdot\cdot})-
\bar{X}_{\cdot\cdot}]^{2}
\end{align*}

and noting the similarity of the summand in the right-hand member with

\[X_{ij}-\mu_{ij}=X_{ij}-\alpha_{i}-\beta_{j}-\mu .\]

Now, we show that \(SSA/\sigma^{2}\), \(SSB/\sigma^{2}\), and \(SSE/\sigma^{2}\) are independent chi-square random variables, provided that both \(H_{A}\) and \(H_{B}\) are true, that is, when all the means have a common value \(\mu\). To do this, first note that \(SSTO/\sigma^{2}\) is \(\chi^{2}(ab-1)\). In addition, we see that the expressions such as \(SSA/\sigma^{2}\) and \(SSB/\sigma^{2}\) which are chi-square random variables, namely \(\chi^{2}(a-1)\) and \(\chi^{2}(b-1)\). Obviously, we have \(SSE\geq 0\). By Theorem \ref{ch5t1}, we obtain that \(SSA/\sigma^{2}\), \(SSB/\sigma^{2}\), and \(SSE/\sigma^{2}\) are independent chi-square random variables with \(a-1\), \(b-1\) and

\[ab-1-(a-1)-(b-1)=(a-1)(b-1)\]

degrees of freedom, respectively. To test the hypothesis

\[H_{A}:\alpha_{1}=\alpha_{2}=\cdots =\alpha_{a}=0\]

we shall use the row sum of squares \(SSA\) and the residual sum of squares \(SSE\). When \(H_{A}\) is true, \(SSA/\sigma^{2}\) and \(SSE/\sigma^{2}\) are independent chi-square random variables with \(a-1\) and \((a-1)(b-1)\) degrees of freedom, respectively. Thus \(SSA/(a-1)\) and \(SSE/(a-1)(b-1)\) are both unbiased estimator of \(\sigma^{2}\) when \(H_{A}\) is true. However \(\mathbb{E}[SSA/(a-1)]>\sigma^{2}\) when \(H_{A}\) is not true, and hence we would reject \(H_{A}\) when

\[F_{A}=\frac{SSA/[\sigma^{2}(a-1)]}{SSE/[\sigma^{2}(a-1)(b-1)]}=\frac{SSA/(a-1)}{SSE/(a-1)(b-1)}\]

is “too large”. Since \(F_{A}\) has an \(F(a-1,(a-1)(b-1))\) distribution when \(H_{A}\) is true, \(H_{A}\) is rejected if the observed value of \(F_{A}\geq F_{\alpha}(a-1,(a-1)(b-1))\). Similarly, the test of the hypothesis

\[H_{B}:\beta_{1}=\beta_{2}=\cdots =\beta_{b}=0\]

against all alternatives can be based on

\begin{align*} F_{B} & =\frac{SSB/[\sigma^{2}(b-1)]}{SSE/[\sigma^{2}(a-1)(b-1)]}\\ & =\frac{SSB/(b-1)}{SSE/(a-1)(b-1)}\end{align*}

which has an \(F(b-1,(a-1)(b-1))\) distribution provided that \(H_{B}\) is true. In the following table we give that ANOVA table that summarizes the information needed for these tests of hypotheses. The formulas for \(F_{A}\) and \(F_{B}\) show that each of them is a ratio of two mean squares.

\[\begin{array}{lcccc}
\hline \mbox{Source} & \mbox{Sum of Squares} & \mbox{Degrees of} & \mbox{Mean Square} & \mbox{\(F\)-Ratio}\\
& SS & \mbox{Freedom} & MS &\\ 
\hline \mbox{Factor \(A\) (row)} & SSA & a-1 & {\displaystyle MSA=\frac{SSA}{a-1}} & {\displaystyle \frac{MSA}{MSE}}\\
\mbox{Factor \(B\) (column)} & SSB & b-1 & {\displaystyle MSB=\frac{SSB}{b-1}} & {\displaystyle \frac{MSB}{MSE}}\\
\mbox{Error} & SSE & (a-1)(b-1) & {\displaystyle MSE=\frac{SSE}{(a-1)(b-1)}} &\\
\mbox{Total} & SSTO & ab-1 & &\\ 
\hline\end{array}\]

\begin{equation}{\label{ch5ex1}}\tag{7}\mbox{}\end{equation}

Example \ref{ch5ex1}. Each of three cars is driven with each of four different brands gasoline. The number of miles per gallon driven for each of the \(ab=3\cdot 4=12\) different combinations is recorded in the following table

\[\begin{array}{cccccc}\hline
\hline \mbox{Car} & 1 & 2 & 3 & 4 & \bar{X}_{i\cdot}\\ 
\hline 1 & 16 & 18 & 21 & 21 & 19\\
2 & 14 & 15 & 18 & 17 & 16\\
3 & 15 & 15 & 18 & 16 & 16\\
\bar{X}_{\cdot j} & 15 & 16 & 19 & 18 & 17\\ 
\hline\end{array}\]

We would like to test whether we can expect the same mileage for each of these four brands of gasoline. In our notation, we test the hypothesis

\[H_{B}:\beta_{1}=\beta_{2}=\beta_{3}=\beta_{4}=0\]

against all alternatives. At a \(0.01\) significance level, we shall reject \(H_{B}\) when the computed value \(F\) satisfies

\[\frac{SSB/(4-1)}{SSE/[(3-1)(4-1)]}\geq 9.78=F_{0.01}(3,6).\]

We have

\begin{align*}
SSB & =3[(15-17)^{2}+(16-17)^{2}+(19-17)^{2}+(18-17)^{2}]=30\\
SSE & =(16-19-15+17)^{2}+(14-16-15+17)^{2}+\cdots +(16-16-18+17)^{2}=4
\end{align*}

Hence the computed value \(F\) is given by \(\frac{30/3}{4/6}=15>9.78\), and the hypothesis \(H_{B}\) is rejected. That is, the gasoline seems to give
different performances (at least with these three cars). The information is summarized in the following table

\[\begin{array}{lccccc}
\hline \mbox{Sourc}e & \mbox{Sum of Squares} & \mbox{Degrees of} & \mbox{Mean Square} & \mbox{\(F\)-Ratio} & \mbox{\(p\)-value}\\
& SS & \mbox{Freedom} & MS &\\ 
\hline \mbox{Factor \(A\) (row)} & 24 & 2 & 12 & 18 &  0.0029\\
\mbox{Factor \(B\) (column)} & 30 & 3 & 10 & 15 & 0.0034\\
\mbox{Error} & 4 & 6 & 2/3 &&\\
\mbox{Total} & 58 & 11 &&&\\ 
\hline\end{array}\]

In a two-way classification problem, particular combinations of the two factors might interact differently from that expected from the additive model. For example, in Example \ref{ch5ex1}, gasoline \(3\) seems to be the best gasoline and car \(1\) is the best car. However, it sometimes happens that the two best do not “mix” well and the joint performance is poor. That is, there might be a strange interaction between this combination of car and gasoline and accordingly the joint performance is not as good as expected. Sometimes it can happen that we get good results from a combination of some of the poorer levels of each factor. This is called interaction, and it frequently occurs in practice. In order to test possible interaction, we shall consider a two-way classification problem in which \(c>1\) independent observations are taken per cell. Assume that \(X_{ijk}\) for \(i=1,2,\cdots ,a\), \(j=1,2,\cdots ,b\) and \(k=1,2,\cdots, c\),are \(n=abc\) random variables that are mutually independent and have normal distributions with a common, but unknown, variance \(\sigma^{2}\). The mean of each \(X_{ijk}\) for \(k=1,2,\cdots ,c\) is

\[\mu_{ij}=\mu +\alpha_{i}+\beta_{j}+\gamma_{ij},\]

where \(\sum_{i=1}^{a} \alpha_{i}=0\), \(\sum_{j=1}^{b}\beta_{j}=0\), \(\sum_{i=1}^{a} \gamma_{ij}=0\), and \(\sum_{j=1}^{b} \gamma_{ij}=0\). The parameter \(\gamma_{ij}\) is called the interaction associated with cell \((i,j)\). That is, the interaction between the \(i\)th level of one classification and the \(j\)th level of the other classification is \(\gamma_{ij}\). We are going to test the hypotheses 

  • the row effects are equal to zero;
  • the column effects are equal to zero;
  • there is no interaction.

We shall again partition the total sum of squares into several component parts. Let

\begin{align*} \bar{X}_{ij\cdot} & =\frac{1}{c}\sum_{k=1}^{c} X_{ijk},\\
\bar{X}_{i\cdot\cdot} & =\frac{1}{bc}\sum_{j=1}^{b}\sum_{k=1}^{c} X_{ijk},\\
\bar{X}_{\cdot j\cdot} & =\frac{1}{ac}\sum_{i=1}^{a}\sum_{k=1}^{c} X_{ijk},\\
\bar{X}_{\cdot\cdot\cdot} & =\frac{1}{abc}\sum_{i=1}^{a}\sum_{j=1}^{b}\sum_{k=1}^{c} X_{ijk}.\end{align*}

We have

\begin{align*}
SSTO & =\sum_{i=1}^{a}\sum_{j=1}^{b}\sum_{k=1}^{c} (X_{ijk}-\bar{X}_{\cdot\cdot\cdot})^{2}\\
& =bc\sum_{i=1}^{a} (\bar{X}_{i\cdot\cdot}-\bar{X}_{\cdot\cdot\cdot})^{2}+ac\sum_{j=1}^{b} (\bar{X}_{\cdot j\cdot}\bar{X}_{\cdot\cdot\cdot})^{2}\\
& \quad\quad +c\sum_{i=1}^{a}\sum_{j=1}^{b} (\bar{X}_{ij\cdot}-\bar{X}_{i\cdot\cdot}-\bar{X}_{\cdot j\cdot}+\bar{X}_{\cdot\cdot\cdot})^{2}+
\sum_{i=1}^{a}\sum_{j=1}^{b}\sum_{k=1}^{c} (X_{ijk}-\bar{X}_{ij\cdot})^{2}\\
& =SSA+SSB+SSAB+SSE,
\end{align*}

where \(SSA\) is the row sum of squares or the sum of squares among levels of factor \(A\), \(SSB\) is the column sum of squares or the sum of squares
among levels of factor \(B\), \(SSAB\) is the interaction sum of squares, and \(SSE\) is the error sum of squares. Again we can show that the cross-product
terms sum to zero. To consider the joint distribution of \(SSA\), \(SSB\), \(SSAB\) and \(SSE\), assume that all the means equal the same value \(\mu\). We know that \(SSTO/\sigma^{2}\) is \(\chi^{2}(abc-1)\). Also, we know that \(SSA/\sigma^{2}\) and \(SSB/\sigma^{2}\) are \(\chi^{2}(a-1)\) and \(\chi^{2}(b-1)\), respectively. Moreover

\[\frac{\sum_{k=1}^{c} (X_{ijk}-\bar{X}_{ij\cdot})^{2}}{\sigma^{2}}\]

is \(\chi^{2}(c-1)\). Therefore \(SSE/\sigma^{2}\) is the sum of \(ab\) independent chi-square random variables \(\chi^{2}(ab(c-1))\). Since \(SSAB\geq 0\), according to Theorem \ref{ch5t1}, we have that \(SSA/\sigma^{2}\), \(SSB/\sigma^{2}\), \(SSAB/\sigma^{2}\) and \(SSE/\sigma^{2}\) are mutually independent chi-square random variables with \(a-1\), \(b-1\), \((a-1)(b-1)\) and \(ab(c-1)\) degrees of freedom, respectively. To test the hypotheses concerning row, column, and interaction effects, we consider \(F\) statistics in which the numerators are affected by deviations from the respective hypotheses whereas the denominator is a function of \(SSE\), whose distribution depends only on the value of \(\sigma^{2}\) and not on the values of the cell means. Therefore \(SSE\) acts as our meaning stick here. The statistic for testing the hypothesis

\[H_{AB}:\gamma_{ij}=0, i=1,\cdots ,a; j=1,\cdots ,b\]

against all alternatives is given by 

\begin{align*}
F_{AB} & =\frac{c\sum_{i=1}^{a}\sum_{j=1}^{b} (\bar{X}_{ij\cdot}-\bar{X}_{i\cdot\cdot}-\bar{X}_{\cdot j\cdot}+\bar{X}_{\cdot\cdot\cdot})^{2}/
[\sigma^{2}(a-1)(b-1)]}{\sum_{i=1}^{a}\sum_{j=1}^{b}\sum_{k=1}^{c}(X_{ijk}-\bar{X}_{ij\cdot})^{2}/[\sigma^{2}ab(c-1)]}\\
& =\frac{SSAB/[(a-1)(b-1)]}{SSE/[ab(c-1)]},
\end{align*}

which has an \(F((a-1)(b-1),ab(c-1))\) distribution when \(H_{AB}\) is true. If the computed value \(F_{AB}\geq F_{\alpha}((a-1)(b-1),ab(c-1))\), we reject \(H_{AB}\) and say there is a difference among the means, since there seems to be interaction. Most statisticians do not proceed to test row and column effects if \(H_{AB}\) is rejected. The statistic for testing the hypothesis

\[H_{A}:\alpha_{1}=\alpha_{2}=\cdots =\alpha_{a}=0\]

against all alternatives is

\[F_{A}=\frac{bc\sum_{i=1}^{a} (\bar{X}_{i\cdot\cdot}-\bar{X}_{\cdot\cdot\cdot})^{2}/[\sigma^{2}(a-1)]}{\sum_{i=1}^{a}\sum_{j=1}^{b}\sum_{k=1}^{c} (X_{ijk}-\bar{X}_{ij\cdot})^{2}/[\sigma^{2}ab(c-1)]}=\frac{SSA/(a-1)}{SSE/[ab(c-1)]},\]

which has an \(F(a-1,ab(c-1))\) distribution when \(H_{A}\) is true. The statistic for testing the hypothesis

\[H_{B}:\beta_{1}=\beta_{2}=\cdots =\beta_{b}=0\]

against all alternatives is

\[F_{B}=\frac{b/ac\sum_{j=1}^{b} (\bar{X}_{\cdot j\cdot}-\bar{X}_{\cdot\cdot\cdot})^{2}/[\sigma^{2}(b-1)]}{\sum_{i=1}^{a}
\sum_{j=1}^{b}\sum_{k=1}^{c} (X_{ijk}-\bar{X}_{ij\cdot})^{2}/[\sigma^{2}ab(c-1)]}=\frac{SSB/(b-1)}{SSE/[ab(c-1)]},\]

which has an \(F(b-1,ab(c-1))\) distribution when \(H_{B}\) is true. Each of these hypotheses is rejected if the observed value of \(F\) is greater than a given constant that is selected to yield the desired significance level. In the following table, we give the ANOVA table that summarizes the information needed for these tests of hypotheses.

\[\begin{array}{lcccc}
\hline \mbox{Source} & \mbox{Sum of Squares} & \mbox{Degrees of} & \mbox{Mean Square} & \mbox{\(F\)-Ratio}\\
& SS & \mbox{Freedom} & MS &\\ 
\hline \mbox{Factor \(A\) (row)} & SSA & a-1 & {\displaystyle MSA=\frac{SSA}{a-1}} & {\displaystyle \frac{MSA}{MSE}}\\
\mbox{Factor \(B\) (column)} & SSB & b-1 & {\displaystyle MSB=\frac{SSB}{b-1}} & {\displaystyle \frac{MSB}{MSE}}\\
\mbox{Factor \(AB\) (interaction)} & SSAB & (a-1)(b-1) & {\displaystyle MSAB=\frac{SSAB}{(a-1)(b-1)}} & {\displaystyle \frac{MSAB}{MSE}}\\
\mbox{Error} & SSE & ab(c-1) & {\displaystyle MSE=\frac{SSE}{ab(c-1)}} &\\ 
\hline \mbox{Total} & SSTO &  abc-1 & &\\ 
\hline\end{array}\]

It should be noted that when the hypotheses are not true, each of \(F_{AB}\), \(F_{A}\), \(F_{B}\) has a non-central \(F\) distribution.

Example. The Castle Bakery Company supplies wrapped Italian bread to a large number of supermarkets in a metropolitan area. An experimental study was made of the effects of height of the shelf display (bottom, middle, top) and the width of the shelf display (regular, wide) on sales of this bakery bread (measured in cases) during the experimental period. Twelve supermarkets, similar in terms of sales volumes and clientele, were utilized in the study. Two stores were assigned at random to each of the six treatments according to a completely randomized design, and the display of the bread in each store followed the treatment specifications for that store. Sales of bread were recorded, and these results are presented in the following table.

\[\begin{array}{lcc}
\hline & \mbox{Factor \(B\) (display width)} & \\ 
\mbox{Factor \(A\) (display height)} & \mbox{\(1\) (regular)} & \mbox{\(2\) (width)}\\ 
\hline \mbox{\(1\) (bottom)} & 47 & 46\\
& 43 & 40\\ 
\mbox{\(2\) (middle)} & 62 & 67\\
& 68 & 71\\ 
\mbox{\(3\) (top)} & 41 & 42\\
& 39 & 46\\ 
\hline\end{array}\]

Then, we get the following ANOVA table

\[\begin{array}{lcccc}
\hline \mbox{Source} & \mbox{Sum of Squares} & \mbox{Degrees of} & \mbox{Mean Square} & \mbox{\(F\)-Ratio}\\
& SS & \mbox{Freedom} & MS &\\ 
\hline \mbox{Factor \(A\)} & 1544 & 2 & 772 & {\displaystyle \frac{772}{10.3}}\\
\mbox{Factor \(B\)} & 12 & 1 & 12 & {\displaystyle \frac{12}{10.3}}\\
\mbox{Factor \(AB\)} &24 & 2 & 12 & {\displaystyle \frac{12}{10.3}}\\
\mbox{Error} & 62 & 6 & 10.3 &\\ 
\hline \mbox{Total} & 1642 &  11 & &\\ 
\hline\end{array}\]

We assume that the significance level is taken to be \(\alpha =0.05\). Then \(F_{0.05}(1,6)=5.99\) and \(F_{0.05}(2,6)=5.14\). Therefore \(H_{A}\) is rejected and \(H_{B}\) and \(H_{AB}\) are not rejected. \(\sharp\)

Example. Consider the following experiment. One hundred eight people were randomly divided into six groups with \(18\) people in each group. Each person was given sets of three numbers to add. The three numbers were either in a “down array” or an “across array”, representing the two levels of factor \(A\). The levels of factor \(B\) are determined by the number of digits in the numbers to be added: one-digit, two-digit, or three digit numbers. The following table illustrates this with a sample problem for each cell.

\[\begin{array}{lccc}\hline
\hline \mbox{Type of Array} & 1 & 2 & 3\\ 
\hline \mbox{Down} & 5 & 25 & 259\\
& 3 & 69 & 567\\
& 8 & 37 & 130\\
\mbox{Across} & 5+3+8= & 25+69+37= & 59+567+130=\\ 
\hline\end{array}\]

However, an individual person only works problems of one of these types. Each person was placed in one of the six groups and was told to work as many problems as possible in \(90\) seconds. The measurement that was recorded was the average number of problems worked correctly in two trials. Whenever this many subjects are used, a computer becomes invaluable tool. A computer program provided tha summary in the following table of the sample means of the rows, the columns, and the six cells. Each cell mean is the average for \(18\) people.

\[\begin{array}{lcccc}\hline 
\hline \mbox{Type of Array} & 1 & 2 & 3 & \mbox{Row Mean}\\ 
\hline \mbox{Down} & 23.806 & 10.694 & 6.278\\
\mbox{Across} & 26.056 & 6.750 & 12.250\\
\mbox{Column mean} & 24.931 & 8.72 & 5.111 &\\ 
\hline\end{array}\]

Simply considering these means, we can see clearly that there is a column effect. It is not surprising that it is easier to add one-digit than three-digit numbers. The most interesting feature of these results is that they show the possibility of interaction. The largest cell mean occurs when adding one-digit numbers in an across array. However, for two- and three-digit numbers that down arrays have larger means than the across arrays. The computer program provided the following ANOVA table

\[\begin{array}{lccccc}
\hline \mbox{Source} & \mbox{Sum of Squares} & \mbox{Degrees of} & \mbox{Mean Square} & \mbox{\(F\)-Ratio} & \mbox{\(p\)-value}\\
& SS & \mbox{Freedom} & MS &\\ 
\hline \mbox{Factor \(A\) (array)} & 48.67 & 1 & 48.669 & 2.885 & 0.0925\\
\mbox{Factor \(B\) (number of digits)} & 8022.73 & 2 & 4011.363 & 237.778 &  <0.0001\\
\mbox{Factor \(AB\) (interaction)} & 185.92 & 2 & 92.961 & 5.510 & 0.0053\\
\mbox{Error} & 1720.76 & 102 & 17.879 &&\\
\mbox{Total} & 9978.08 & 107 &&&\\ 
\hline\end{array}\]

The right column, obtained from the computer printout, provides the \(p\)-value of each test, namely the probability of obtaining an \(F\) as large as or larger than the calculated \(F\)-ratio. Note, for example, that to test for interaction \(F=5.51\) and the \(p\)-value is \(0.006\). Therefore, the hypothesis of no interaction would be rejected at the \(\alpha =0.05\) or \(\alpha =0.01\) significance level but not with \(\alpha =0.001\). \(\sharp\)

\begin{equation}{\label{c}}\tag{C}\mbox{}\end{equation}

Three-Factor ANOVA Model.

Three factors, \(A\), \(B\) and \(C\), are investigated at \(a\), \(b\) and \(c\) levels, respectively. The mean response for the treatment when factor \(A\) is at the \(i\)th level for \(i=1,\cdots ,a\), factor \(B\) is at \(j\)th level for \(j=1,\cdots ,b\) and factor \(C\) is at the \(k\)th level for \(k=1,\cdots ,c\) is denoted by \(\mu_{ijk}\). The number of cases for each treatment is assumed to be constant, denoted by \(n\). We assume \(n\geq 2\). The following notations will be used

\begin{align*} \mu_{ij\cdot} & =\frac{\sum_{k} \mu_{ijk}}{c}\\
\mu_{i\cdot k} & =\frac{\sum_{j} \mu_{ijk}}{b}\\
\mu_{\cdot jk} & =\frac{\sum_{i} \mu_{ijk}}{a}\\
\mu_{i\dot\cdot} & =\frac{\sum_{j}\sum_{k} \mu_{ijk}}{bc}\\
\mu_{\cdot j\cdot} & =\frac{\sum_{i}\sum_{k} \mu_{ijk}}{ac}\\
\mu_{\cdot\cdot k} & =\frac{\sum_{i}\sum_{j} \mu_{ijk}}{ab}\\
\mu_{\cdot\cdot\cdot} & =\frac{\sum_{i}\sum_{j}\sum_{k} \mu_{ijk}}{abc}.\end{align*}

(i) Main effects: The main effect of the \(i\)th level of factor \(A\) is defined by \(\alpha_{i}=\mu_{i\cdot\cdot}-\mu_{\cdot\cdot\cdot}\). The main effect of the \(j\)th level of factor \(B\) is defined by \(\beta_{j}=\mu_{\cdot j\cdot}-\mu_{\cdot\cdot\cdot}\). The main effect of the \(k\)th level of factor \(C\) is defined by \(\gamma_{k}=\mu_{\cdot\cdot k}-\mu_{\cdot\cdot\cdot}\). It can be shown

\[\sum_{i}\alpha_{i}=\sum_{j}\beta_{j}=\sum_{k}\gamma_{k}=0.\]

(ii) Two-factor interactions: We define the two-factor interaction between factor \(A\) at the \(i\)th level and factor \(B\) at the \(j\)th level, denoted by \((\alpha\beta )_{ij}\), as

\[(\alpha\beta )_{ij}=\mu_{ij\cdot}-\mu_{i\cdot\cdot}-\mu_{\cdot j\cdot}+\mu_{\cdot\cdot\cdot}.\]

Similarly, we defined the \(AC\) and \(BC\) two-factor interactions as

\[(\alpha\gamma )_{ik}=\mu_{i\cdot k}-\mu_{i\cdot\cdot}-\mu_{\cdot\cdot k}+\mu_{\cdot\cdot\cdot}\]

and

\[(\beta\gamma )_{jk}=\mu_{\cdot jk}-\mu_{\cdot j\cdot}-\mu_{\cdot\cdot k}+\mu_{\cdot\cdot\cdot}.\]

It also can be shown

\begin{align*}
& \sum_{i} (\alpha\beta )_{ij}=0\mbox{ for all }j\\ & \sum_{j} (\alpha\beta )_{ij}=0\mbox{ for all }i\\ & \sum_{i} (\alpha\gamma )_{ik}=0\mbox{ for all }k\\ & \sum_{k} (\alpha\gamma )_{ik}=0\mbox{ for all }i\\ & \sum_{j} (\beta\gamma )_{jk}=0\mbox{ for all }k\\ & \sum_{k} (\beta\gamma )_{jk}=0\mbox{ for all }j\end{align*}

The factor interactions \((\alpha\beta )_{ij}\), \((\alpha\gamma )_{ik}\) and \((\beta\gamma )_{jk}\) are often called first-order interactions.

(iii) Three-factor interactions: Just as in a two-factor study, where the interaction between the \(i\)th level of factor \(A\) and the \(j\)th level of factor \(B\) is defined as the difference between the treatment mean \(\mu_{ij}\) and the value that would be expected if the factor effects were additive. The three factor interaction \((\alpha\beta\gamma )_{ijk}\) is defined as the difference between the treatment mean \(\mu_{ijk}\) and the value that would be expected if main effects and first-order interactions were sufficient to account for all factor effects. The value that would be expected from main effects and the first-order interactions when \(A\) is at \(i\)th level, \(B\) at \(j\)th level and \(C\) at \(k\)th level is

\[\mu_{\cdot\cdot\cdot}+\alpha_{i}+\beta_{j}+\gamma_{k}+(\alpha\beta )_{ij}+ (\alpha\gamma )_{ik}+(\beta\gamma )_{jk}.\]

Therefore, the three-factor interaction \((\alpha\beta\gamma )_{ijk}\), also called the second-order interaction is defined as

\[(\alpha\beta\gamma )_{ijk}=\mu_{ijk}-[\mu_{\cdot\cdot\cdot}+\alpha_{i}+\beta_{j}+\gamma_{k}+(\alpha\beta )_{ij}+(\alpha\gamma )_{ik}+(\beta\gamma )_{jk}]\]

or equivalently

\[(\alpha\beta\gamma )_{ijk}=\mu_{ijk}-\mu_{ij\cdot}-\mu_{i\cdot k}-\mu_{\cdot jk}+\mu_{i\cdot\cdot}+\mu_{\cdot j\cdot}+\mu_{\cdot\cdot k}-\mu_{\cdot\cdot\cdot}.\]

It can be shown

\begin{align*} & \sum_{i} (\alpha\beta\gamma )_{ijk}=0\mbox{ for all }j,k\\ & \sum_{j} (\alpha\beta\gamma )_{ijk}=0\mbox{ for all }i,k\\ & \sum{k} (\alpha\beta\gamma )_{ijk}=0\mbox{ for all }i,j.\end{align*}

The ANOVA model for three-factor is given by

\[Y_{ijkm}=\mu_{ijk}+\varepsilon_{ijkm}\]

for \(i=1,\cdots ,a\), \(j=1,\cdots ,b\), \(k=1,\cdots ,c\) and \(m=1,\cdots ,n\).

  • \(\mu_{ijk}\) are parameters.
  • \(\varepsilon_{ijkm}\) are independent \(N(0,\sigma^{2})\).

The following notations will be used.

\begin{align*}
Y_{ijk\cdot} & =\sum_{m} Y_{ijkm}\mbox{ with }\bar{Y}_{ijk\cdot}=\frac{Y_{ijk\cdot}}{n}\\
Y_{ij\cdot\cdot} & =\sum_{k}\sum_{m} Y_{ijkm}\mbox{ with }\bar{Y}_{ij\cdot\cdot}=\frac{Y_{ij\cdot\cdot}}{cn}\\
Y_{i\cdot k\cdot} & =\sum_{j}\sum_{m} Y_{ijkm}\mbox{ with }\bar{Y}_{i\cdot k\cdot}=\frac{Y_{i\cdot k\cdot}}{bn}\\
Y_{\cdot jk\cdot} & =\sum_{i}\sum_{m} Y_{ijkm}\mbox{ with }\bar{Y}_{\cdot jk\cdot}=\frac{Y_{\cdot jk\cdot}}{an}\\ Y_{i\cdot\cdot\cdot} & =\sum_{j}\sum_{k}\sum_{m} Y_{ijkm}
\mbox{ with }\bar{Y}_{i\cdot\cdot\cdot}=\frac{Y_{i\cdot\cdot\cdot}}{bcn}\\
Y_{\cdot j\cdot\cdot} & =\sum_{i}\sum_{k}\sum_{m} Y_{ijkm}\mbox{ with }\bar{Y}_{\cdot j\cdot\cdot}=\frac{Y_{\cdot j\cdot\cdot}}{acn}\\
Y_{\cdot\cdot k\cdot} & =\sum_{j}\sum_{j}\sum_{m} Y_{ijkm}\mbox{ with }\bar{Y}_{\cdot\cdot k\cdot}=\frac{Y_{\cdot\cdot k\cdot}}{abn}\\
Y_{\cdot\cdot\cdot\cdot} & =\sum_{i}\sum_{j}\sum_{k}\sum_{m}Y_{ijkm}\mbox{ with }\bar{Y}_{\cdot\cdot\cdot\cdot}=\frac {Y_{\cdot\cdot\cdot\cdot}}{abcn}
\end{align*}

When the ANOVA model is fitted by the method of least squares, the estimators as usual turn out to be the estimated treatment means \(\hat{\mu}_{ijk}=\bar{Y}_{ijk\cdot}\). Therefore, the fitted values for the observations are the estimated treatment means

\[\hat{Y}_{ijkm}=\hat{\mu}_{ijk}=\bar{Y}_{ijk\cdot}.\]

The residuals are the deviations of the observed values from the estimated treatment means

\[e_{ijkm}=Y_{ijkm}-\hat{Y}_{ijkm}=Y_{ijkm}-\hat{Y}_{ijk\cdot}.\]

Let

\begin{align*}
SSTO & =\sum\sum\sum\sum (Y_{ijkm}-\bar{Y}_{\cdot\cdot\cdot\cdot})^{2}\\ SSTR & =n\sum\sum\sum (\bar{Y}_{ijk\cdot}-\bar{Y}_{\cdot\cdot\cdot\cdot})^{2}\\ SSE & =\sum\sum\sum\sum e_{ijkm}^{2}=\sum\sum\sum\sum (Y_{ijkm}-\bar{Y}_{ijk\cdot})^{2}
\end{align*}

Then, we have

\[SSTO=SSTR+SSE.\]

The \(SSTR\) can be decomposed in terms of the main effects, two-factor interactions and three-factor interaction. We have

\begin{align*}
\bar{Y}_{ijk\cdot}-\bar{Y}_{\cdot\cdot\cdot\cdot} & =\underbrace
{\bar{Y}_{i\cdot\cdot\cdot}-\bar{Y}_{\cdot\cdot\cdot\cdot}}_{\scriptsize A\mbox{ main effect}}+\underbrace{\bar{Y}_{\cdot j\cdot\cdot}-
\bar{Y}_{\cdot\cdot\cdot\cdot}}_{\scriptsize B\mbox{ main effect}}+\underbrace
{\bar{Y}_{\cdot\cdot k\cdot}-\bar{Y}_{\cdot\cdot\cdot\cdot}}_{\scriptsize C\mbox{ main effect}}\\ & +\underbrace{\bar{Y}_{ij\cdot\cdot}-\bar{Y}_{i\cdot\cdot\cdot}- \bar{Y}_{\cdot j\cdot\cdot}+\bar{Y}_{\cdot\cdot\cdot\cdot}}_{\scriptsize AB\mbox{ interaction effect}}+\underbrace{\bar{Y}_{i\cdot k\cdot}-\bar{Y}_{i\cdot\cdot\cdot}-
\bar{Y}_{\cdot\cdot k\cdot}+\bar{Y}_{\cdot\cdot\cdot\cdot}}_{\scriptsize AC\mbox{ interaction effect}}+ \underbrace{\bar{Y}_{\cdot jk\cdot}-\bar{Y}_{\cdot j\cdot\cdot}- \bar{Y}_{\cdot\cdot k\cdot}+\bar{Y}_{\cdot\cdot\cdot\cdot}}_{\scriptsize BC\mbox{ interaction effect}}\\
& +\underbrace{\bar{Y}_{ijk\cdot}-\bar{Y}_{ij\cdot\cdot}-\bar{Y}_{i\cdot k\cdot}-\bar{Y}_{\cdot jk\cdot}+\bar{Y}_{i\cdot\cdot\cdot}+
\bar{Y}_{\cdot j\cdot\cdot}+\bar{Y}_{\cdot\cdot k\cdot}+\bar{Y}_{\cdot\cdot\cdot\cdot}}_{\scriptsize ABC\mbox{ interaction effect}}
\end{align*}

When we square each side and sum over \(i,j,k\) and \(m\), all cross-product terms are drop out and we obtain

\[SSTR=SSA+SSB+SSC+SSAB+SSAC+SSBC+SSABC\]

where

\begin{align*} SSA & =nbc\sum (\bar{Y}_{i\cdot\cdot\cdot}-\bar{Y}_{\cdot\cdot\cdot\cdot})^{2}\\
SSB & =nac\sum (\bar{Y}_{\cdot j\cdot\cdot}-\bar{Y}_{\cdot\cdot\cdot\cdot})^{2}\\
SSC & =nab\sum (\bar{Y}_{\cdot\cdot k\cdot}-\bar{Y}_{\cdot\cdot\cdot\cdot})^{2}\\
SSAB & =nc\sum\sum (\bar{Y}_{ij\cdot\cdot}-\bar{Y}_{i\cdot\cdot\cdot}-\bar{Y}_{\cdot j\cdot\cdot}+\bar{Y}_{\cdot\cdot\cdot\cdot})^{2}\\
SSAC & =nb\sum\sum (\bar{Y}_{i\cdot k\cdot}-\bar{Y}_{i\cdot\cdot\cdot}-\bar{Y}_{\cdot\cdot k\cdot}+\bar{Y}_{\cdot\cdot\cdot\cdot})^{2}\\
SSBC & =na\sum\sum (\bar{Y}_{\cdot jk\cdot}-\bar{Y}_{\cdot j\cdot\cdot}-\bar{Y}_{\cdot\cdot k\cdot}+\bar{Y}_{\cdot\cdot\cdot\cdot})^{2}\\
SSABC & =n\sum\sum\sum (\bar{Y}_{ijk\cdot}-\bar{Y}_{ij\cdot\cdot}-\bar{Y}_{i\cdot k\cdot}-\bar{Y}_{\cdot jk\cdot}+\bar{Y}_{i\cdot\cdot\cdot}+\bar{Y}_{\cdot j\cdot\cdot}+\bar{Y}_{\cdot\cdot k\cdot}+\bar{Y}_{\cdot\cdot\cdot\cdot})^{2}\end{align*}

Then, we have

\[SSTO=SSA+SSB+SSC+SSAB+SSAC+SSBC+SSABC+SSE.\]

Now, we consider the equivalent computational formulas

\begin{align*} SSTO & =\sum\sum\sum\sum Y_{ijkm}^{2}-\frac{Y_{\cdot\cdot\cdot\cdot}^{2}}{nabc}\\
SSE & =\sum\sum\sum\sum Y_{ijkm}^{2}-\sum\sum\sum\frac{Y_{ijk\cdot}^{2}}{n}\\
SSA & =\frac{\sum Y_{i\cdot\cdot\cdot}^{2}}{nbc}-\frac{Y_{\cdot\cdot\cdot\cdot}^{2}}{nabc}\\
SSB & =\frac{\sum Y_{\cdot j\cdot\cdot}^{2}}{nac}-\frac{Y_{\cdot\cdot\cdot\cdot}^{2}}{nabc}\\
SSC & =\frac{\sum Y_{\cdot\cdot k\cdot}^{2}}{nab}-\frac{Y_{\cdot\cdot\cdot\cdot}^{2}}{nabc}\end{align*}

We define \(SSTR(A,B)\) by

\begin{align*} SSTR(A,B) & =nc\sum\sum (\bar{Y}_{ij\cdot\cdot}- \bar{Y}_{\cdot\cdot\cdot\cdot})^{2}\\ & =\frac{\sum\sum Y_{ij\cdot\cdot}^{2}}{nc}-
\frac{Y_{\cdot\cdot\cdot\cdot}^{2}}{nabc}\end{align*}

It can be shown

\[SSTR(A,B)=SSA+SSB+SSAB.\]

Therefore, we can find \(SSAB\) by subtraction

\[SSAB=SSTR(A,B)-SSA-SSB.\]

Similarly, we find \(SSAC\) and \(SSBC\) by

\[SSAC=SSTR(A,C)-SSA-SSC\]

and

\[SSBC=SSTR(B,C)-SSB-SSC.\]

where

\begin{align*} SSTR(A,C) & =\frac{\sum\sum Y_{i\cdot k\cdot}^{2}}{nb}-\frac{Y_{\cdot\cdot\cdot\cdot}^{2}}{nabc}\\
SSTR(B,C) & =\frac{\sum\sum Y_{\cdot jk\cdot}^{2}}{na}-\frac{Y_{\cdot\cdot\cdot\cdot}^{2}}{nabc}\end{align*}

The three-factor interaction sum of squares is obtained by subtraction

\[SSABC=SSTO-SSE-SSA-SSB-SSC-SSAB-SSAC-SSBC.\]

Now, we have the following ANOVA table for three-factor model

\[\begin{array}{lcccc}\hline 
\mbox{Source of Variation} & SS & df & MS & MS\\ \hline \mbox{Between Treatments} & SSTR & abc-1 & MSTR & {\displaystyle \sigma^{2}+
\frac{n\sum\sum\sum (\mu_{ijk}-\mu_{\cdot\cdot\cdot})^{2}}{abc-1}}\\ \hline \mbox{Factor \(A\)}
& SSA & a-1 & MSA & {\displaystyle \sigma^{2}+\frac{bcn}{a-1}\sum \alpha_{i}^{2}}\\
\mbox{Factor \(B\)} & SSB & b-1 & MSB & {\displaystyle \sigma^{2}+\frac{acn}{b-1}\sum \beta_{j}^{2}}\\
\mbox{Factor \(C\)} & SSC & c-1 & MSC & {\displaystyle \sigma^{2}+\frac{abn}{c-1}\sum \gamma_{k}^{2}}\\
\mbox{$AB$ interactions} & SSAB & (a-1)(b-1) & MSAB & {\displaystyle \sigma^{2}+\frac{cn}{(a-1)(b-1)}\sum\sum (\alpha\beta )_{ij}^{2}}\\ \mbox{\(AC\) interactions} & SSAC & $(a-1)(c-1) & MSAC & {\displaystyle \sigma^{2}+\frac{bn}{(a-1)(c-1)}\sum\sum (\alpha\gamma )_{ik}^{2}}\\
\mbox{$BC$ interactions} & SSBC & (b-1)(c-1) & MSAB & {\displaystyle \sigma^{2}+\frac{an}{(b-1)(c-1)}\sum\sum (\beta\gamma )_{jk}^{2}}\\ \mbox{\(ABC\) interactions} & SSABC & (a-1)(b-1)(c-1) & MSABC & {\displaystyle \sigma^{2}+\frac{n}{(a-1)(b-1)(c-1)}\sum\sum\sum (\alpha\beta\gamma )_{ijk}^{2}}\\ \hline \mbox{Error} & SSE & (n-1)abc
& MSE & \sigma^{2}\\ \hline \mbox{Total} & SSTO & abcn-1 &&\\ \hline\end{array}\]

Next we are going to consider the testing for factor effects. For the three-factor interaction case, we consider the following testing hypotheses

\[\begin{array}{l}
H_{0}:\mbox{all }(\alpha\beta\gamma )_{ijk}=0\\ H_{a}:\mbox{not all }(\alpha\beta\gamma )_{ijk}\mbox{ equal zero}
\end{array}\]

The test statistic is \(F^{*}=\frac{MSABC}{MSE}\). If \(H_{0}\) holds, then \(F^{*}\) is distributed as \(F_{(a-1)(b-1)(c-1),(n-1)abc}\). Therefore, the decision rule for Type I error at \(\alpha\) is given by

\[\begin{array}{l}
\mbox{If }F^{*}\leq F_{1-\alpha ;(a-1)(b-1)(c-1),(n-1)abc},\mbox{ we conclude }H_{0}\\ \mbox{If }F^{*}>F_{1-\alpha ;(a-1)(b-1)(c-1),(n-1)abc},\mbox{ we conclude }H_{a}
\end{array}\]

The following table contains the test statistics and percentiles of the \(F\) distribution for the various possible tests for a three-factor model.

\[\begin{array}{lcc}\hline
\mbox{Testing Hypotheses} & \mbox{Test Statistic} & \mbox{Percentile}\\
\hline \begin{array}{l}H_{0}:\mbox{all \(\alpha_{i}=0\)}\\ H_{a}:\mbox{not all \(\alpha_{i}=0\)}
\end{array} & {\displaystyle F^{*}=\frac{MSA}{MSE}} & F_{1-\alpha ;a-1,(n-1)abc}\\ \hline \begin{array}{l} H_{0}:\mbox{all \(\beta_{j}=0\)}\\ H_{a}:\mbox{not all \(\beta_{j}=0\)} \end{array} & {\displaystyle F^{*}=\frac{MSB}{MSE}} & F_{1-\alpha ;b-1,(n-1)abc}\\
\hline \begin{array}{l}H_{0}:\mbox{all \(\gamma_{k}=0\)}\\ H_{a}:\mbox{not all \(\gamma_{k}=0\)}
\end{array} & {\displaystyle F^{*}=\frac{MSC}{MSE}} & F_{1-\alpha ;c-1,(n-1)abc}\\ \hline \begin{array}{l} H_{0}:\mbox{all \((\alpha\beta ){ij}=0\)}\\ H{a}:\mbox{not all \((\alpha\beta ){ij}=0\)} \end{array} & {\displaystyle F^{*}=\frac{MSAB}{MSE}} & F{1-\alpha ;(a-1)(b-1),(n-1)abc}\\
\hline \begin{array}{l} H_{0}:\mbox{all \((\alpha\gamma )_{ik}=0\)}\\ H_{a}:\mbox{not all \((\alpha\gamma ){ik}=0\)} \end{array} &  {\displaystyle F^{*}=\frac{MSAC}{MSE}} & F{1-\alpha ;(a-1)(c-1),(n-1)abc}\\
\hline \begin{array}{l}H_{0}:\mbox{all \((\beta\gamma )_{jk}=0\)}\\ H_{a}:\mbox{not all \((\beta\gamma ){jk}=0\)} \end{array} &  {\displaystyle F^{*}=\frac{MSBC}{MSE}} & F_{1-\alpha ;(b-1)(c-1),(n-1)abc}\\
\hline \begin{array}{l}H_{0}:\mbox{all \((\alpha\beta\gamma )_{ijk}=0\)}\\ H_{a}:\mbox{not all \((\alpha\beta\gamma )_{ijk}=0\)} \end{array} & {\displaystyle F^{*}=\frac{MSABC}{MSE}} & F_{1-\alpha ;(a-1)(b-1)(c-1),(n-1)abc}\\
\hline\end{array}\]

Example. The following table illustrates a study of the effects of gender, body fat, and smoking history on exercise tolerence in stress testing of persons \(25\) to \(35\) years old. Each of the three factors has two levels, and there are three replications for each treatment. We consider the following three tables

(a) Data for Smoking History:

\[\begin{array}{ccc}\hline
 & \mbox{\(k=1\)(Light)} & \mbox{\(k=2\)(Heavy)}\\ \hline
\mbox{\(j=1\)(Low Fat):} & &\\
\hspace{3mm}\mbox{$i=1$(Male)} & 24(Y_{1111}) & 18(Y_{1121})\\
& 29(Y_{1112}) & 19(Y_{1122})\\
& 25(Y_{1113}) & 23(Y_{1123})\\
\hspace{3mm}\mbox{$i=2$(Female)} & 20(Y_{2111}) & 15(Y_{2121})\\
& 22(Y_{2112}) & 10(Y_{2122})\\
& 18(Y_{2113}) & 11(Y_{2123})\\
\mbox{\(j=2\)(High Fat):} & &\\ \hline
\hspace{3mm}\mbox{$i=1$(Male)} & 15(Y_{1211}) & 15(Y_{1221})\\
& 15(Y_{1212}) & 20(Y_{1222})\\
& 12(Y_{1213}) & 13(Y_{1223})\\
\hspace{3mm}\mbox{$i=2$(Female)} & 16(Y_{2211}) & 10(Y_{2221})\\
& 9(Y_{2212}) & 14(Y_{2222})\\
& 11(Y_{2213}) &  6(Y_{2223})\\ \hline\end{array}\]

(b) Table for Totals

\[\begin{array}{cccc}\hline
& k=1 & k=2 & \mbox{All \(k\)}\\ \hline
j=1: &&&\\
\hspace{3mm}i=1 & 78(Y_{111\cdot}) & 60(Y_{112\cdot}) & 138(Y_{11\cdot\cdot})\\ \hspace{3mm}i=2 & 60(Y_{211\cdot}) & 36(Y_{212\cdot}) &
96(Y_{21\cdot\cdot})\\ \hspace{3mm}\mbox{All \(i\)} & 138(Y_{\cdot 11\cdot}) & 96(Y_{\cdot 12\cdot}) & 234(Y_{\cdot 1\cdot\cdot})\\ \hline j=2: &&&\\ \hspace{3mm}i=1 & 42(Y_{121\cdot}) & 48(Y_{122\cdot}) &
90(Y_{12\cdot\cdot})\\ \hspace{3mm}i=2 & 36(Y_{221\cdot}) & 30(Y_{222\cdot}) &
66(Y_{22\cdot\cdot})\\ \hspace{3mm}\mbox{All \(i\)} & 78(Y_{\cdot 21\cdot}) & 78(Y_{\cdot 22\cdot}) & 156(Y_{\cdot 2\cdot\cdot})\\ \hline\mbox{All \(j\):} &&&\\ \hspace{3mm}i=1 & 120(Y_{1\cdot 1\cdot}) & 108(Y_{1\cdot 2\cdot}) & 228(Y_{1\cdot\cdot\cdot})\\ \hspace{3mm}i=2 & 96(Y_{2\cdot 1\cdot}) & 66(Y_{2\cdot 2\cdot}) & 162(Y_{2\cdot\cdot\cdot})\\ \hline\hspace{3mm}\mbox{All \(i\)} & 216(Y_{\cdot\cdot 1\cdot}) &
174(Y_{\cdot\cdot 2\cdot}) & 390(Y_{\cdot\cdot\cdot\cdot})\\
\hline\end{array}\]

(c) Table for Means

\[\begin{array}{cccc}\hline
& k=1 & k=2 & \mbox{All \(k\)}\\ \hline
j=1: &&&\\
\hspace{3mm}i=1 & 26(Y_{111\cdot}) & 20(Y_{112\cdot}) & 23(Y_{11\cdot\cdot})\\ \hspace{3mm}i=2 & 20(Y_{211\cdot}) & 12(Y_{212\cdot}) &
16(Y_{21\cdot\cdot})\\ \hspace{3mm}\mbox{All \(i\)} & 23(Y_{\cdot 11\cdot}) & 16(Y_{\cdot 12\cdot}) & 19.5(Y_{\cdot 1\cdot\cdot})\\ \hline j=2: &&&\\ \hspace{3mm}i=1 & 14(Y_{121\cdot}) & 16(Y_{122\cdot}) & 15(Y_{12\cdot\cdot})\\ \hspace{3mm}i=2 & 12(Y_{221\cdot}) & 10(Y_{222\cdot}) &
11(Y_{22\cdot\cdot})\\ \hspace{3mm}\mbox{All \(i\)} & 13(Y_{\cdot 21\cdot}) & 13(Y_{\cdot 22\cdot}) & 13(Y_{\cdot 2\cdot\cdot})\\ \hline\mbox{All \(j\):} &&&\\ \hspace{3mm}i=1 & 20(Y_{1\cdot 1\cdot}) & 18(Y_{1\cdot 2\cdot}) & 19(Y_{1\cdot\cdot\cdot})\\ \hspace{3mm}i=2 & 16(Y_{2\cdot 1\cdot}) & 11(Y_{2\cdot 2\cdot}) & 13.5(Y_{2\cdot\cdot\cdot})\\ \hline\hspace{3mm}\mbox{All \(i\)} & 18(Y_{\cdot\cdot 1\cdot}) &
14.5(Y_{\cdot\cdot 2\cdot}) & 16.25(Y_{\cdot\cdot\cdot\cdot})\\
\hline\end{array}\]

Then, we have the following ANOVA table

\[\begin{array}{lcccc}\hline
\hline \mbox{Source of Variation} & SS & df & MS & F^{*}\\
\hline \mbox{Between Treatment} & 610.5 & 7 & 87.21 & \\
\hline \mbox{Factor \(A\) (gender)} & 181.5 & 1 & 181.5 & 20.74\\
\mbox{Factor \(B\) (body fat)} & 253.5 & 1 & 253.5 & 28.97\\
\mbox{Factor \(C\) (smoking)} & 73.5 & 1 & 73.5 & 8.4\\
\mbox{$AB$ interactions} & 13.5 & 1 & 13.5 & 1.54\\
\mbox{$AC$ interactions} & 13.5 & 1 & 13.5 & 1.54\\
\mbox{$BC$ interactions} & 73.5 & 1 & 73.5 & 8.4\\
\mbox{$ABC$ interactions} & 1.5 & 1 & 1.5 & 0.17\\
\hline \mbox{Error} & 140 & 16 & 8.75 &\\
\hline \mbox{Total} & 750.5 & 23 &&\\
\hline F_{0.985;1,16}=7.42 &&&&\\
\hline\end{array}\]

(i) Test for three-factor interactions: The testing hypotheses is

\[\begin{array}{l}
H_{0}:\mbox{all }(\alpha\beta\gamma )_{ijk}\\ H_{a}:\mbox{not all }(\alpha\beta\gamma )_{ijk}\mbox{ equal zero}
\end{array}\]

The decision rule is

\[\begin{array}{l}
\mbox{If }F^{*}\leq F_{0.985;1,16}=7.42,\mbox{ we conclude }H_{0}\\ \mbox{If }F^{*}>F_{0.985;1,16}=7.42,\mbox{ we conclude }H_{a}
\end{array}\]

The \(F^{*}\) test statistic obtained from Table 10 is

\[F^{*}=\frac{MSABC}{MSE}=\frac{1.5}{8.75}=0.17<7.42.\]

We conclude that no \(ABC\) interactions are present.

(ii) Test for two-factor interactions: In the test for \(AB\) interactions. The testing hypotheses is

\[\begin{array}{l}
H_{0}:\mbox{all }(\alpha\beta )_{ij}\\ H_{a}:\mbox{not all }(\alpha\beta )_{ij}\mbox{ equal zero}
\end{array}\]

The decision rule is

\[\begin{array}{l}
\mbox{If }F^{*}\leq F_{0.985;1,16}=7.42,\mbox{ we conclude }H_{0}\\ \mbox{If }F^{*}>F_{0.985;1,16}=7.42,\mbox{ we conclude }H_{a}
\end{array}\]

The \(F^{*}\) test statistic obtained from Table 10 is

\[F^{*}=\frac{MSAB}{MSE}=\frac{13.5}{8.75}=1.54<7.42\]

We conclude that no \(AB\) interactions are present. Similarly, the test for \(AC\) and \(BC\) interactions, we obtain

\[F^{*}=\frac{MSAC}{MSE}=\frac{13.5}{8.75}=1.54<7.42\]

and

\[F^{*}=\frac{MSBC}{MSE}=\frac{73.5}{8.75}=8.4>7.42.\]

We conclude that no \(AC\) interactions are present and some \(BC\) interactions are present.

(iii) Test for main effects: Since factor \(A\) (gender) did not interact with the other two factors, attention next turn to testing for factor \(A\) main effects. In testing for factor \(A\) main effects, the testing hypotheses is

\[\begin{array}{l}
H_{0}:\mbox{all }\alpha_{i}\\ H_{a}:\mbox{not all }\alpha_{i}\mbox{ equal zero}
\end{array}\]

The decision rule is

\[\begin{array}{l}
\mbox{If }F^{*}\leq F_{0.985;1,16}=7.42,\mbox{ we conclude }H_{0}\\ \mbox{If }F^{*}>F_{0.985;1,16}=7.42,\mbox{ we conclude }H_{a}
\end{array}\]

The \(F^{*}\) test statistic obtained from Table 10 is

\[F^{*}=\frac{MSA}{MSE}=\frac{181.5}{8.75}=20.74>7.42.\]

We conclude that factor \(A\) main effects are present. The factor \(B\) and \(C\) main effects are not tested at this point because \(BC\) interactions were found to be present. The researcher first wishes to study the nature of the \(BC\) interaction effects before determining whether the factor \(B\) and factor \(C\) main effects are of practical interest under the circumstances. \(\sharp\)

 

Hsien-Chung Wu
Hsien-Chung Wu
文章: 183

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *