Equal-efficacy Poisson log-linear model Created 2026-09-24 Updated 2026-09-24
For treatment groups Control, LD, and SD and binary outcomes, equal LD and SD efficacy can be imposed while retaining separate group totals by using separate treatment main effects but one shared treated-versus-control interaction with outcome. Comparing this five-parameter model with the saturated six-parameter model gives a one-degree-of-freedom analysis of deviance for nested generalized linear models.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 33 3 e Solution Created 2026-10-03 Updated 2026-10-06
The dispersion-one assumption is strongly contradicted by the preceding calculation. Use the gamma analysis with estimated dispersion, namely the F table. A failure to reject shape three does not establish that the true shape equals exactly three; retaining the estimated dispersion parameter is appropriate.
In the analysis of deviance for nested generalized linear models, a deviance reduction for extra coefficients is divided by when dispersion is estimated. The approximate null calibration is . For the type term, the null is that the two type contrasts vanish, against at least one nonzero contrast. The statistic iswith approximate null distribution and p-value . For position, the null is that its coefficient vanishes after accounting for type; the statistic iswith approximate null distribution and p-value . At 5% there is evidence that component type affects the expected failure time, and no significant additional position effect. The table is sequential: the type comparison is to the intercept-only model, while the position comparison adjusts for type. The individual gamma coefficient tests also suggest that type 3 accounts for the clearer type difference. The inverse link function means its positive contrast corresponds to a lower fitted mean failure time, holding position fixed.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 33 3 b Solution Created 2026-10-03 Updated 2026-10-06
Let be the number of maintenance jobs, average temperature and average precipitation. The fitted Poisson regression assumes independent conditional responses withThe logarithm is the Poisson canonical link, so fitted means are always positive. The estimated regression coefficients areAt fixed precipitation, one unit of temperature multiplies the fitted mean by , a decrease of about . The fitted precipitation multiplier is per unit, but its large p-value gives little evidence for that effect. These are conditional associations, not established causal effects.
The intercept-only model has residual degrees of freedom, and the full model has . Both imply months.
For an approximate deviance goodness-of-fit test of the full Poisson regression, compare residual deviance with . Its upper-tail p-value supplies no evidence of lack of fit. The ratio also gives no striking indication of overdispersion, though deviance per degree of freedom is only a rough dispersion check. Fitted count means around fifty make the usual chi-squared approximation plausible. Independence between months, the conditional variance-equals-mean assumption and the absence of residual structure still need diagnostics. Failure to reject is not proof that the model is correct.
The null deviance on degrees of freedom has , suggesting the constant-mean model is inadequate. In the sequential analysis of deviance for nested generalized linear models, adding temperature to that model reduces deviance by on one degree of freedom, giving . Adding precipitation after temperature reduces it by only , with . Therefore retain temperature; these data give no reason to retain precipitation after temperature. The temperature-only residual deviance is on degrees of freedom. This prediction-oriented reduced model should be refitted before reporting its coefficients: the printed temperature coefficient belongs to the full model. The Wald test results, and , broadly support the same conclusion, while the sequential deviance tests answer the stated nested-model questions.
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 4 c Solution Created 2026-10-03 Updated 2026-10-06
This is a sequential analysis of deviance for nested generalized linear models. Adding age to the intercept-only logistic regression reduces deviance by , with approximate p-value . Adding frailty to the age model reduces it by another , with p-value . Thus both variables have evidence of association with surgical success, under the model assumptions, and neither should be dropped solely on these results.
The second test assesses frailty adjusted for age, whereas the first assesses age before frailty is included. Sequential tests depend on term order. Evidence for age adjusted for frailty is additionally provided by its full-model Wald test, . Both fitted coefficients are negative: age and frailty are associated with lower fitted success probabilities. On the odds scale, one extra year at fixed frailty multiplies the odds by , and frailty at fixed age multiplies them by . These are odds ratios, not risk ratios, and an observational statistical association does not by itself establish a causal effect.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 2 b Solution Created 2026-10-03 Updated 2026-10-05
There are observations, since the intercept-only model has residual degrees of freedom. Adding price introduces one coefficient and decreases the binomial deviance by . Adding a three-level factor introduces two coefficients and decreases it by . Thus the missing entries areThe likelihood-ratio test comparing the smaller and full logistic regression tests against at least one nonzero layout contrast. Its statistic is . Under ordinary interior-parameter, full-rank and finite-estimate regularity conditions, Wilks theorem gives an asymptotic chi-squared distribution with two degrees of freedom. The reported p-value exceeds , so at that level retain the simpler price-only model.
The table is an analysis of deviance for nested generalized linear models: price is entered before layout. Thus its price row tests the price-only model against an intercept, whereas the layout row tests layout after allowing for price. The latter is the relevant comparison of model1 and model2. Failing to reject a layout effect is not proof that layouts have identical effects; it means these data do not justify the extra two parameters under this test.
Past exam of the mathematics course of the University of Cambridge 2021 ii Paper 1 13J a iii Solution Created 2026-09-24 Updated 2026-09-25
The additive model has four free coefficients: an intercept, two treatment contrasts, and one outcome contrast. The interaction model addstreatment-by-outcome interaction term, making six parameters for six cells. It is saturated, so the residual degrees of freedom fall from two to zero and the likelihood-ratio test has
The deviance reduction is , with p-value . The analysis of deviance for nested generalized linear models therefore gives overwhelming evidence against a common outcome distribution across the three groups. The observed proportions and the negative treatment--Worse interactions show that both doses reduce the chance of worsening relative to Control, with a larger reduction for LD.
Past exam of the mathematics course of the University of Cambridge 2021 ii Paper 1 13J b ii Solution Created 2026-09-24 Updated 2026-09-25
Equal LD and SD efficacy is equivalent tobecause both efficacy definitions use the same control probability. In this two-outcome table that is also equivalent to equality of the LD and SD log-odds interactions,The summary gives the two estimates and their individual standard error, but a test of their difference needsThe required covariance is absent from the displayed table, so the two separate coefficient p-values cannot test equality.
Instead, fit the equal-efficacy Poisson log-linear model. For example, create one indicator for a Worse outcome in either treated group:The reduced model has one common treated-versus-control outcome interaction, while retaining separate LD and SD main effects for their different group totals. The full model has two such interactions. Their analysis of deviance for nested generalized linear models is therefore a one-degree-of-freedom likelihood-ratio test of equal efficacy.
r
data$treated_worse <- with(data, treatment != "Control" & outcome == "Worse")
fit_equal <- glm(count ~ treatment + outcome + treated_worse,
family = poisson, data = data)
anova(fit_equal, fit2, test = "LRT") Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 4 13J ii Solution Created 2026-09-24 Updated 2026-09-25
None of the displayed one-coefficient Wald tests for
team1_form rejects at the significance level. That does not establish that formation has no effect: the relevant null hypothesis sets all nine displayed team1_form coefficients to zero simultaneously, and several individually imprecise estimates may still be jointly significant. One should compare the fitted model with the nested model omitting team1_form by an analysis of deviance for nested generalized linear models, equivalently a likelihood-ratio test of those joint restrictions. Past exam of the mathematics course of the University of Cambridge 2025 ii Paper 4 13K d Solution Created 2026-09-24 Updated 2026-09-25
The reduced model
fit3 retains malignancy but omits both site indicators. The analysis of deviance for nested generalized linear models therefore testsagainst the additive model with a site effect. The likelihood-ratio statistic is the reduction in deviance,The full model adds two parameters, so under this is approximately . Sincebut is less than the quantile , the p-value is between and ; in fact, because has survival function ,We reject the no-site-effect null at the level and find evidence that survival differs by site after adjustment for malignancy.