Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 38 2 Solution Created 2026-10-03 Updated 2026-10-14
The prose names a second year that differs from the table label. The calculations use the four supplied counts, interpreting the first and second rows as the two displayed periods; no numerical conclusion depends on resolving that label discrepancy.
The first generalized linear model treats the four counts as independent Poisson random variables, with a log link and both row and column regression factors. The row-by-column interaction makes the log-linear model saturated. With , writeIts four maximum-likelihood fitted values equal the observed counts. Thus , , , andThe interaction is the log odds ratio measuring association of row and column. Under independent Poisson sampling, the delta-method variances are for the intercept, for the row contrast, for the column contrast, and for the interaction. Their square roots reproduce the printed standard errors. Although the software labels the standardized ratios as t values, these are asymptotic normal Wald statistics, with known Poisson dispersion one, not exact finite-df Student tests.
The statistical saturated model has zero residual deviance and zero residual degrees of freedom; this is a perfect interpolation, not evidence of predictive adequacy. The null deviance compares the four observed counts with an intercept-only model, whose four fitted means are . Fisher scoring is the numerical score/information iteration used to fit the model; the iteration count is a convergence report, not a test statistic.
Dropping the interaction gives the independence log-linear model for a two-way contingency table, . Its Poisson regression margin-matching score equations match the row and column totals, soHere and denote the observed row and column totals. In particular the fitted row multiplier is , the column multiplier is , and the intercept is . These produce the second coefficient table. Their standard errors follow from the inverse Fisher information matrix; for the row and column contrasts their squared values are and , while the intercept variance is .
The Poisson deviance relative to the saturated fit isThe linear terms cancel because fitted and observed totals agree. The additive model has three coefficients, leaving one degree of freedom. Wilks theorem calibrates this likelihood-ratio test approximately by , giving . The interaction Wald test instead gives ; the two are only asymptotically equivalent.
Fisher's exact test conditions on both margins under independence. If is the upper-left count, thenIts usual two-sided p-value sums the probabilities of all tables no more probable than the observed . That sum is , reproducing the output without an asymptotic approximation. It tests the same absence of row-column association, but conditioning and discreteness explain the numerical difference from the likelihood-ratio test.
In ordinary language, the male proportion among the cases is in the first row and in the second. The estimated case-sex odds ratio is , but its approximate 95-percent confidence interval is wide, . These small samples do not give convincing evidence that the sex composition of cases changed between the two periods. Failure to reject is not evidence that the compositions are exactly equal. Nor do these counts establish a male-to-female disease-incidence ratio or an incidence trend: population denominators and comparable ascertainment would be needed for those interpretations.
Past exam of the mathematics course of the University of Cambridge 2018 ib Paper 3 20H Solution Created 2026-09-24 Updated 2026-10-03
Under the null hypothesis that treatment and recovery are independent, estimate each expected cell count byand form the Pearson chi-squared test of independence statistic . For a table its asymptotic null law is a chi-squared distribution with one degree of freedom. A second-order Taylor expansion of the generalized likelihood-ratio test statistic around the fitted counts gives this Pearson statistic, which explains its asymptotic null distribution.
Writing the four residuals over their fitted counts and simplifying givesFor ,whose one-degree-of-freedom p-value is about . There is no evidence of an effect. One fitted count is only , however, so the chi-squared approximation is questionable; Fisher's exact test would be preferable.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 221 1 iii Solution Created 2026-09-24 Updated 2026-10-03
Cross-classify the binary exposure against the binary outcome . The four cells count placebo survivors or deaths and active-treatment survivors or deaths.
Under the sharp causal null hypothesis, every observed outcome equals the fixed value , regardless of assignment. With fixed arm sizes, the active set is a uniformly chosen subset of size . Under independent assignment, are independent Bernoulli variables with probability , and conditioning on their total again makes the active set uniform. Conditional on the table margins, the active-group outcome count therefore has exactly the hypergeometric distribution used by Fisher's exact test.
The conditional p-value is super-uniform for every set of margins. The law of total probability then givesHence the test is valid under either assignment mechanism.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 221 1 ii Solution Created 2026-09-24 Updated 2026-09-25
For a two-by-two contingency table, Fisher's exact test conditions on both row totals and both column totals. Under the null of no association, the upper-left count then has the hypergeometric distributionwhere and are the first row and column totals. A one-sided p-value sums the appropriate hypergeometric tail; a common two-sided p-value sums the probabilities of all feasible tables no more likely under the null than the observed table. Because the conditional distribution is discrete, the p-value is super-uniform random variable rather than generally exactly uniform.