Past exam of the mathematics course of the University of Cambridge 2017 ii Paper 4 12J a Solution Created 2026-09-24 Updated 2026-10-05
The Poisson deviance tests overall fit against the saturated Poisson regression, not whether the single slope is zero. Under fit.1, its large-count approximation is . The observed value is 261.72, far above the one-percent upper critical value (about 85.95); its upper-tail probability is about . Thus reject fit.1 at the one-percent level. The slope's reported -value 0.421 only compares this inadequate log-linear trend with an intercept-only model; it is not a goodness-of-fit test.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 218 4 b Solution Created 2026-10-03 Updated 2026-10-05
The null model has only an intercept:For , maximizing its log-likelihood gives and . The saturated Poisson regression gives each observation its own fitted mean , allowing zero as a limiting fitted mean. By the definition of Poisson deviance,Since ,Use the continuous convention . If all counts are zero, both the saturated and null likelihood maxima are attained as limits at zero mean and the deviance is zero.
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 2018 ii Paper 3 5J Solution Created 2026-09-24 Updated 2026-10-03
Treat the cell counts as independent Poisson random variables. Under independence of Month and Hospital, the independence log-linear model for a two-way contingency table iswith no Month–Hospital interaction. Compare its Poisson deviance with the appropriate upper quantile of a chi-squared distribution. This is the likelihood-ratio test of independence in a contingency table.
The approximation assumes independent counts with correctly specified Poisson means, identifiable parameters, and sufficiently large fitted cell means for the asymptotic chi-squared law to be accurate. Equivalently, one may condition on the margins and use the corresponding multinomial sampling formulation.
For the month table there are cells and independent model parameters, so the residual degrees of freedom areSincemodel 1 does not reject Month–Hospital independence at the level.
After combining months into four quarters, the table is , givingdegrees of freedom. Nowso model 2 rejects Quarter–Hospital independence at the level.
There is no contradiction. Relabelling twelve months as four quarters aggregates the contingency table, changes the null hypothesis, and reduces the degrees of freedom. The quarter-level hospital pattern is coherent enough to cross the much lower six-degree-of-freedom threshold even though the more detailed month-level omnibus test does not. This is an instance of how aggregation can change a contingency-table independence test.
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 1 13J c Solution Created 2026-09-24 Updated 2026-09-29
The null hypothesis is that price and score are independent, equivalently that the independence log-linear model for a two-way contingency table is correct. Against the saturated alternative, the reported Poisson deviance is the likelihood-ratio test statisticUnder the null and the usual large-sample regularity assumptions, Wilks theorem givesThe observations must be independent, the cell probabilities must not lie on the boundary of the parameter space, and the expected counts must be large enough for the chi-squared asymptotic approximation. The fitted counts are either or , so the customary expected-count check is comfortably satisfied. Since(equivalently, the p-value is about ), we do not reject the null at the significance level. The data provide no significant lack of fit for independence.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 218 1 a Solution Created 2026-09-24 Updated 2026-09-25
Write for the colony count and for the dose on plate . The first fit is the Poisson regressionThus its log-likelihood isThe Poisson deviance relative to the saturated model iswhere a summand with uses .
At dose zero the fitted expected value is eradicated colonies. Increasing dose by one unit multiplies the fitted mean by ; for example, an increase of units multiplies it by about . The positive fitted effect is small and its displayed two-sided -value, , gives little evidence against a zero dose coefficient.
The full Poisson deviance is . An unpenalized log-mean intercept has likelihood score , which vanishes at an interior fit. The linear terms then cancel, giving the displayed expression. Without that intercept score equation, discarding the linear terms is not justified. Use the limiting convention .
Pooling selected slopes in a Poisson regression Created 2026-10-06 Updated 2026-10-07
A categorical covariate can be grouped in an interaction term while retaining its original main effect. This shares selected slopes but keeps separate intercepts. Nested Poisson deviance differences test slope pooling and intercept pooling separately.
Write . For small, the cell contribution to the Poisson deviance expands asSumming gives the Pearson chi-squared statistic as the quadratic approximation. The approximation can be inaccurate for sparse expected counts or cells with relative residuals near minus one.