3.9 Practice problems
Problem 3.9.1. Sixteen animals were randomised to four food rations, four animals to each. After a period of individual feeding on the diet, the animals were sacrificed and organ damage was measured; higher values indicate greater damage.
| \(1\) | \(2\) | \(3\) | \(4\) | |
| \(7.2\) | \(4.5\) | \(9.7\) | \(7.1\) | |
| \(6.8\) | \(6.0\) | \(8.4\) | \(6.1\) | |
| \(6.0\) | \(4.6\) | \(8.8\) | \(7.2\) | |
| \(6.3\) | \(6.3\) | \(9.9\) | \(6.4\) | |
| total | \(26.3\) | \(21.4\) | \(36.8\) | \(26.8\) |
The grand total is \(111.3\) and \(\sum \sum y_{ij}^2 = 811.39\). The rations are: \(1\), vegetable fat, large proportion; \(2\), vegetable fat, small proportion; \(3\), animal fat, large proportion; \(4\), animal fat, small proportion.
- (a)
- Write down a model for the data, explain all the terms and state the assumptions.
- (b)
- Estimate all the parameters in your model.
- (c)
- Construct the ANOVA table and test whether the mean organ damage is the same for the four rations, at \(\alpha = 0.05\).
Show solution
Solution. (a) \(y_{ij} = \mu + \tau _i + \varepsilon _{ij}\), \(i = 1, \dots , 4\), \(j = 1, \dots , 4\), where \(y_{ij}\) is the organ damage of the \(j\)th animal on ration \(i\), \(\mu \) the overall mean, \(\tau _i\) the fixed effect of ration \(i\) with \(\sum \tau _i = 0\), and \(\varepsilon _{ij}\) the random error; the errors are independent \(N(0, \sigma ^2)\) with a common variance.
(b) The ration means are \(6.575\), \(5.350\), \(9.200\) and \(6.700\), and \(\bar y_{\cdot \cdot } = 111.3/16 = 6.95625\). So \(\hat \mu = 6.956\) and \[ \hat \tau _1 = -0.381 , \quad \hat \tau _2 = -1.606 , \quad \hat \tau _3 = 2.244 , \quad \hat \tau _4 = -0.256 . \] \(\hat \sigma ^2 = MSE\) is found in (c).
(c) The correction factor is \(111.3^2/16 = 774.2306\), so \(SST = 811.39 - 774.2306 = 37.1594\), \begin {align*} SS_{\mathrm {Rations}} &= \frac {26.3^2 + 21.4^2 + 36.8^2 + 26.8^2}{4} - 774.2306 \\ &= 805.5325 - 774.2306 = 31.3019 , \end {align*}
and \(SSE = 5.8575\).
| source | SS | df | MS | \(F_0\) |
| rations | \(31.3019\) | \(3\) | \(10.4340\) | \(21.38\) |
| error | \(5.8575\) | \(12\) | \(0.4881\) | |
| total | \(37.1594\) | \(15\) |
\(F_0 = 21.38 > F_{0.05,3,12} = 3.49\) (\(p = 4 \times 10^{-5}\)), so the mean organ damage differs among the rations, and \(\hat \sigma ^2 = 0.488\). Which rations differ, and whether it is the type or the proportion of fat that matters, are questions about contrasts, taken up in a later section.
Problem 3.9.2. In the effects model with \(t = 3\) treatments and \(n_i = 2\) observations each, find \(X^\top X\) and its rank. Find the solution of the normal equations under the side condition \(\hat \tau _3 = 0\), and verify that it gives the same estimate of \(\tau _1 - \tau _2\) as the side condition \(\sum \hat \tau _i = 0\). Is \(\tau _1 + \tau _2\) estimable?
Show solution
Solution. With \(X\) as in the text, \[ X^\top X = \begin {pmatrix} 6 & 2 & 2 & 2 \\ 2 & 2 & 0 & 0 \\ 2 & 0 & 2 & 0 \\ 2 & 0 & 0 & 2 \end {pmatrix} , \] whose first column is the sum of the other three, so the rank is \(3\). The normal equations give \(\hat \mu + \hat \tau _i = \bar y_{i\cdot }\). With \(\hat \tau _3 = 0\): \(\hat \mu = \bar y_{3\cdot }\), \(\hat \tau _1 = \bar y_{1\cdot } - \bar y_{3\cdot }\) and \(\hat \tau _2 = \bar y_{2\cdot } - \bar y_{3\cdot }\), so \(\hat \tau _1 - \hat \tau _2 = \bar y_{1\cdot } - \bar y_{2\cdot }\). With \(\sum \hat \tau _i = 0\): \(\hat \tau _i = \bar y_{i\cdot } - \bar y_{\cdot \cdot }\), and again \(\hat \tau _1 - \hat \tau _2 = \bar y_{1\cdot } - \bar y_{2\cdot }\), as Corollary 3.2.4 requires.
\(\tau _1 + \tau _2\) is not estimable: its coefficients \((1, 1)\) do not sum to zero, and it is not of the form \(\sum a_i(\mu + \tau _i)\), since that would need \(\sum a_i = 0\) (no \(\mu \)) with \(a_1 = a_2 = 1\) and \(a_3 = 0\). Indeed the two side conditions give different values, \(\bar y_{1\cdot } + \bar y_{2\cdot } - 2\bar y_{3\cdot }\) and \(\bar y_{1\cdot } + \bar y_{2\cdot } - 2\bar y_{\cdot \cdot }\).
Problem 3.9.3. Show that \(SS_{\mathrm {Treatments}} = \sum _iy_{i\cdot }^2/n_i - y_{\cdot \cdot }^2/N\), and deduce the computing formula for \(SSE\).
Show solution
Solution. Expanding, \begin {align*} \sum _in_i(\bar y_{i\cdot } - \bar y_{\cdot \cdot })^2 &= \sum _in_i\bar y_{i\cdot }^2 - 2\bar y_{\cdot \cdot }\sum _in_i\bar y_{i\cdot } + N\bar y_{\cdot \cdot }^2 \\ &= \sum _i\frac {y_{i\cdot }^2}{n_i} - 2\bar y_{\cdot \cdot }y_{\cdot \cdot } + \frac {y_{\cdot \cdot }^2}{N} , \end {align*}
and \(\bar y_{\cdot \cdot }y_{\cdot \cdot } = y_{\cdot \cdot }^2/N\), which gives the formula. The same expansion gives \(SST = \sum \sum y_{ij}^2 - y_{\cdot \cdot }^2/N\), and subtracting, \(SSE = \sum \sum y_{ij}^2 - \sum _iy_{i\cdot }^2/n_i\).
Problem 3.9.4. Let \(A\) be a symmetric idempotent matrix. Show that its eigenvalues are \(0\) or \(1\) and that \(\operatorname {rank}(A) = \operatorname {tr}(A)\). Use this and Lemma 3.1.2 to show that \(E(SS_{\mathrm {Treatments}}) = (t - 1)\sigma ^2 + \sum n_i(\tau _i - \bar \tau )^2\) without the term-by-term calculation of Theorem 3.3.2.
Show solution
Solution. If \(A\mathbf v = \lambda \mathbf v\) with \(\mathbf v \ne \mathbf 0\), then \(\lambda \mathbf v = A\mathbf v = A^2\mathbf v = \lambda ^2\mathbf v\), so \(\lambda ^2 = \lambda \) and \(\lambda \in \{0, 1\}\). A symmetric matrix is diagonalisable, so its rank is the number of non-zero eigenvalues, which here is the number of eigenvalues equal to \(1\), which is their sum, the trace.
By Lemma 3.1.2 with \(A = H - H_0\), \(\Sigma = \sigma ^2I\) and \(\boldsymbol \mu \) the vector of means, \begin {align*} E(SS_{\mathrm {Treatments}}) &= \sigma ^2\operatorname {tr}(H - H_0) + \boldsymbol \mu ^\top (H - H_0)\boldsymbol \mu \\ &= (t - 1)\sigma ^2 + \sum _in_i(\mu _i - \bar \mu )^2 , \end {align*}
since \(\operatorname {tr}(H) = t\), \(\operatorname {tr}(H_0) = 1\), and \((H - H_0)\boldsymbol \mu \) has entries \(\mu _i - \bar \mu = \tau _i - \bar \tau \).
Problem 3.9.5. For the coating data, suppose the true coating effects were equal to the estimates in Example 3.4.1 and \(\sigma ^2 = 8.15\). Find the non-centrality parameter of \(F_0\), and explain why the test rejected \(H_0\) so decisively.
Show solution
Solution. \(\lambda = \sum n_i\tau _i^2/\sigma ^2 = 4(10.90^2 + 5.15^2 + 0.10^2 + 6.85^2 + 9.10^2)/8.15 = 1100.3/8.15 = 135.0\). Under \(H_1\), \(E(MS_{\mathrm {Treatments}}) = \sigma ^2(1 + \lambda /4) \approx 34.8\sigma ^2\), so \(F_0\) is expected to be about \(35\), far beyond the critical value \(3.06\). The coating means differ by up to \(20\) units while the error standard deviation is under \(3\); with such large effects even four replicates give overwhelming evidence.
Problem 3.9.6. For the rations data of Problem 3.9.1, the sample variances of the four rations are \(0.2825\), \(0.8700\), \(0.5133\) and \(0.2867\). Use Bartlett’s test to check the assumption of equal variances at \(\alpha = 0.05\).
Show solution
Solution. Here \(S_p^2 = MSE = 0.4881\), \(N - t = 12\) and \(n_i - 1 = 3\). Then \begin {align*} q &= 12\log _{10}0.4881 \\ &\quad - 3\bigl (\log _{10}0.2825 + \log _{10}0.8700 + \log _{10}0.5133 + \log _{10}0.2867\bigr ) \\ &= 0.5874 , \end {align*}
\(c = 1 + \frac 19\bigl (\frac 43 - \frac {1}{12}\bigr ) = 1.1389\), and \(\chi _0^2 = 2.3026(0.5874)/1.1389 = 1.188 < \chi ^2_{0.05,3} = 7.81\) (\(p = 0.76\)). There is no evidence against equal variances, although with four observations per ration the test has little power: variances differing by a factor of three are not unusual in samples this small.
Problem 3.9.7. Let \(\hat p\) be the proportion of successes in \(m\) independent trials with success probability \(p\). Use the delta method to show that \(\Var \bigl (\arcsin \sqrt {\hat p}\bigr ) \approx 1/(4m)\).
Show solution
Solution. With \(g(p) = \arcsin \sqrt p\), \[ g'(p) = \frac {1}{\sqrt {1 - p}}\cdot \frac {1}{2\sqrt p} = \frac {1}{2\sqrt {p(1 - p)}} . \] Since \(\Var (\hat p) = p(1 - p)/m\), the delta method gives \(\Var \bigl (g(\hat p)\bigr ) \approx \dfrac {1}{4p(1 - p)}\cdot \dfrac {p(1 - p)}{m} = \dfrac {1}{4m}\), free of \(p\).
Problem 3.9.8. Four treatments gave means \(10\), \(20\), \(40\) and \(80\) with standard deviations \(2.1\), \(3.9\), \(8.2\) and \(15.8\). Which transformation would you use before the analysis of variance?
Show solution
Solution. The ratio \(s_i/\bar y_{i\cdot }\) is about \(0.2\) for every treatment, so \(\sigma \propto \mu \) and \(\alpha = 1\). (Equivalently, the slope of \(\log s_i\) on \(\log \bar y_{i\cdot }\) is close to \(1\): each doubling of the mean doubles the standard deviation.) The logarithm is indicated, and the analysis of \(\log y\) compares treatments by the ratios of their typical responses.
Problem 3.9.9. A response was measured twice at each of five equally spaced levels \(x = 1, 2, 3, 4, 5\):
| \(x\) | \(1\) | \(2\) | \(3\) | \(4\) | \(5\) |
| \(y\) | \(3.1\), \(3.5\) | \(4.6\), \(4.2\) | \(5.4\), \(5.8\) | \(6.3\), \(6.9\) | \(7.6\), \(7.4\) |
Fit a straight line and test it for lack of fit at \(\alpha = 0.05\).
Show solution
Solution. The level means are \(3.3\), \(4.4\), \(5.6\), \(6.6\) and \(7.5\), and \(SST = 22.976\), \(SS_{\mathrm {Treatments}} = 22.536\), so \(SS_{\mathrm {PE}} = 0.440\) on \(10 - 5 = 5\) degrees of freedom. The least squares line is \(\hat y = 2.30 + 1.06x\), with regression sum of squares \(22.472\), so \(SS_{\mathrm {Res}} = 0.504\) and \(SS_{\mathrm {LOF}} = 0.504 - 0.440 = 0.064\) on \(5 - 2 = 3\) degrees of freedom. Then \[ F_0 = \frac {0.064/3}{0.440/5} = 0.24 < F_{0.05,3,5} = 5.41 \qquad (p = 0.86) , \] so there is no evidence of lack of fit, and the straight line, whose slope is highly significant (\(F_0 = 22.472/(0.504/8) = 357\)), describes the data.
Problem 3.9.10. An experiment with \(t = 5\) treatments must detect a difference of \(1.5\sigma \) between any two treatment means with power at least \(0.80\) at \(\alpha = 0.05\). How many replicates are needed?
Show solution
Solution. The least favourable non-centrality is \(\lambda = r(1.5\sigma )^2/(2\sigma ^2) = 1.125r\), and the power is computed from the non-central \(F_{4,\,5(r-1)}(\lambda )\) distribution. It is \(0.773\) at \(r = 11\) (\(\lambda = 12.375\)) and \(0.817\) at \(r = 12\) (\(\lambda = 13.5\)), so \(12\) replicates per treatment, \(60\) runs in all, are needed.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.