Past exam of the mathematics course of the University of Cambridge 2017 ib Paper 1 19H b Solution Created 2026-09-24 Updated 2026-10-05
For a target , the bias of an integrable estimator is ; it is an unbiased estimator if this is zero at every allowed parameter value. Here has a zero-truncated Poisson distribution, , and . Write an estimator based only on as , assuming a finite expectation for every . Unbiasedness requiresAbsolute integrability at every positive parameter ensures that the power series on the left converges absolutely on every complex disc. Uniqueness of coefficients in a power series therefore gives for odd and for positive even . Conversely these values give the displayed identity, sois the unique unbiased estimator of this form. The uniqueness claim concerns nonrandomized functions of ; allowing external randomness would permit addition of independent mean-zero noise.
For this parity estimator for a zero-truncated Poisson count, usefulness depends on the loss, but under squared-error loss it performs poorly despite being an unbiased estimator. Since , andIt takes the inadmissible value with positive probability, and its variance tends to one rather than zero as . Clipping to the parameter interval gives . This has bias , butThus a simple biased estimator strictly improves its mean squared error at every parameter value; uniqueness among unbiased estimators does not make it optimal for this loss.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 4 a Solution Created 2026-10-03 Updated 2026-10-05
The random-slope linear mixed model iswith independence between the random effects and errors. The estimates areIncubators are treated as exchangeable representatives of possible growth environments, so a random slope permits their growth rates to differ while estimating a population mean growth rate. The formula
0+hours deliberately removes a random intercept: larvae are assigned only after hatching, so it is reasonable to assume no incubator-specific baseline at time zero. Random assignment supports this common-baseline assumption in expectation; it does not prove that observed initial sizes or other baseline differences are exactly identical.For a new incubator, no observations are available to estimate its realized random slope, and its mean effect is zero. Under squared-error loss the best prediction integrates over that effect and the residual error:This is the plug-in conditional expectation given the population parameters, rather than a prediction using a fitted effect from one of the four existing incubators. Ignoring parameter-estimation uncertainty, the prediction variance for a new individual is ; it is not just the uncertainty in the population mean.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 5 e Solution Created 2026-10-03 Updated 2026-10-05
Let contain observations through time . In the Gaussian moving-average process of order one, the innovations inare independent of . Hence the conditional expectation is the constant mean. For known parameters, the forecast and its mean squared prediction error areThe mean prediction error itself is zero; the requested uncertainty is naturally interpreted as expected squared error. Plugging in the fit gives forecast , mean squared error , and root mean squared error about .
The usual naive time-series forecast repeats . Its unconditional expected squared error issince . ThusConditional on , the naive error is , explaining directly why the conditional-mean forecast is better under squared-error loss. These are fitted-model calculations that ignore parameter-estimation uncertainty. Estimating the unknown mean from the past adds its estimation mean squared error to the seven-step forecast risk; the printed summary does not provide a complete assessment of that extra uncertainty. This is distinct from claiming a signed mean error as a measure of forecasting accuracy.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 210 4 Solution Created 2026-10-03 Updated 2026-10-05
Use the natural cubic spline convention appropriate to the interior design knots: the spline is linear on and . We also need . These points will be important for uniqueness.
A cubic spline is a function in whose restriction to each of , , through is a polynomial of degree at most three. A spline knot is a junction between consecutive pieces. For a natural cubic spline, the two exterior pieces are affine functions; equivalently, one uses the natural endpoint conditions on the spline over and then extends linearly with matching derivatives. Merely prescribing on otherwise arbitrary exterior cubic pieces is a different condition and does not provide the unique interpolant invoked in this question.
The natural cubic spline interpolant to values is the natural cubic spline satisfying . Its existence and uniqueness for are the interpolant fact allowed in the PDF. The interpolation map is a linear map: a linear combination of interpolants satisfies the same spline, boundary and value conditions, so uniqueness identifies it with the interpolant to the corresponding linear combination of value vectors.
Let , let have the same values, and put . Then . We prove the orthogonalityApply integration by parts twice on each polynomial interval. On an interior interval, , andThe terms vanish because vanishes at the knots. The terms cancel at internal knots because and are continuous, and vanish at because is zero there. On the exterior intervals, identically. Summing therefore gives the claimed orthogonality without assuming that is continuous across knots.
Expanding the square now gives the minimum roughness property of the natural cubic spline interpolantEquality forces everywhere, since is continuous. Thus is an affine function. It vanishes at two distinct design points, so , proving equality if and only if .
For the penalized fit, take the allowed spline roughness penalty matrix to be a symmetric matrix with ; thus it is a positive semidefinite matrix. If its supplied representative were not symmetric, its symmetric part defines the same quadratic form and is all that is needed. For any , let . Replacing it by preserves every fitted value and can only decrease the second derivative roughness penalty. Therefore it is enough to minimizeover . The matrix is a positive-definite matrix, sinceCompleting the quadratic or differentiating gives the unique solutionThis is the cubic smoothing spline. More explicitly, the normal equations are , andFor an arbitrary function with fitted vector , the earlier orthogonality also givesBoth terms are nonnegative. Equality forces and, by the proved interpolation equality case, . This proves both existence in and uniqueness over the entire stated function class, not just over splines.
The argument is deterministic for each observed . The fixed-design nonparametric regression and homoscedasticity assumptions motivate the squared-error loss, but Gaussian errors are not required.
At least two distinct design points are required for uniqueness. Question 4 does not explicitly restate , and this hypothesis is necessary. With one design point, every function has zero residual and zero second derivative roughness penalty, for any real . Thus the printed unrestricted uniqueness conclusion would be false for . The corrected theorem assumes at least two distinct knots and the stated linear-tail convention. At , uniqueness over all of also fails; the stipulated eliminates that degeneracy.
Past exam of the mathematics course of the University of Cambridge 2018 ib Paper 4 19H Solution Created 2026-09-24 Updated 2026-10-14
With the uniform prior, the binomial likelihood gives the beta distribution posterior . Under squared-error loss, the Bayes estimator is the posterior mean:
The production manager's prior gives posterior density proportional to . Minimizing gives the weighted posterior meanusing the supplied beta function. Cross multiplication shows exactly when , so it is greater unless .
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 210 2 Solution Created 2026-10-03 Updated 2026-10-05
Put and , where is a nonnegative integer and is the smoothing bandwidth. The local polynomial estimator is the intercept of the weighted least squares fitWhen the local polynomial Gram matrix is invertible, the normal equations giveA singular local polynomial Gram matrix requires a selection convention and may leave the intercept unidentified; an arbitrary nonnegative regression kernel alone does not guarantee uniqueness. At , provided , the Nadaraya–Watson estimator isMultiplying every weight by changes neither fit.
For the uniform kernel, let and . Then . For and , the interval is inside , and the regular design hasThe same lower bound holds when the interval starts at zero, despite the absence of the design point zero. In particular the Nadaraya–Watson estimator is defined throughout the integration interval.
For every Lipschitz continuous mean function in , the bias of an estimator and variance satisfyHere the variance uses the independence of the errors in the fixed-design nonparametric regression model. The bias-variance decomposition of mean squared error and Tonelli theorem give a slightly stronger integrated mean squared error bound than required:ThusThe printed integration interval represents a nonnegative risk function for . For , the written integral has reversed limits and is nonpositive, making the displayed upper bound trivial; it should not be interpreted as an integrated mean squared error in that range. For , evaluation outside would additionally require a specified extension of the mean function. The subsequent optimization restricts to .
Minimizing the stated right side givesFor sufficiently large , and . For example take . Therefore the upper bound holds with
For the lower bound, the PDF has the mean squared error ; the TeX erroneously moves the square outside the expected value. The PDF's suggested smooth bump function is , with value zero at the endpoints, rather than the corrupted TeX formula. A triangular alternative suffices because only Lipschitz continuity is needed.
The Le Cam two-point lemma says that for two data laws with parameter separation , every estimator satisfiesIndeed, classify according to the nearer parameter value. Misclassification incurs squared-error loss at least , and the sum of the two error probabilities is at least one minus the total variation distance. Averaging the two risk functions proves the stated form.
Let , , and use the two-point lower bound with a triangular bumpBoth functions are in , and . Assume first that and . At most design points meet the bump's support. The Kullback-Leibler divergence between normal distributions and chain rule for relative entropy giveThe Pinsker's inequality therefore gives . The Le Cam two-point lemma yields the pointwise minimax rate for Lipschitz regressionThis universal constant is valid for .
If the printed lower bound is read as applying to all positive integers , it also holds with a smaller constant depending on the fixed . For , use the constant mean functions and . They have Kullback-Leibler divergence , so Pinsker's inequality and the Le Cam two-point lemma give minimax risk at least . Combining the two ranges gives the explicit all- choiceThe universal asymptotic constant and this parameter-dependent all- constant are distinct conventions; the latter supplies the assertion without inserting an unstated large- restriction.
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 3 28J b Solution Created 2026-09-24 Updated 2026-10-03
Multiplying the likelihood by the gamma distribution prior density givesThus Gamma-exponential conjugacy giveswhere the second parameter is the rate. Under squared-error loss, the Bayes estimator under squared error loss is the posterior mean, hence
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 1 29J Solution Created 2026-09-24 Updated 2026-10-14
Let have regular density , letbe its score function, and letbe its Fisher information. Regularity gives the mean-zero score identity .
Suppose an estimator has mean . Differentiating under the integral givesThe Cauchy-Schwarz inequality therefore yieldsand hence the Cramér-Rao boundIn particular, an unbiased estimator of has variance at least . For an independent sample, the information is the sum of the individual informations.
Now let be independent variables with , under squared-error loss. The sample mean is unbiased with variance , sofor every . Thus the minimax value is at most .
For the matching lower bound, choose a continuously differentiable density on that vanishes at both endpoints and has finite prior informationfor example, . For , define the priorIt is supported inside the parameter space, and its information is .
Here the likelihood score iswhose Fisher information is . For any decision rule , combine it with the prior score to form the joint scoreIntegration by parts in , with no boundary term because vanishes there, givesThe likelihood score has conditional mean zero, so its cross term with the prior score vanishes andCauchy--Schwarz now proves the Van Trees inequality in this case:The worst-case risk dominates every integrated risk, and thereforeLetting shows that every rule has worst-case risk at least . Since attains that value, the result on the minimax sample mean for a nonnegative normal location is
Residual sum of squares Created 2026-09-24 Updated 2026-10-14
The residual sum of squares measures how far the observed responses lie from their fitted values. If is the th regression residual, thenIt is the squared Euclidean norm of the regression residual vector. Squaring prevents positive and negative deviations from cancelling and gives large deviations more weight. In the constructed five-point example in linear regression, the regression residuals are , so the residual sum of squares is .
Ordinary least squares minimizes the residual sum of squares over the chosen linear regression family; ridge regression minimizes the residual sum of squares plus a penalty. Consequently the ridge regression fit can have a larger residual sum of squares than the ordinary least squares fit on exactly the same design matrix. For the one-predictor construction in ridge regression, the residual sum of squares rises from to when the penalty changes from to ; that increase is the cost of shrinking the fitted slope.
Dividing the residual sum of squares by gives the training error for squared-error loss, not an estimate based on fresh responses. Its units are squared response units, and it adds across observations, so raw totals need not be comparable across different response scales or sample sizes. Comparing fits to the same responses is useful, but choosing a ridge regression penalty by minimum training residual sum of squares favors the unpenalized fit. Assess prediction error using a validation set or cross-validation instead.[ref]
Model selection and validation 1: Cross-validation. slides 6–8 and 11–14: fresh-response error, training error and held-out scoring
Ridge regression Created 2026-09-24 Updated 2026-10-14
Ridge regression fits a linear regression model while penalizing the size of its slope regression coefficients. For a fixed design matrix containing the slope predictors, observed responses , and an unpenalized regression intercept , the objective isHere is the all-ones vector, and is the squared Euclidean norm of the slopes alone. The first term is the residual sum of squares; the second implements regularization. No random-error assumption is needed to define this fit. The convention is a summed squared-error loss: writing the objective as gives the same fit when .[ref]
Modern regression 1: Ridge regression. slides 5 and 7: summed squared-error objective and unpenalized intercept
For an exact example, reuse the constructed pairs from linear regression. Their sample means are and , and the centered cross-products are and . ThusThe ordinary least squares line has slope and residual sum of squares . At , ridge regression has slope , regression intercept , and residual sum of squares ; at these become , , and . Every line passes through : the penalty reduces the slope while retaining the response sample mean.
The computational benefit is visible after predictor centering. Write for the design matrix with each column's sample mean subtracted, and . The unpenalized intercept in ridge regression gives , and the closed-form ridge regression estimator solvesFor any nonzero vector and , . This positive-definite matrix is therefore invertible even when lacks full column rank, including repeated columns or . The unique penalized slopes resolve the ambiguity of rank-deficient ordinary least squares; they do not supply evidence about slope directions absent from the data. This makes ridge regression useful for multicollinearity.[ref]
High-Dimensional Regression: Ridge. p. 1, equations (1)–(2): uniqueness for positive penalty regardless of design rank
Predictor centering and scaling serve different purposes. Centering handles the free regression intercept. Scaling determines what counts as a large slope: replacing by changes its coefficient to for the same predictions, changing its contribution to an unweighted penalty. A common convention forms standard scores using each nonconstant predictor's sample standard deviation , then penalizes slopes in those coordinates. Since , this is the weighted penalty in the original units. Constant columns have and must be removed before this scaling. Scaling is a modelling choice; equal penalties in original units and in standardized units define different fits.[ref]
Modern regression 1: Ridge regression. slide 7: center predictors, leave the intercept free and scale predictors to sample variance one
The singular value decomposition explains the shrinkage. If is the compact decomposition using the positive singular values , with columns of , thenThe principal-component shrinkage by ridge regression factors are between and : directions with small singular values are damped most. As , the fitted values approach ; the vanishing-penalty ridge limit recovers the ordinary least squares fitted vector as , even if the slope estimates at zero penalty are nonunique. The covariance and bias of a ridge regression estimator describes the resulting bias-variance tradeoff. A penalty can reduce variance of an estimator while introducing bias of an estimator; the unbounded directional risk of fixed ridge shrinkage rules out a uniform improvement for a fixed positive penalty over all possible signals.[ref]
For a second exact construction, choose a centered orthonormal set of three vectors,and set and . The squared singular values are and . At , the fitted coordinates along are , retaining and of their ordinary least squares values . At they become , retaining and . The unfittable component contributes to every residual sum of squares, giving total values , , and at penalties . These are constructed fits, not measured prediction results.
Exact synthetic ridge shrinkage retains the strong singular direction longer than the weak one
. Details. The penalty is a hyperparameter, so fitting slopes at a fixed value and selecting that value are separate tasks. Use a validation set or K-fold cross-validation to compare candidate penalties by held-out squared-error loss. In each split, compute predictor sample means and scales from that split's training data, apply the same transformation to its validation set, and refit the slopes; using held-out information in preprocessing introduces data leakage. Minimum training residual sum of squares cannot select useful shrinkage: ordinary least squares already attains the smallest possible value.[ref]
Model selection and validation 1: Cross-validation. slides 5–8 and 11–14: tuning for prediction, training error and refitting on each training fold
After model selection, refit on all training data with the selected penalty. A separate test set or nested cross-validation assesses the entire selection procedure; a low selected validation score alone is no performance guarantee.[ref]On Over-fitting in Model Selection and Subsequent Selection Bias in Performance Evaluation by Gavin C. Cawley and others. pp. 2079–2080: selection as part of fitting and nested assessment
Single-observation location minimax bound Created 2026-10-06 Updated 2026-10-07
For a known mean-zero noise law with finite variance , observing only with unrestricted has minimax risk under squared-error loss. The observation itself attains this risk. For the lower bound, use a flat prior distribution on and condition an easier experiment on . Away from the prior endpoints, the Bayesian posterior noise has its original truncated law. Let and then in the resulting Bayes risk lower bound. No normal distribution or density for the noise is required.
Smoothing spline Created 2026-10-05 Updated 2026-10-06
A penalized function estimate balancing a residual loss against an integrated derivative penalty. For squared-error loss and the second derivative roughness penalty, the estimate is a cubic smoothing spline. Higher derivative orders give other spline degrees.
Training error Created 2026-09-24 Updated 2026-10-14
Training error is the average loss function evaluated on the observations used to fit the prediction rule. It is the empirical risk of the fitted rule on its own training data. With squared-error loss, it is the average squared regression residual, measuring fit to observed responses rather than performance on fresh responses. Flexible fitting usually makes it optimistically biased for prediction error, as quantified by prediction optimism.
For a reproducible polynomial regression example, take , , and the known noiseless target . Construct responses with fixed disturbancesOrdinary least squares over polynomials of polynomial degree at most 1, 2, and 7 gives training errors , , and . The monotone improvement follows because these candidate families are nested: every smaller-degree fit remains available in the larger family. This argument concerns minimum training error, not generalization, and assumes the fitting mathematical optimization is solved. Degrees 2 and 7 fitted instead to the exact noiseless responses have mathematically zero training error; the script obtains approximately and from rounding. Extra flexibility alone does not force overfitting.

