Past exam of the mathematics course of the University of Cambridge 2010 ii Paper 4 5J Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 31 3 Solution Created 2026-10-03 Updated 2026-10-07
With the same squared-error normalization as in Question 2, the ridge estimator solvesThe unpenalized intercept in ridge regression is because the columns of are centered. Differentiating the remaining quadratic objective gives . Since , the left matrix is positive definite even when is rank-deficient. Thus the closed-form ridge regression estimator isThe second equality again uses centering. If the penalty convention is with an unnormalized squared-error term , replace by throughout; the limiting assertion is unchanged.
For the full-column-rank case, take a singular value decomposition with positive singular values . The ordinary least squares estimator, which is the slope maximum-likelihood estimator in this normal linear model, and the ridge regression estimator are respectivelyConsequently principal-component shrinkage by ridge regression multiplies the least-squares coordinate in direction by . Ridge shrinks most strongly in directions with the smallest singular values. These are combinations of predictors that the data distinguish least well.
Near multicollinearity creates small singular values, and the factor in ordinary least squares greatly amplifies noise in those directions. Its coefficient variance there is , while the ridge variance iswhich is smaller. The price is bias: the expectation of the ridge coordinate is times the corresponding true coefficient. This bias-variance tradeoff can substantially reduce estimation and prediction error when the poorly identified directions do not contain an excessively large signal. It is not a guarantee of improvement for every coefficient vector. Adding to every eigenvalue also improves the condition number of the normal matrix and makes numerical inversion more stable.
To handle every rank and every relation between and , put and use its spectral theorem for real symmetric matrices. Choose an orthonormal eigenbasis with eigenvalues , and put . ThenIf , then , so and . Thus these terms are exactly zero for every positive ; there is no divergent component in the null space. Each remaining term converges to . By the definition of the Moore-Penrose pseudoinverse,and thereforeThis proves the vanishing-penalty ridge limit without an invertibility assumption. The limit is the minimum-norm least-squares solution: every other least-squares solution differs by a vector in , orthogonal to the displayed solution, and therefore has at least as large a Euclidean norm.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 7 i Solution Created 2026-10-03 Updated 2026-10-07
Choose candidate variables from subject-matter knowledge, measurement quality and the target question before screening on outcomes. For an adjusted-effect analysis, retain prespecified confounders and essential design variables even when their individual values are large. For prediction, consider reliable predictors available at the intended prediction time; do not include future information. Handle missingness transparently, using a justified multiple imputation strategy where appropriate rather than changing the analyzed population unpredictably as variables enter.
Encode a categorical variable with indicators relative to a stated reference category, and assess it as a group. Check multicollinearity, sparse categories and plausible interactions. The relevant information is chiefly the number and distribution of events, not merely the number of enrolled subjects: hundreds of correlated or rarely varying predictors cannot be supported by a small event count.
Compare prespecified nested models by a likelihood-ratio test based on the partial log-likelihood and the change in parameter dimension. Penalized methods such as ridge regression or Lasso regression applied to the Cox likelihood can stabilize many-variable models; choose tuning by suitable validation and account for mandatory variables. The Akaike information criterion or a limited, documented model-selection procedure can help balance fit and complexity. Unrestricted stepwise searches and repeated univariable screening invite unstable choices, omit joint confounding effects, and make naive post-selection intervals misleading. Prefer a defensible, validated covariate set to a collection chosen only for small values.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 33 4 a Solution Created 2026-10-03 Updated 2026-10-06
Use an unpenalized intercept in ridge regression. For centered predictor columns, the ridge regression optimization isDifferentiating with respect to gives . Put . Differentiation with respect to gives the ridge normal equationConsequently the closed-form ridge regression estimator isBecause , the numerator may also be written . For the inverse exists even with multicollinearity or deficient column rank; at a unique ordinary least squares coefficient vector requires full rank. The quadratic penalty stabilizes nearly singular directions but generally does not set individual coefficients exactly to zero.
For uncentered original predictors, use , apply the displayed estimator to , and recover . Any internal scaling used by
lm.ridge must be undone to report coefficients on the original predictor scale. Multiplying the objective by a constant changes the numerical penalty convention unless is rescaled as well. Past exam of the mathematics course of the University of Cambridge 2015 ii Paper 4 10J Solution Created 2026-09-24 Updated 2026-10-06
Write . Minimizing the residual sum of squares first over the coefficients of reduces the problem to minimizing . Full column rank ensures . Thus the partial regression formula and its variance areThis uses and the isotropic error covariance matrix .
Since the span of is contained in the column space of , orthogonal projection onto the latter removes at least as much squared norm. Consequentlyand inversion proves the requested lower bound. Full rank makes the denominator positive.
Adding to column leaves the column space unchanged. Every old fitted vector is reproduced by keeping all slopes unchanged and replacing the regression intercept by . Uniqueness of the ordinary least squares estimators then proves that slope is unchanged. In particular all columns can be centered by such changes. Applying the previous projection argument to the centered design proves the bound with and ; the normalized inner product is now the usual sample correlation.
Each reported coefficient test is the two-sided Student's t-test of against , conditional on the other predictors. Under the null, has a Student's t-distribution with degrees of freedom. At five percent the intercept is significant, but neither individual test slope is. The final F-test compares the full model against an intercept-only model: . It has degrees of freedom and rejects at five percent, since its -value is . Thus the predictors jointly explain variation, without strong evidence separating their individual conditional effects.
The two test predictors have sample correlation , although each has only moderate correlation with the final exam response. The variance inflation factor is . Their nearly shared direction produces substantial multicollinearity, inflating the individual slope standard errors. The joint F-test can detect this common predictive direction even though either coefficient, given the other, has a large -value.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 206 2 e Solution Created 2026-10-03 Updated 2026-10-06
Check that the chosen mean structure adequately describes the transformed response. Examine the residual-versus-fitted plot and residuals versus each predictor: systematic curvature suggests omitted nonlinear effects or an interaction term. Plot residual spread against fitted values, for example using a scale-location plot, to assess homoscedasticity. Compare standardized residuals with a normal distribution using a quantile-quantile plot, especially for finite-sample Student's t-distribution and F-test inference.
Also check independence using the sampling design and residuals versus time, collection site, or other groups; spatially related photovoltaic systems may have correlated errors that are invisible in a residual-versus-fitted plot. Investigate large standardized regression residuals, high regression leverage, and influential observations using Cook's distance. Check that the design matrix has full rank and that severe multicollinearity is not making estimates unstable. Reassess whether the response transformation and retained predictors improve these diagnostics and prediction; a coefficient p-value alone cannot establish model adequacy. If observations are independent only conditional on site effects, use an appropriate dependence model rather than treating correlated systems as independent replicates.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 218 6 b Solution Created 2026-10-03 Updated 2026-10-05
The two predictors have correlation coefficient , so there is severe multicollinearity. Their centered slope Gram matrix isThus either partial slope has variance . Relative to a univariate regression with the same error variance, the two-predictor variance inflation factor and standard-error factor areThe small eigenvalue makes the contrast between the two slope effects particularly poorly estimated. The univariate regressions test marginal association with the response; the bivariate tests ask whether one predictor adds an effect while holding its nearly identical companion fixed. Their much larger standard errors therefore make the partial tests insignificant without contradicting the marginal significance. The two fits also estimate slightly different residual variances, explaining why the reported standard-error ratio is not exactly 5.21.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 4 5J a ii Solution Created 2026-09-24 Updated 2026-09-29
The full F-test has and tests the null hypothesis that both slope coefficients vanish. It decisively rejects that hypothesis, while says the fitted model explains about of the sample variation. Together with the insignificant individual t-tests, this is characteristic of multicollinearity: the two covariates explain the response jointly, but the output does not identify either one as having a separately estimable effect.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 4 5J a i Solution Created 2026-09-24 Updated 2026-09-29
The individual t-tests only test each regression coefficient after adjusting for the other covariate. Here neither covariate is individually significant at conventional levels, but from the abbreviated coefficient table alone one cannot conclude that neither explains the response: strong multicollinearity can make both standard errors large even when the covariates are jointly useful.
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 218 6 d Solution 2026-09-28
The nearly identical predictor columns create severe multicollinearity. Their sum is well identified, as shown by the excellent fitted response, but their difference is weakly identified, allowing ordinary least squares to choose huge opposite coefficients with huge standard errors. The independent priors impose the ridge penalty from part c, shrinking that unstable difference toward zero and producing the stable estimates near .
Past exam of the mathematics course of the University of Cambridge 2024 ii Paper 1 13L c Solution Created 2026-09-24 Updated 2026-09-25
The nested-model -test has hypothesesIts statistic isThe reported -value gives strong evidence against : weight and width are jointly useful.
Neither individual coefficient is significant at . This is consistent with the predictor correlation : strong multicollinearity makes the two partial effects difficult to distinguish and inflates their individual standard errors, even though their joint contribution is clear.