Past exam of the mathematics course of the University of Cambridge 2007 ii Paper 1 13I Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2007 ii Paper 1 5I Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2009 ib Paper 1 7H Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 3 5I Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2011 ii Paper 4 5J 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 a Solution Created 2026-10-03 Updated 2026-10-07
Use the normal linear model , with fixed full-column-rank design matrix , independent errors , and . Its log-likelihood isFor fixed , differentiating with respect to gives . Since is positive-definite, the unique least-squares estimate isLet . The variance score equation is , givingThis is the maximum-likelihood estimator, whereas the residual standard error reported by linear-regression software is . The latter uses the unbiased residual estimate of Gaussian noise variance. These formulas assume and positive RSS; exact interpolation gives a variance-boundary degeneracy rather than an interior maximum.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 30 1 a Solution Created 2026-10-03 Updated 2026-10-07
Use the normal linear modelHere is the response random vector, is the known design matrix, contains the unknown regression coefficients, and is the common error variance. Conditional on , the errors have normal distributions and are independent random variables. Require for identifiability of and invertibility of . Usually is needed to estimate the error variance from the regression residuals. An intercept, when included, is represented by a column of ones in .
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 30 1 f Solution Created 2026-10-03 Updated 2026-10-07
A natural next fit is quadratic regression, which remains a normal linear model in its unknown regression coefficients:The new design matrix has rows and must have matrix rank three; three distinct predictor values suffice. The curved regression residual pattern suggests trying a positive quadratic term, but its sign and adequacy should be checked after fitting. Inspect the new regression residuals to see whether the systematic curvature has disappeared.
Past exam of the mathematics course of the University of Cambridge 2014 ib Paper 4 19H Solution Created 2026-09-24 Updated 2026-10-06
For the normal linear model, differentiating the ordinary least squares objective gives . Full column rank makes invertible, soThe distribution follows because is a linear transformation of a multivariate normal distribution. Its expectation is , and direct multiplication gives the displayed covariance matrix.
Let , the orthogonal projection onto the design's column space. The residual sum of squares is . Since , symmetry and idempotence give . Thusis an unbiased estimator.
For the two independent regressions choose . The first rows of the design matrix are and the last rows are . The centering conditions and distinct predictors giveIt follows thatThe two estimated slopes are independent normal random variables, as they depend on independent error blocks. ThereforeFor these data use the pooled residual sum of squaresIts scaled value is and is independent of the slope estimates by the permitted normal-model result. Hence the standardized difference has a Student t-distribution with degrees of freedom, giving the exact 95 percent confidence intervalHere is the 0.975 quantile of that distribution. This is a confidence interval for the difference of independent regression slopes. As required by the original framework, this specialization needs . Distinct predictors alone allow , but then the fit is saturated, and there are no residual degrees of freedom to estimate the unknown variance or form this interval.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 33 1 Solution Created 2026-10-03 Updated 2026-10-06
For the normal linear model, the log-likelihood isThe full column rank of the design matrix makes invertible. Differentiating in gives the normal equations . With the minimized residual sum of squares substituted, differentiation in givesThese are the maximum-likelihood estimators almost surely; almost surely when and . The linear transformation of the multivariate normal distribution yieldsDefine the hat matrix . The fitted values are , the regression residuals are , and . The orthogonal projection has rank and annihilates . By Cochran's theorem,Consequently , with bias . The unbiased estimator isIts square root, the reported residual standard error, estimates ; the assertion of unbiasedness applies to the variance, not generally to its square root.
For the paper-strength analysis, let be the measured percentage and . Both normal linear models use independent errors of common variance . Their mean functions are for
lm1, and for lm2, with separately fitted coefficients. The reported residual standard errors are and , respectively.For
lm1, the estimated conditional expectation at a new percentage isThe original data mean must be used for centering the new percentage; its numerical value is not supplied in the excerpt. Because , the two columns of this design matrix are orthogonal, and . Hence the coefficient standard errors in the output giveThis estimates uncertainty in the mean. Predicting an individual future batch would additionally require the new-error variance, estimated by .To compare the nested normal linear models, test against within the quadratic model. The Student t-test statistic isIts two-sided p-value is . Equivalently is a partial F-test statistic with null distribution . Reject the linear restriction and prefer
lm2 at the 5% level. Its residual spread is much smaller; the increase in the coefficient of determination from to supports the same conclusion, although the test is the relevant complexity-adjusted comparison.For regression diagnostics, inspect regression residuals against fitted means and hardwood percentage for omitted curvature, a scale-location plot for nonconstant variance, and a quantile-quantile plot against the normal distribution for departures from the error assumption. Check unusual observations using regression leverage and Cook's distance, and examine residuals in collection or batch order if dependence is plausible. Independence and a common variance require substantive justification as well as these plots; a small p-value for a polynomial term does not itself check the error model.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 33 3 b Solution Created 2026-10-03 Updated 2026-10-06
A generalized linear model specifies independent responses in an exponential dispersion family, their means , and a link function connecting those means to a linear predictor. In the common notation,where are known positive weights, is the common dispersion parameter, and is the variance function. The systematic part isHere is a row of the known design matrix and contains the unknown regression coefficients. The link function is invertible on the permitted mean domain; the canonical link function takes the mean to the natural parameter. This separates distributional, predictor, and link assumptions: it does not require the response itself to be normally distributed or the mean itself to be linear in the covariates.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 33 1 Solution Created 2026-10-03 Updated 2026-10-06
The ordinary least squares objective has gradient . The normal equation therefore givesThe Gram matrix is a positive-definite matrix because has full column rank. More explicitly, for any ,since . This proves that the displayed solution is the unique global minimum.
The fitted values are , where the hat matrix isThe inverse of the symmetric matrix is symmetric, so . Multiplication gives . Thus is the orthogonal projection onto the column space of the design matrix.
The regression residual vector is with . Consequently , , and the residual sum of squares isBy fitted-residual orthogonality, . Using , the cross-covariance matrix isBoth vectors are jointly normal, so they are also independent by independence of uncorrelated jointly normal variables. The zero covariance calculation itself only needs the common error variance and lack of error correlations.
For the first wind fit, let be wind velocity and electrical output. The simple linear regression is , with independent . It has two fitted mean parameters and residual degrees of freedom. The missing analysis of variance entries are therefore velocity degrees of freedom , velocity mean square , and residual degrees of freedom . The residual mean square is , and , consistent with the printed value after rounding.
Because the model includes a regression intercept, the coefficient of determination is the explained sum of squares divided by the total centered sum of squares:A large coefficient of determination does not rule out a wrong mean function. In the PDF's first residual-versus-fitted plot, residuals are negative at both ends and positive in the middle. This curved pattern agrees with the visibly flattening output-versus-velocity relationship and motivates a polynomial regression with a quadratic term.
The second wind model is , again with independent common-variance normal errors. Its fitted mean is . The line marked (A) is a two-sided Student t-test of against , conditional on retaining the intercept and linear term. Under the null hypothesis,Its two-sided p-value is . This is far below , so reject a purely linear mean in favour of the quadratic fit. Equivalently, the extra-term nested-model F-test has and null law .
The third fit is a reciprocal-predictor regression, , with estimated mean . It has two mean parameters rather than the quadratic model's three. Its residual standard error is smaller, versus , and its coefficient of determination is larger, versus . The corresponding residual sums of squares are approximately and . The reciprocal fit is preferable on both these fit measures and parsimony. The two models are not nested, so an ordinary extra-term F-test between them is inappropriate. On the common normal-error likelihood, the difference also favours the third model.
Neither lower residual sum of squares nor a higher coefficient of determination establishes adequate assumptions. The quadratic residual-versus-fitted plot removes the original pronounced curvature; the reciprocal plot also has no comparably obvious mean trend. The low-output residuals appear somewhat more spread out, so check scale-location plots and residuals against velocity for heteroscedasticity. Q-Q plots assess normality; residuals against observation order assess serial dependence; regression leverage and Cook's distance identify influential observations. Further cross-validation, replicate observations at comparable velocities, and prediction errors would help choose between their extrapolation behaviours. Both fitted shapes should be judged principally over the observed positive-velocity range.