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.