= Solution
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> is
$$
\log\mu_{ij}=\lambda+\alpha_i+\beta_j,
$$
with 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 $12\times3$ month table there are $36$ cells and $1+11+2=14$ independent model parameters, so the residual <degrees of freedom> are
$$
(12-1)(3-1)=22.
$$
Since
$$
28.51836<\chi^2_{22,0.99}=40.29,
$$
\b[model 1 does not reject Month–Hospital independence at the $1\%$ level.]
After combining months into four quarters, the table is $4\times3$, giving
$$
(4-1)(3-1)=6
$$
degrees of freedom. Now
$$
17.9181>\chi^2_{6,0.99}=16.81,
$$
so \b[model 2 rejects Quarter–Hospital independence at the $1\%$ 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>.
Back to article page