3.8 Two-Factor Studies

The RBD is a one-factor study, the interest is on one factor the treatments. The blocks are used because of not having enough homogeneous experimental units.
Two-factors, where factor \(A\) has \(a-\)levels, factor \(B\) has \(b-\)levels.

Then we have \(ab\) treatments.

The Model

\[Y_{ijl}=\mu _{ij}+\varepsilon _{ijl},\quad \varepsilon _{ijl}\thicksim ^{iid}(0,\sigma ^2)\] \[i=1,2,\ldots ,a\quad j=1,2,\ldots ,b\quad l=1,2,\ldots ,n\] Total number of observations \(abn\)

\[\widehat {\mu }_{ij}=\overline {Y}_{ij}.\quad \sum ^a_{i=1}\sum ^b_{j=1}\sum ^n_{l=1}\big (Y_{ijl}-\mu _{ij}\big )^2\] \[\text {SSE} = \sum \sum \sum \big (Y_{ijl}-\overline {Y}_{ij}.\big )^2\]

  • \(df=ab(n-1)=\) total number of observations \(-\) parameters.
  • \(Y_{ijl}= l^{\text {th}}\) observation under \(i^{\text {th}}\) level of factor \(A\) and \(j^{\text {th}}\) level of factor \(B\).
  • \(\mu _{ij}=\) the expected mean of the treatment corresponding to the \(i^{\text {th}}\) level of factor \(A\) and \(j^{\text {th}}\) level of factor \(B\).
  • \(\overline {Y}_{ij}.=\frac {1}{n}\sum \limits ^n_{l=1}Y_{ijl}=\) sample mean for the \(i^{\text {th}}\) level of factor \(A\) and \(j^{\text {th}}\) level of factor \(B\).
  • \(\overline {Y}_i..=\frac {1}{nb}\sum \limits ^b_{j=1}\sum \limits ^n_{l=1}Y_{ijl}=\) Sample mean for the \(i^{\text {th}}\) level for factor \(A\).
  • \(\overline {Y}._j.=\frac {1}{na}\sum \limits ^a_{i=1}\sum \limits ^n_{l=1}Y_{ijl}= \) Sample mean for the \(j^{\text {th}}\) level of factor \(B\).
  • \(\overline {Y}...=\frac {1}{nab}\sum \limits ^a_{i=1}\sum \limits ^b_{j=1}\sum \limits ^n_{l=1}Y_{ijl}=\) Sample mean

Let \(\displaystyle {Q(Y)=\sum ^a_{i=1}\sum ^b_{j=1}\sum ^n_{l=1}\big (Y_{ijl}-\mu _{ij}\big )^2}\) the least squares estimators for \(\mu _{ij'}\)s are \(\overline {Y}_{ij'}\)s.

\[e_{ijl}=Y_{ijl}-\overline {Y}_{ij}.\]

  • \(\text {SST}=\displaystyle {\sum ^a_{i=1}\sum ^b_{j=1}\sum ^n_{l=1}\big (Y_{ijl}-\overline {Y}...\big )^2}\quad \) Corrected total sum of squares.
  • \(\text {SSTrt} = \displaystyle {n\sum ^a_{i=1}\sum ^b_{j=1}\big (\overline {Y}_{ij}.-\overline {Y}...\big )^2}\quad \) Treatment sum of squares.
  • \(\text {SSE} = \displaystyle {\sum ^a_{i=1} \sum ^b_{j=1} \sum ^n_{l=1} \big (Y_{ijl}-\overline {Y}_{ij}.\big )^2}\quad \) Error sum of squares.

\[\underbrace {\text {SST}}_{abn-1} = \underbrace {\text {SSTrt}}_{ab-1}+\underbrace {\text {SSE}}_{ab(n-1)}\] \[Y_{ijl}-\overline {Y}... = \overline {Y}_{ij}.-\overline {Y}...+Y_{ijl}-\overline {Y}_{ij}.\]

ANOVA Table
Source of SS df MS
Variation
Treatment SSTrt \(ab-1\) MSTrt \(=\frac {\text {SSTrt}}{ab-1}\)
Error SSE \(ab(n-1)\) MSE \(=\frac {\text {SSE}}{ab(n-1)}\)
Total SST \(abn-1\)

Under \(H_0:\) the means are all equal (all the treatments are the same) \[H_0:\mu _{11}=\mu _{12}=\mu _{21}=\cdots \mu _{ab}\] \[\frac {\text {MSTrt}}{\text {MSE}}\thicksim f_{ab-1,ab(n-1)}\]

Reject \(H_0\) if \(\displaystyle {\frac {\text {MSTrt}}{\text {MSE}}\geq f^{\alpha }_{ab-1,ab(n-1)}}\)

\[Y_{ijl} = \mu + \alpha _i +\beta _j + (\alpha \beta )_{ij} + \varepsilon _{ijl}\] \[\mu = \overline {Y}... \quad \alpha _i=\overline {Y}_i..-\overline {Y}... \quad \beta _j= \overline {Y}.j.-\overline {Y}...\quad (\alpha \beta )_{ij}= \underbrace {\overline {Y}_{ij}.-\overline {Y}_i..-\overline {Y}._j.-\overline {Y}...}_{\text {interaction}}\] \[\varepsilon _{ijl}=Y_{ijl}-\overline {Y}_{ij}.\] \[\text {SST} = \underbrace {\text {SSA} + \text {SSB} + SS(AB)}_{\text {SSTrt}}+ \text {SSE}\] \[Y_{ijl} = \mu _{il}+\varepsilon _{ijl},\quad \varepsilon _{ijl}\thicksim ^{iid}N(0,\sigma ^2)\] \[i=1,2,\ldots , a\qquad j=1,2,\ldots ,b\qquad l=1,2,\ldots , n\] \begin {align*} Y & = XB +\varepsilon \\ Y_{ab\times 1} & = \begin {pmatrix} Y_{111} & Y_{121} & Y_{122} & \cdots & Y_{abn}\\ \end {pmatrix}^t\\ \varepsilon _{ab\times 1} & = \begin {pmatrix} e_{111}& \cdots & \cdots & \\ \end {pmatrix}^t\\ B_{ab\times 1} & = \begin {pmatrix} \mu _{11} & \cdots & \mu _{ab}\\ \end {pmatrix}^t \end {align*}

\[\underbrace {X}_{abn\times ab}= \begin {pmatrix} \mu _{11} & \mu _{12} & \mu _{13} & \cdots & \mu _{ab}\\ 1_n & 0 & 0 & & 0\\ 0 & 1_n & 0 & & 0\\ 0 & 0 & 1_n &\cdots & 0\\ \vdots & \vdots & \vdots & &\vdots \\ 0 & 0 & 0 & \cdots & 1_n\\ \end {pmatrix} \] \[Y_{ijl}=\mu + \alpha _i + \beta _j + (\alpha \beta )_{ij} + \varepsilon _{ijl}\qquad i=1,2,\ldots ,a\] \[\sum \alpha _i=\sum \beta _j =\sum _i (\alpha \beta )_{ij}=\sum _j(\alpha \beta )_{ij}=0\]

Parameter Estimator
\(\mu \) \(\overline {Y}..\)
\(\alpha _i\) \(\overline {Y}_i..-\overline {Y}...\)
\(\beta _j\) \(\overline {Y}._j.-\overline {Y}...\)
\((\alpha \beta )_{ij}\) \(\overline {Y}_{ij}.-\overline {Y}_i..-\overline {Y}._j.+\overline {Y}...\)

\[Y_{ijl} -\overline {Y}... = \overline {Y}_i..-\overline {Y}...+\overline {Y}._j.-\overline {Y}...+\overline {Y}_{ij}.-\overline {Y}_i..-\overline {Y}._j.+\overline {Y}...+Y_{ijl}-\overline {Y}_{ij}.\quad *\]

squaring both sides of \(*\) and summing we get

\[SST = \underbrace {SSA + SSB + SS(AB)}_{SSTrt}+SSE\] \begin {align*} SSTrt & = n\sum ^a_{i=1}\sum ^b_{j=1}\big (\overline {Y}_{ij}.-\overline {Y}...\big )^2\\ & = \underbrace {bn\sum ^a_{i=1}\big (\overline {Y}_i..-\overline {Y}...\big )^2}_{SSA}+\underbrace {an\sum ^b_{j=1}\big (\overline {Y}.j.-\overline {Y}...\big )^2}_{SSB}+ \underbrace {n\sum ^a_{i=1}\sum ^b_{j=1}\big (\overline {Y}_{ij}.-\overline {Y}_i..-\overline {Y}._j.+\overline {Y}...\big )^2}_{SS(AB)} \end {align*}

ANOVA TABLE
Source of SS df MS F
Variation
Factor \(A\) \(SSA\) \(a-1\) \(MSA = \frac {SSA}{a-1}\) \(\frac {MSA}{MSE}\thicksim f_{a-1,ab(n-1)}\)
\(H_0:\alpha _i=0, i=1,2,\cdots ,a\)
Factor \(B\) \(SSB\) \(b-1\) \(MSB=\frac {SSB}{b-1}\) \(\frac {MSB}{MSE}\thicksim f_{b-1,ab(n-1)}\)
\(H_0:\beta _j=0, j=1,2,\cdots ,b\)
Interaction \(SS(AB)\) \((a-1)(b-1)\) \(MS(AB)=\frac {SS(AB)}{(a-1)(b-1)}\) \(\frac {MS(AB)}{MSE}\thicksim f_{(a-1)(b-1),ab(n-1)}\)
\(H_0:(\alpha \beta )_{ij}=0, i=1,2,\cdots ,a\)
of \(A\) and \(B\) \(j=1,2,\cdots ,b\)
Error \(SSE\) \(ab(n-1)\) \(MSE=\frac {SSE}{ab(n-1)}\)
Total \(SST\) \(abn-1\)
Computation Formula

\(\displaystyle {Y_{i}...=\sum ^b_{j=1}\sum ^n_{l=1}Y_{ijl}\qquad Y...=\sum ^a_{i=1}\sum ^b_{j=1}\sum ^n_{l=1}Y_{ijl}}\)

\(SSA = \displaystyle {bn\sum ^a_{i=1}\big (\overline {Y}_i..-\overline {Y}...\big )^2=\sum ^a_{i=1}\frac {Y^2_{i}..}{bn}-\frac {Y^2...}{abn}}\)

\(SSB = \displaystyle {an\sum ^b_{j=1}\big (\overline {Y}._j.-\overline {Y}...\big )^2=\frac {\sum ^b_{j=1}Y^2._j.}{an}-\frac {Y^2...}{abn}}\)

\(SST = \displaystyle {\sum ^a\sum ^b\sum ^n\big (Y_{ijl}-\overline {Y}...\big )^2=\sum \sum \sum Y^2_{ijl}-\frac {Y^2...}{abn}}\)

\(SSE=\displaystyle {\sum \sum \sum \big (Y_{ijl}-\overline {Y}_{ij}.\big )^2=\sum \sum \sum Y^2_{ijl}-\frac {\sum \sum Y^2_{ij}.}{n}}\)

\[SS(AB)=SST-SS(A)-SS(B)-SSE\]

Example 3.8.1. AGOGO Bakery supplies sliced bread to a number of supermarkets in LUSAKA. A study was done on the effects of heights of shelf display (Bottom, Middle, Top) and the width of the shelf display (Regular, Wide) on sales of AGOGO’s bread (measured in cases) during the experimental period. Two supermarkets, similar in terms of sales value and clientele, where utilised in the assigned at random to each of the six treatments sales of the AGOGO’s bread were received and the results are given below.

FACTOR \((B)\) Display Width
FACTOR \((A)\)
Display Height
Regular (1)
Wide (2)
Bottom (1)
47 \(Y_{111}\) 46 \(Y_{121}\)
43 \(Y_{112}\) 40 \(Y_{122}\)
45 \(=\overline {Y}_{11}.\) 43 \( =\overline {Y}_{12}.\)
Middle (2)
62 \(Y_{211}\) 67 \(Y_{221}\)
68 \(Y_{212}\) 71 \(Y_{222}\)
65 \(=\overline {Y}_{21}.\) 69 \(=\overline {Y}_{22}.\)
Top (3)
41 \(Y_{311}\) 42 \(Y_{321}\)
39 \(Y_{312}\) 46 \(Y_{322}\)
40 \(=\overline {Y}_{31}.\) 44 \(=\overline {Y}_{32}.\)

\begin {align*} Y_{ijl} & = \mu _{ij} + \varepsilon _{ijl}\\ i & = 1,2,3\\ j & = 1,2\\ l & = 1,2 \end {align*}

\begin {align*} B & = \begin {pmatrix} \mu _{11} & \mu _{12} & \mu _{13} & \mu _{21} & \mu _{22} & \mu _{32}\\ \end {pmatrix}^t\\ & = \begin {pmatrix} \mu _{11} & \mu _{12} & \mu _{21} & \mu _{22} & \mu _{31} & \mu _{32}\\ \end {pmatrix}^t\\ & = \begin {pmatrix} \mu _{11} & \mu _{21} & \mu _{31} & \mu _{12} & \mu _{22} & \mu _{32}\\ \end {pmatrix}^t \end {align*}

\[Y= \begin {pmatrix} Y_{111}\\ Y_{112}\\ \hline Y_{121}\\ Y_{122}\\ \hline Y_{311}\\ Y_{312}\\ \hline \vdots \end {pmatrix} \qquad X= \begin {pmatrix} 1_2 & 0 & 0 & 0 & 0 & 0\\ 0 & 1_2\\ 0 & 0 \\ 0 & 0\\ 0 & 0\\ 0 & 0\\ \end {pmatrix} \]

\(12\times 6\) \(\qquad X\) is full column rank matrix, so \(\big (X^tX\big )^{-1}\) exists.

We can construct simultaneous confidence intervals for the six treatment.

Source SS df MS F
Display Height 1,544 2 772 74.95 \(f^{0.05}_{2,6}=5.14\)
Display Width 12 1 12 1.165 \(f^{0.05}_{1,6}=5.99\)
Interaction 24 2 12 1.165 \(f^{0.05}_{2,6}=5.14\)
Error Residual 62 6 10.3
Total 1,642 11

The Two-Factor Model

Sometimes referred to a randomised block design with replication. The main disadvantage of the two factor model is that it is not suitable for large number of treatments due to the difficulty of finding enough homogeneous can be overcome by using a design known as Randomised incomplete block design (RIBD).
This allows investigation of differences among \(k-\) treatments using \(b\) blocks containing \((v)\) experimental units when \((v)<k\).

In a Balanced (RIBD) each treatments appears equal number of times say \(r\), then \(bv=kr\) each pair of treatments to appear same number of times together in a block.

Example 3.8.2.

1.
Six treatments with ten blocks of size 3.

\(B_1\) \(B_2\) \(B_3\) \(B_4\) \(B_5\) \(B_6\) \(B_7\) \(B_8\) \(B_9\) \(B_{10}\)
\(T_4\) \(T_4\) \(T_4\) \(T_4\) \(T_4\) \(T_2\) \(T_2\) \(T_2\) \(T_3\) \(T_3\)
\(T_2\) \(T_2\) \(T_3\) \(T_1\) \(T_5\) \(T_3\) \(T_1\) \(T_5\) \(T_1\) \(T_1\)
\(T_3\) \(T_1\) \(T_5\) \(T_6\) \(T_6\) \(T_6\) \(T_5\) \(T_6\) \(T_5\) \(T_6\)

\begin {align*} bv & = kr\\ 10 \times 3 & = 6r \implies r=5 \end {align*}

If we let \(\lambda =\) the number of times a pair of treatments occurs in blocks then \[\lambda = \frac {bv(v-1)}{k(k-1)}\]

2.
Seven treatments with 7 blocks of size 4

\(B_1\) \(B_2\) \(B_3\) \(B_4\) \(B_5\) \(B_5\) \(B_6\) \(B_7\)
\(T_3\) \(T_1\) \(T_1\) \(T_1\) \(T_2\) \(T_2\) \(T_2\) \(T_2\)
\(T_7\) \(T_4\) \(T_2\) \(T_2\) \(T_3\) \(T_3\) \(T_3\) \(T_4\)
\(T_6\) \(T_6\) \(T_7\) \(T_3\) \(T_4\) \(T_4\) \(T_4\) \(T_5\)
\(T_5\) \(T_5\) \(T_5\) \(T_6\) \(T_5\) \(T_7\) \(T_7\) \(T_6\)

\[b=7,\qquad k=7,\qquad v=4\]

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.