Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 36 3 g Solution Created 2026-10-03 Updated 2026-10-14
For each plate use its conditional fitted intensity, including the fitted random effect. At a posterior draw form the Pearson residualA simpler plot uses in this expression, but posterior draws also display uncertainty in the fitted values. Look for residuals centred around zero, unexpectedly large tails or isolated outliers, and patterns with dose, fitted intensity or plate grouping. For known conditional parameters the Poisson distribution gives mean zero and variance one for this residual; approximate normality is reasonable only at adequate count sizes. Fitting the same data and estimating latent effects changes its calibration, so compare the diagnostics with residuals from conditional posterior predictive checks, rather than treating them as independent exact standard normals.
This checks the plate-level Poisson sampling layer given the effects and can reveal remaining unmodelled variation. It does not by itself establish the population dose-response curve: fitted plate effects can absorb departures from that curve.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 33 3 d Solution Created 2026-10-03 Updated 2026-10-06
For the gamma variance function, the Pearson dispersion estimator isusing residual degrees of freedom. Under a specified null dispersion , the scaled statistic based on squared Pearson residuals has an approximate distribution under the usual residual approximation.
Thus
test1 corresponds to , equivalently gamma shape , the exponential distribution. test2 corresponds to , equivalently shape . The null hypotheses concern dispersion or shape, not whether the regression coefficients vanish.The code computes lower-tail probabilities. Used as one-sided tests, the alternatives are and , respectively, equivalently shapes larger than one and three. At the 5% level the first null is rejected because the lower-tail probability is , while the second is not rejected because its probability is . If the intended alternatives are two-sided, , these displayed numbers must not be called two-sided p-values: doubling the smaller tail gives approximately and , with the same decisions. The chi-squared distribution approximation is not an exact finite-sample gamma identity.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 218 4 c Solution Created 2026-10-03 Updated 2026-10-05
Under a correctly specified Poisson regression with adequate expected counts, the residual Poisson deviance is approximately chi-squared distribution with residual degrees of freedom. The observed givesThus the ordinary Poisson model gives a very poor fit under this goodness-of-fit approximation. This is consistent with overdispersion, although a wrong mean model or dependence can also cause lack of fit; quasi-Poisson variance inflation alone does not establish that the mean model is adequate.
For Quasi-Poisson regression, . The Pearson dispersion estimator isIt uses squared Pearson residuals, not the residual deviance divided by 102. The fitted coefficients are unchanged, and their estimated covariance matrix is multiplied by . With , standard errors increase by , so the main treatment coefficient hasThe main Progabide coefficient is not significant at 5% after this dispersion adjustment. R uses a Student's t-distribution when dispersion is estimated, as described in its GLM summary documentation; the large-sample normal approximation also gives the same decision.
Because an interaction term is present, this tests the treatment contrast at baseline zero. An overall absence of treatment influence requires the joint null . The printed marginal standard errors do not give their covariance, so they are insufficient to calculate that joint Wald test, or the treatment contrast test at an arbitrary nonzero baseline.
Past exam of the mathematics course of the University of Cambridge 2026 iii Paper 218 1 c Solution Created 2026-09-24 Updated 2026-10-03