4.3 Two-way analysis of variance
When the observations are classified by two factors, rows and columns, with one observation in each cell, the total sum of squares splits into three parts: \[SS_T = SS_R + SS_C + SSE .\]
| Source of Variation | df | SS | MS | F |
| Between rows | \(r-1\) | \(SS_R\) | \(MS_R=\frac {SS_R}{r-1}\) | \(F_R=\frac {MS_R}{MSE}\) |
| Between columns | \(c-1\) | \(SS_C\) | \(MS_C=\frac {SS_C}{c-1}\) | \(F_C=\frac {MS_C}{MSE}\) |
| Error | \((r-1)(c-1)\) | \(SSE\) | \(MSE=\frac {SSE}{(r-1)(c-1)}\) | |
| Total | \(rc-1\) | \(SS_T\) | ||
The error degrees of freedom are what is left: \((rc-1)-(r-1)-(c-1) = (r-1)(c-1)\).
Example 4.4. The yields below come from three varieties of maize, each grown with four types of fertiliser. Do the data provide evidence at \(\alpha = 1\%\) of a difference (a) between the varieties and (b) between the fertilisers?
| Variety | ||||
| Fertiliser | \(v_1\) | \(v_2\) | \(v_3\) | Total |
| \(f_1\) | 17 | 25 | 25 | 67 |
| \(f_2\) | 8 | 10 | 0 | 18 |
| \(f_3\) | 12 | 19 | 11 | 42 |
| \(f_4\) | 11 | 10 | 6 | 27 |
| Total | 48 | 64 | 42 | 154 |
Solution. Here the rows are the \(r = 4\) fertilisers and the columns the \(c = 3\) varieties, so \(N = rc = 12\) and \(g = 154\). (Note that the first row totals \(17 + 25 + 25 = 67\).)
- 1.
- Correction factor: \(cf = \frac {g^2}{rc} = \frac {154^2}{12} = 1976.33\).
- 2.
- Total: \(SS_T = \sum \sum x_{ij}^2 - cf = 2586 - 1976.33 = 609.67\).
- 3.
- Columns (varieties): \(SS_C = \frac {1}{r}\sum C_j^2 - cf = \frac {48^2 + 64^2 + 42^2}{4} - 1976.33 = 64.67\).
- 4.
- Rows (fertilisers): \(SS_R = \frac {1}{c}\sum R_i^2 - cf = \frac {67^2 + 18^2 + 42^2 + 27^2}{3} - 1976.33 = 459.00\).
- 5.
- Error: \(SSE = 609.67 - 459.00 - 64.67 = 86.00\).
| Source of Variation | df | SS | MS | F |
| Fertilisers (rows) | 3 | 459.00 | 153.00 | 10.67 |
| Varieties (columns) | 2 | 64.67 | 32.33 | 2.26 |
| Error | 6 | 86.00 | 14.33 | |
| Total | 11 | 609.67 | ||
At \(\alpha = 1\%\) the critical values are \(F_{0.01,\,3,\,6} = 9.78\) for rows and \(F_{0.01,\,2,\,6} = 10.92\) for columns.
- (a)
- Varieties: \(F_C = 2.26<10.92\), so there is no evidence of a difference between the varieties.
- (b)
- Fertilisers: \(F_R = 10.67>9.78\), so we reject \(H_0\): the fertilisers differ, \(f_1\) giving by far the highest yields and \(f_2\) the lowest.
The Least Significant Difference Test (LSD) The least significant difference uses the error mean square of the analysis of variance as its estimate of the common variance, with the error degrees of freedom (formula below). It is used only when \(H_0\) has been rejected.
| 1 | 2 | 3 | 4 | 5 | 6 | ||
| 1 | 1 | 3 | 6 | 4 | 3 | 2 | |
| 2 | 1 | 4 | 4 | 8 | 5 | 1 | |
| 3 | 3 | 6 | 7 | 8 | 4 | 3 | |
| 4 | 2 | 3 | 2 | 3 | 2 | 1 | |
| 7 | 16 | 19 | 23 | 14 | 7 | 81 | |
| Mean | 1.75 | 4.0 | 4.75 | 5.75 | 3.5 | 1.75 | |
| Total | |||||||
A significant \(F\) says only that the treatment means are not all equal. It does not say which ones differ.
The least significant difference compares them a pair at a time: \[LSD = t_{\alpha /2,\;df_{error}}\times \sqrt {MSE\left (\frac {1}{n_i}+\frac {1}{n_j}\right )}\] Any pair of means further apart than
the \(LSD\) is declared significantly different.
Example 4.5. Following an analysis of variance with \(MSE=1.57\) on \(6\) degrees of freedom and four treatment
means each based on \(n=4\) observations, the differences from \(v_1\) are \[v_2-v_1=2.25,\qquad v_3-v_1=3.00,\qquad v_4-v_1=4.00\] Which treatments differ from \(v_1\) at
the \(5\%\) level?
Solution. From tables \(t_{0.025,\,6}=2.447\), so \begin {align*} LSD &= 2.447\times \sqrt {1.57\left (\frac {1}{4}+\frac {1}{4}\right )}\\[1ex] &= 2.447\times \sqrt {0.785}\\[1ex] &= 2.447\times 0.886 = 2.168 \end {align*}
Comparing each difference against \(2.168\):
- \(v_2-v_1=2.25>2.168\), so \(v_1\) and \(v_2\) differ significantly.
- \(v_3-v_1=3.00>2.168\), so \(v_1\) and \(v_3\) differ significantly.
- \(v_4-v_1=4.00>2.168\), so \(v_1\) and \(v_4\) differ significantly.
All three exceed the \(LSD\), so \(v_1\) differs from each of the others. Note that \(v_2-v_1\) only just clears the bar, at \(2.25\) against
\(2.168\); a conclusion resting on that small a margin should be reported as such rather than stated
flatly.
4.3.1 Design of Experiments
| A | B | D | C |
| D | A | C | D |
| C | D | A | B |
Randomised Block design
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.