Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 218 4 a Solution Created 2026-10-03 Updated 2026-10-05
Let denote Progabide and placebo; write for age and for baseline count. The fitted Poisson regression specifies independentIts log-likelihood isThe coefficient table in the original PDF, whose TeX transcription is truncated, gives the maximum-likelihood estimatesFor the treatment interaction contrast in a Poisson regression, the baseline slope of the log mean is on placebo and on Progabide. At fixed age and baseline , the fitted drug-to-placebo mean ratio is . Increasing baseline by one multiplies that ratio by . Thus the interaction term describes how the treatment ratio changes with baseline, rather than a uniform additive change in seizure counts. The displayed call makes clear that the source's
summary(model1) line is an object-name typo for the epilepsy fit. 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 1 13J c Solution Created 2026-09-24 Updated 2026-10-03
Fit a Poisson regression to artificial responses with meansWith the logarithmic link, this is the generalized linear modelwhere is a known offset. Its log likelihood, apart from constants, isThe differencedoes not depend on . The Poisson surrogate therefore has exactly the same maximum-likelihood estimate of . This is the Poisson surrogate for an uncensored proportional-hazards likelihood.
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 1 5J Solution Created 2026-09-24 Updated 2026-10-03
Write for the request count on day . Both fits are Poisson regression models with independentIn model 1,where the variables are indicator variables for winter, weekend, bank holiday, and low or medium pollution; non-winter weekdays that are not bank holidays and have high pollution form the baseline. Model 2 imposesretaining only winter and weekend effects.
The models are nested, and the likelihood-ratio test statistic is the decrease in residual deviance,There are three restrictions. By Wilks theorem, under this statistic is asymptotically a chi-squared distribution with three degrees of freedom. Sincewe reject model 2 at the level in favour of model 1.
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 1 13J a Solution Created 2026-09-24 Updated 2026-09-29
Let be the number of ice creams in price category and score category . The fitted Poisson regression assumes that the nine counts are independent random variables withwhere the logarithmic link function is used and excellent is the reference level in a regression factor, so . Equivalently,This is the independence log-linear model for a two-way contingency table: price and score have main effects but no interaction.
Past exam of the mathematics course of the University of Cambridge 2021 iii Paper 218 3 a Solution 2026-09-28
Time is exposure: doubling the public duration should double the expected count without changing the viewing rate. Modeling the rate is therefore preferable to treating time as an additive linear predictor. In a Poisson regression the exact implementation should beusing as an offset; directly supplying noninteger without exposure weights is not generally likelihood-equivalent.
Past exam of the mathematics course of the University of Cambridge 2021 ii Paper 4 5J Solution Created 2026-09-23 Updated 2026-09-25
This is Poisson regression with independent counts and log mean . The residual deviance on degrees of freedom has , and the plotted curve tracks the data, so there is no evidence of poor fit.
The fitted doubling time is days. A 95% interval for the growth coefficient is , corresponding to doubling times days. Seven days, whose rate is about , is unsupported.
Past exam of the mathematics course of the University of Cambridge 2022 ii Paper 1 5J Solution Created 2026-09-23 Updated 2026-09-25
A Gaussian linear model for treats the transformed observations as having additive constant-variance errors and models as linear. A Poisson regression with square-root link retains the Poisson likelihood and modelsThe two procedures therefore have different likelihoods, fitted means, and constraints; transforming the response is not the same as transforming its conditional mean.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 1 a Solution 2026-09-28
For individual , let be the reported count, the gender indicator, and the minority indicator. The fitted Poisson regression isIts log-likelihood isThe maximum-likelihood estimator isHolding minority status fixed, changing the gender indicator from zero to one multiplies the fitted conditional expected value by . Thus the fitted mean count for men is about lower than that for women with the same minority status.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 1 b Solution 2026-09-28
The researcher computed the Pearson chi-squared statisticand compared it with a distribution, using residual degrees of freedom. Under an adequate large-sample Poisson regression, should be roughly the residual degrees of freedom. The reported tail probability rounds numerically to zero and gives strong evidence of overdispersion.
Possible causes include unobserved heterogeneity or omitted covariates, dependence among respondents, excess zeros, or an incorrect mean function. The conclusion that the Poisson variance assumption fails is well supported, although this test alone does not identify the cause or establish that the Quasi-Poisson regression variance is correct.
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 4 13J i Solution Created 2026-09-24 Updated 2026-10-03
Let be the first team's goal count in match , let be row of the design matrix, and let be the regression coefficient vector. The fitted Poisson regression assumes that the are independent random variables withThe likelihood function maximized by
glm is therefore Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 4 13J v Solution Created 2026-09-24 Updated 2026-09-25
The fitted Poisson regression hasso that . Hypothesis requires both restrictionsas well as the adequacy of the assumed Poisson distribution. The displayed interval addresses only the single slope restriction . Even if the separate interval for the intercept also contains zero, separate one-parameter intervals do not implement the relevant joint hypothesis test, because the two coefficient estimators can be correlated. One should test jointly, for example by a likelihood-ratio test, and separately assess the Poisson goodness of fit. Thus the slope interval alone cannot decide whether is rejected at the level.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 207 6 b ii Solution Created 2026-09-24 Updated 2026-09-25
Under a country-specific constant hazard survival model, let be the number of deaths and the total person-time at risk in country . The likelihood is proportional toso the maximum-likelihood estimator is . Test by a likelihood-ratio test, score test, or Wald test; equivalently, give a Poisson distribution with mean and test the country coefficient in a Poisson regression with offset .
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.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 218 1 b Solution Created 2026-09-24 Updated 2026-09-25
For the Poisson variance function , the code computes the Pearson chi-squared statisticand the Pearson dispersion estimatorThe first quantity measures goodness of fit; the second estimates the dispersion parameter, which equals one in a correctly specified Poisson regression. A standard rough calculation substitutes the residual deviance for the Pearson statistic and givesIf the reported upper-tail probability is inverted numerically, the actual Pearson statistic used by the code is about , giving . Either calculation reveals severe overdispersion.
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 1 a Solution Created 2026-09-24 Updated 2026-09-25
The first fit is a Poisson regression with independent responsesThe fitted intercept gives expected visitors when spending on both services is zero. Holding advert2 fixed, increasing advert1 by one unit, namely one hundred pounds, multiplies the expected visitor count by .
For three distinct times, the columns are linearly independent by the Vandermonde determinant. Thus a quadratic Poisson regression for the log mean can reproduce any three positive time-group means. A grouped goodness-of-fit test of that mean form has zero residual degrees of freedom. Replicated observations still allow checks of the Poisson distribution and overdispersion within each time group; saturation of the mean does not establish the response distribution.
For independent uncensored event times with and baseline cumulative hazard , maximizing the survival log likelihood over is equivalent to fitting a Poisson regression with unit responses and meansThus a log-link generalized linear model with response , linear predictor , and offset gives the same estimate of .