4.1 Contrasts

Definition 4.1.1. A contrast in the treatment means is a linear combination \[ C = \sum _{i=1}^tc_i\mu _i \qquad \text {with}\qquad \sum _{i=1}^tc_i = 0 . \]

Because \(\sum c_i = 0\), \(C = \sum c_i(\mu + \tau _i) = \sum c_i\tau _i\): a contrast is free of \(\mu \), is estimable, and by Corollary 3.2.4 has the same estimate under every parametrisation, \[ \hat C = \sum _{i=1}^tc_i\bar y_{i\cdot } , \qquad \Var (\hat C) = \sigma ^2\sum _{i=1}^t\frac {c_i^2}{n_i} . \] The difference \(\mu _1 - \mu _2\) is the contrast with \(c = (1, -1, 0, \dots , 0)\); the comparison of the average of treatments \(1\) and \(2\) with the average of treatments \(3\), \(4\) and \(5\) is the contrast with \(c = (\frac 12, \frac 12, -\frac 13, -\frac 13, -\frac 13)\).

Since \(\hat C\) is normal and independent of \(MSE\), \[ t_0 = \frac {\hat C - C}{\sqrt {MSE\sum c_i^2/n_i}} \sim t_{N-t} , \] which gives a test of \(H_0 : C = 0\) and the \(100(1 - \alpha )\%\) confidence interval \[ \hat C \pm t_{\alpha /2,\,N-t}\sqrt {MSE\sum _{i=1}^t\frac {c_i^2}{n_i}} . \] The test can equally be put in analysis-of-variance form. The contrast sum of squares is \[ SS_C = \frac {\hat C^2}{\sum _{i=1}^tc_i^2/n_i} , \] which in a balanced design is \[ SS_C = \frac {\bigl (\sum _{i=1}^tc_iy_{i\cdot }\bigr )^2}{r\sum _{i=1}^tc_i^2} , \] with one degree of freedom, and \(F_0 = SS_C/MSE = t_0^2\) under \(H_0\). Multiplying all the \(c_i\) by a constant changes \(\hat C\) but not \(SS_C\), so integer coefficients may be used for the test.

Theorem 4.1.2. \(SS_C/\sigma ^2 \sim \chi ^2_1(\lambda )\) with \(\lambda = C^2/(\sigma ^2\sum c_i^2/n_i)\), independently of \(SSE\); and \(SS_C \le SS_{\mathrm {Treatments}}\).

Proof. Let \(\mathbf a\) be the vector with entry \(c_i/n_i\) in each position belonging to treatment \(i\). Then \(\mathbf a^\top \mathbf Y = \sum c_i\bar y_{i\cdot } = \hat C\) and \(\|\mathbf a\|^2 = \sum c_i^2/n_i\), so \(SS_C = (\mathbf a^\top \mathbf Y)^2/\|\mathbf a\|^2 = \mathbf Y^\top P_{\mathbf a}\mathbf Y\), where \(P_{\mathbf a} = \mathbf a\mathbf a^\top /\|\mathbf a\|^2\) is the projection onto the line through \(\mathbf a\). The vector \(\mathbf a\) is constant within treatments, so it lies in the treatment space; and \(\mathbf 1^\top \mathbf a = \sum c_i = 0\), so it is orthogonal to \(\mathbf 1\). Hence \(\mathbf a\) lies in the column space of \(H - H_0\), and \(P_{\mathbf a}(H - H_0) = P_{\mathbf a}\), \(P_{\mathbf a}(I - H) = 0\). Theorem 3.1.4 gives the distribution and the independence from \(SSE\), and \(SS_{\mathrm {Treatments}} - SS_C = \mathbf Y^\top (H - H_0 - P_{\mathbf a})\mathbf Y \ge 0\) because \(H - H_0 - P_{\mathbf a}\) is again a projection. □

Example 4.1.3. For the coating data, compare coating types \(1\) and \(2\) with the other three. With integer coefficients \(c = (3, 3, -2, -2, -2)\) and the totals \(331\), \(308\), \(287\), \(260\), \(251\), \begin {gather*} \sum c_iy_{i\cdot } = 3(331 + 308) - 2(287 + 260 + 251) = 321 , \\ SS_C = \frac {321^2}{4(9 + 9 + 4 + 4 + 4)} = 858.68 , \end {gather*} and \(F_0 = 858.68/8.15 = 105.4 > F_{0.05,1,15} = 4.54\). Coatings \(1\) and \(2\) differ from the rest; this single contrast accounts for \(858.68/1100.30 = 78\%\) of the treatment sum of squares. On the scale of means, \(c = (\frac 12, \frac 12, -\frac 13, -\frac 13, -\frac 13)\) gives \(\hat C = 79.875 - 66.500 = 13.375\) with standard error \(\sqrt {8.15(\frac 14 + \frac 14 + \frac 19 + \frac 19 + \frac 19)/4} = 1.303\), and the \(95\%\) interval \(13.375 \pm 2.131(1.303) = (10.60,\ 16.15)\).

Questions on this section

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