Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 206 3 a Solution Created 2026-10-03 Updated 2026-10-06
The initial Poisson regression contains altitude, temperature, and their interaction term, with a logarithmic link function. Its interaction Wald test has , suggesting removal of that term while initially preserving both main effects. The resulting additive model has a negligible temperature effect (), suggesting a second simplification to altitude alone. The nested analysis of deviance for nested generalized linear models gives the same provisional decisions: deviance increases are and , each for one removed coefficient, with approximate upper-tail probabilities and . The Akaike information criterion also decreases at each step.
For independent island counts the final proposed model iswith fitted relationThis is an exponential mean relation on the count scale, not a linear relation between count and altitude. One additional metre multiplies the fitted expected count by . The null model's insignificance of individual main effects in the interaction fit does not require discarding every predictor: correlated design columns can make those conditional tests imprecise. These reductions concern relative mean complexity under the working Poisson regression; the large residual deviance in all three models warns that their variance or mean assumptions still need investigation.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 206 3 b Solution Created 2026-10-03 Updated 2026-10-06
For independent Poisson distributions, ignoring the factorial term only when taking likelihood differences,The saturated likelihood maximizes each mean separately at , including its limiting value at zero. Therefore the Poisson deviance iswhere is defined to be zero and . The expression is twice a saturated-model likelihood ratio difference, not twice a likelihood ratio itself.
With sufficiently large fitted counts and regularity, is approximately under a correctly specified Poisson regression. Here on 28 residual degrees of freedom, with upper-tail probability . The Poisson model fits poorly on this diagnostic. Its deviance is nearly three times its degrees of freedom, consistent with overdispersion, although a wrong mean function, dependence, or influential islands could also cause the discrepancy. The smaller Akaike information criterion than its competitors does not make this an adequate absolute fit.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 206 4 b Solution Created 2026-10-03 Updated 2026-10-06
For independent patients, the Bernoulli logistic-regression model iswhere with nonfrail patients as the reference level in a regression factor. The fitted linear predictor isThe null model fits one intercept, so its 99 residual degrees of freedom imply 100 patients; the full model's confirms this. Unit weights correspond to individual binary responses, not grouped binomial counts.
The Akaike information criterion estimates expected relative out-of-sample discrepancy, using the maximized log-likelihood plus a complexity penalty:Here , since the Bernoulli dispersion is fixed at one. The saturated model puts probability one on each observed binary outcome and has log likelihood zero, so the binomial deviance is . ConsequentlyThere is no estimated error-variance parameter to count. The printed name “Aikake” should be read as Akaike.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 206 6 e Solution Created 2026-10-03 Updated 2026-10-06
The generalized additive mixed model fitswhere denotes the furnace random intercept and is a centered penalized cubic regression spline. Its wiggly components have a mixed-model representation; there is no explicit furnace-specific random slope in this formula.
The plotted smooth gives no evidence that a nonparametric fixed effect is needed. It is essentially a straight rising line, and
s(stir,1) indicates effective degrees of freedom close to one. The wider bands at extreme stirring rates reflect uncertainty, not detected nonlinearity. A linear fixed stirring effect is adequate on this evidence.If the three supplied Akaike information criterion values are on a common valid likelihood basis, choose
strength_model3, the fixed linear slope plus random-intercept model: its AIC is smallest, versus for the additional random slope and for the smooth. The differences are and , respectively, so especially the random-slope comparison represents modest support rather than decisive evidence. Retaining the population slope is consistent with part (c); this choice removes only its random variation.There is a likelihood-basis caveat in the literal printed commands. The supplied ranking favours the simpler random-intercept model; the displayed original calls alone do not certify that ranking as a consistent ML comparison. This distinction is particularly relevant when the smooth changes the fixed-effect space. The Gaussian
lmer fits by REML by default, whereas the Gaussian gamm call defaults to ML; direct AIC on these objects need not compare the same type of likelihood. Moreover the earlier ML ANOVA prints for strength_model, whereas this table prints , so these numbers should not silently be treated as one identical ML fit. To obtain a defensible common comparison, fit all candidates to the same observations by ML:fit_slope <- update(strength_model, REML = FALSE)
fit_intercept <- update(strength_model3, REML = FALSE)
fit_smooth <- mgcv::gamm(strength ~ s(stir, bs = "cr"),
random = list(furnace = ~ 1), method = "ML")
AIC(fit_slope, fit_intercept, fit_smooth$lme)gamm ML default and mixed-model representation are documented at stat.ethz.ch/R-manual/R-devel/library/mgcv/html/gamm.html. Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 208 2 1 Solution Created 2026-10-03 Updated 2026-10-06
For a causal autoregressive model of order , the population partial autocorrelation function cuts off after lag , whereas the autocorrelation function generally decays. For an invertible moving-average model of order , the autocorrelation function cuts off after lag , whereas the partial correlation coefficients generally decay. For a mixed autoregressive moving-average model, both generally decay. Exponential decay may alternate in sign or show damped oscillations. Sample correlation coefficients only approximate these patterns, so isolated crossings of the significance bands are not exact order tests.
In PDF Figure 1, the autocorrelation function alternates sign, with a large negative lag-one correlation coefficient and geometrically decreasing magnitude. The partial autocorrelation function has essentially one substantial spike, negative at lag one and about ; later values mostly lie within the displayed bands. Thus a stationary AR(1) with a negative coefficient is the natural first model, with initially near . The trace fluctuates around an approximately constant mean and shows no evident deterministic trend.
Fit that model, compare nearby low-order alternatives using likelihood function and an Akaike information criterion or Bayesian information criterion, and inspect the residual autocorrelation function and residual variance. A few small later PACF spikes are expected in a plot with many lags. The roughly white noise bands are a guide, rather than simultaneous guarantees for every lag.
The sign alternation also suggests concentration of spectral power near the high-frequency end: the AR(1) denominator is smallest near when . From estimated and lag-one correlation coefficient one can estimate innovation variance as . The persistence parameter controls the decay rate and long-run variance of a stationary process. These plots do not establish a normal distribution, independence, or the absence of nonlinear dependence; correlation coefficients of squared residuals can provide a separate variance diagnostic.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 2 d Solution Created 2026-10-03 Updated 2026-10-05
The quasibinomial regression retains the logit link and mean function but uses the working variance function . Its quasi-score equation isso multiplying by the common dispersion parameter does not change the coefficient estimates. Iteratively reweighted least squares therefore gives the same fitted means and coefficients as the binomial model. The usual Pearson dispersion estimator isThe estimated coefficient covariance matrix is , with . From the intercept standard errors, ; the rounded slope errors give approximately the same factor. The display uses approximate Student's t-tests with 118 residual degrees of freedom instead of fixed-dispersion normal tests.
For a genuinely individual binary response, the Bernoulli distribution identity forces . Thus is a working quasi-likelihood specification, not a different independent binary distribution with that mean. The mild estimated underdispersion does not establish an improved model, and the mean predictions are unchanged. In particular, a scalar rescaling does not model correlation among users, and usual likelihood-based Akaike information criterion comparisons are unavailable for a family without a specified probability likelihood. The output gives no convincing reason to prefer model3 to model2.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 4 c Solution Created 2026-10-03 Updated 2026-10-05
The marginal Akaike information criterion is , where counts estimated population parameters. Here they are , so . The realized incubator slopes have been integrated out of the likelihood function; they are not four additional free population coefficients. From the marginal Gaussian log-likelihood, the expression isAll hats here denote the ordinary maximum likelihood estimation fit.
The displayed value is instead a restricted maximum likelihood criterion. Thus it cannot simply be substituted for the ordinary maximum-likelihood deviance. The The output does not contain that numerical answer. In particular, restricted criteria must not be used to compare models with different fixed-effect designs. A conditional AIC targeting predictions for existing groups is yet another criterion and does not follow by counting each latent slope as an ordinary parameter.
logLik method defaults to the fitting convention. If one applies AIC(fly.model) directly to the displayed REML object, the default restricted log-likelihood and the same parameter count give the software's restricted-likelihood-based value . This number should be labelled as such; it is not the ordinary marginal AIC derived above. To obtain the latter, refit and calculateAIC(update(fly.model, REML=FALSE)) Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 218 6 f Solution Created 2026-10-03 Updated 2026-10-05
One suitable criterion among the three unpenalized normal linear models is the Akaike information criterion. With estimated mean coefficients and the variance also estimated, minimizing AIC is equivalent to minimizingThe values of are for model1, model2 and model3. This compares fit and complexity rather than choosing solely by individual coefficient significance. The Bayesian information criterion or a common-fold predictive comparison would also be reasonable, depending on the selection objective.
For the ridge regression tuning parameter, use K-fold cross-validation with squared prediction loss:Use the same folds for every candidate, estimate any centering or scaling within each training fold, choose a minimizing , and refit on all observations. This estimates mean squared prediction error while avoiding data leakage. The printed summaries do not supply all residual sums of squares or validation losses, so they do not determine which model or penalty wins.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 3 5J a Solution Created 2026-09-24 Updated 2026-10-03
Conditional independence makes the log-likelihoodA maximum-likelihood estimator is any . If the model has fitted real parameters, its Akaike information criterion is
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 3 5J b Solution Created 2026-09-24 Updated 2026-10-03
For the normal linear model, the Gaussian likelihood givesMaximization over gives the ordinary least squares estimator , and maximization over the variance givesAt this value the quadratic term in is . There are regression coefficients and one variance parameter, so substitution into the Akaike information criterion yields
Past exam of the mathematics course of the University of Cambridge 2021 iii Paper 218 6 e Solution 2026-09-28
The first line searches candidate ARIMA models and selects the one with smallest Akaike information criterion. The second constructs a one-step-ahead point forecast and nominal 95-percent prediction interval from the fitted values of the selected model.
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 218 5 a Solution 2026-09-28
For a model with fitted parameters and maximized likelihood , the Akaike information criterion isBackward selection starts with the full model, deletes the single variable giving the smallest AIC when that AIC is lower than the current value, and repeats until no deletion improves it. The first deletion is "indus", which gives AIC .
Past exam of the mathematics course of the University of Cambridge 2022 ii Paper 1 13J b Solution Created 2026-09-24 Updated 2026-09-25
The code fits a Bernoulli logistic-regression model. Conditionally on the covariates, the responses are independent withwhere the design includes the displayed numerical predictors and indicator columns for factor levels. It maximizesAkaike information criterion iswhere is the number of fitted parameters. Backward stepwise selection starts from the full model, tentatively removes each eligible term, chooses the removal producing the lowest AIC, and repeats while AIC decreases. It balances fit against model size rather than testing every coefficient at a fixed significance threshold.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 1 e Solution 2026-09-28
The generalized linear mixed model tries to explain overdispersion by replacing the fixed minority coefficient with a Gaussian random intercept. Conditional on the group effect ,
This is a poor use of a random effect because minority has only two levels. Two realized intercepts contain almost no information about a random-effects distribution or its variance, and the two levels are substantively fixed categories rather than a sample from a population of groups. The model also has worse Akaike information criterion than model 1, , and its fit does not establish that the original overdispersion has disappeared.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 1 f Solution 2026-09-28
Because models 1 and 3 are full likelihood models for the same response, one can compare their Akaike information criterion values; that favors model 1. One can also compare held-out count prediction by K-fold cross-validation, using a common loss such as Poisson deviance or negative log predictive density.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 3 c Solution 2026-09-28
For a likelihood with estimated parameters, the Akaike information criterion iswhere is the maximum-likelihood estimator. Among likelihoods for the same observed response and reference measure, smaller AIC estimates smaller expected out-of-sample Kullback-Leibler divergence up to a model-independent constant.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 218 1 c Solution Created 2026-09-24 Updated 2026-09-25
The Pearson goodness-of-fit test has null hypothesis that the independent counts follow the fitted Poisson regression, in particular , against the alternative that the model does not fit; in this setting the scientifically relevant direction is overdispersion, . Under the null, is approximately chi-squared distribution with degrees of freedom. Its tiny -value decisively rejects the Poisson variance assumption.
The negative binomial regression keeps the logarithmic mean model but allows . It improves the residual deviance from to , close to its residual degrees of freedom, and lowers the Akaike information criterion from to . Both comparisons strongly favour the negative-binomial fit, although its dose coefficient remains statistically insignificant.
Past exam of the mathematics course of the University of Cambridge 2025 iii Paper 218 4 c Solution Created 2026-09-24 Updated 2026-09-25
The usual Akaike information criterion correction assumes a regular maximum-likelihood fit with a meaningful fixed parameter dimension. Here stochastic optimization stopped after five epochs need not attain the maximum likelihood estimator, and neural-network symmetries, inactive units, and heavy overparameterization make the raw count a poor effective dimension. Either failure invalidates a direct AIC comparison with an ordinary logistic regression.
Past exam of the mathematics course of the University of Cambridge 2025 ii Paper 4 13K b Solution Created 2026-09-24 Updated 2026-10-03
The estimates maximize the grouped-binomial likelihood, numerically obtained by iteratively reweighted least squares. At the fitted probabilities, the estimated covariance matrix is the inverse observed information, approximatelyThe
Std. Error column is the square root of its diagonal. Each z value is Estimate/Std. Error, and the two-sided Wald test p-value isfor the null hypothesis that the corresponding coefficient is zero.Thus is the fitted log odds for a nonmalignant patient at site A. The site coefficients compare B and C with A, while compares malignant with nonmalignant tumours after adjustment for site. In odds-ratio form,At level , the B-versus-A contrast is not significant (), the C-versus-A contrast is not significant (), and malignancy has a significant negative association with survival (). The intercept test merely compares the baseline survival probability with .
The null deviance compares the intercept-only fit with the saturated model and has residual degrees of freedom. The residual deviance compares the four-parameter fitted model with the saturated model and has degrees of freedom. Finally, the Akaike information criterion is
Past exam of the mathematics course of the University of Cambridge 2025 ii Paper 4 5K Solution Created 2026-09-23 Updated 2026-09-25
For a model with fitted parameters, the Akaike information criterion iswhere is the log-likelihood evaluated at the maximum-likelihood estimate.
In the normal linear model with known ,The maximum-likelihood estimator is the ordinary least-squares estimator, with fitted mean , whereSince only the components of are fitted,After multiplying by and discarding the model-independent constant, this is exactly Mallows Cp:
To compare it with prediction error, write and , where , the two errors are independent, and both have covariance . Since , is an orthogonal projection of rank , andThe cross term has zero expectation, soOn the other hand,Therefore the unbiased prediction-error identity for ordinary least squares gives