Past exam of the mathematics course of the University of Cambridge 2008 ii Paper 1 13J Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 4 5I Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2011 ii Paper 1 13J Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 37 1 b Solution Created 2026-10-03 Updated 2026-10-07
The regression residual vector is , where is the hat matrix. Both and are symmetric idempotent matrices, and . Therefore and the linear image of a multivariate normal vector givesThis multivariate normal distribution is singular, with rank : fitted-residual orthogonality forces . Specifically, and for distinct observations. Thus regression residuals are generally neither independent nor identically distributed, even though the model errors are. Also and is independent of , which justifies the standard errors and exact Student t-tests below.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 37 1 c Solution Created 2026-10-03 Updated 2026-10-07
In an R formula,
I(...) protects ordinary arithmetic from the formula operators: the predictor is the numerical variable , rather than an instruction to remove a formula term. Predictor centering leaves fitted values and the height slope unchanged but places the intercept at a meaningful height. It often reduces the correlation between intercept and slope estimates.With , treatment contrasts use female as the reference level in a regression factor. The fitted normal linear model isThe estimates and their standard errors areThe intercept estimates female mean weight at height 165. At that same height the male fitted mean is . Holding height fixed, the fitted male mean exceeds the female mean by 4.3294 weight units. Within either sex, one additional height unit increases fitted mean weight by 0.6211 weight units. If height is in centimetres and weight in kilograms, these interpretations use centimetres and kilograms accordingly. A standard error for the male intercept would require the covariance between and , which is not printed.
The prediction equation is . Predictions for individual students also have residual uncertainty, estimated by , beyond uncertainty in the fitted mean.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 37 2 Solution Created 2026-10-03 Updated 2026-10-07
A regression factor is a categorical predictor represented by level indicators and contrasts. Treating year as a regression factor permits arbitrary differences between the three yearly means, reflecting conditions such as weather, rather than imposing a linear time trend.
Let be the yield for seed variety , fertiliser level , and year . A treatment-coded two-factor normal linear model with additive year effects iswith independent errors. The unrestricted coefficients are : six parameters for twelve observations. Equivalently use baseline-zero variety, fertiliser, and interaction arrays. There are no year-treatment interactions in this fit.
Dividing each sum of squares by its statistical degrees of freedom gives the completed analysis of variance:In particular, the missing interaction statistic is . Its null hypothesis is , against : the change in mean yield from high fertiliser is the same for both varieties. Under the null hypothesis and the independent homoscedastic normal linear model, this nested-model F-test has distribution . The printed -value 0.001137 strongly rejects no interaction.
Do not drop fertiliser just because its main-effect ANOVA row has . In this balanced factorial design that row measures a fertiliser effect averaged over varieties; large opposite effects can cancel. The strongly supported interaction requires retaining its associated main effects by regression model hierarchy. Seed and year also have evidence of effects in their ANOVA rows, so this table alone gives no compelling simplification of the fitted terms.
The interaction contrast is , with standard error 0.7946. The fitted high-minus-low fertiliser effect is for variety 1 but for variety 2. The fitted variety-2-minus-variety-1 contrast is under low fertiliser and under high fertiliser. Thus variety 2 performs best under low fertiliser, while high fertiliser benefits variety 1 and reduces variety 2's fitted yield. The marginal fertiliser effect is only .
The four fitted means in the baseline year are for respectively. Add in 2005 and in 2006 to every fitted mean. The 2005 coefficient has under a test of a zero contrast with 2004; the analogous 2006 contrast has . The latter is lack of evidence for a difference, not proof that the yearly means coincide. Standard errors for the combined contrasts require the coefficient covariance matrix. The experiment is small: residual standard error is 0.6882 on only six statistical degrees of freedom. If the same fields were reused, possible within-field dependence and field allocation would need checking before treating the fitted error independence as established.