Past exam of the mathematics course of the University of Cambridge 2004 ib Paper 2 10H Solution Created 2026-09-24 Updated 2026-09-24
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 2021 ib Paper 2 6H Solution Created 2026-09-24 Updated 2026-09-25
Under the null hypothesis of independence between treatment and outcome, the expected counts in each treatment row are one half of the column totals:The Pearson chi-squared test of independence statistic isThe number of degrees of freedom isAt the 5% level the critical value is . Since , we reject the null hypothesis and find statistically significant evidence that the drug and placebo have different effects.
For observed counts and positive expected counts in a contingency table, the statistic is . Under common category probabilities or statistical independence, estimate by the product of the row and column totals divided by the grand total. With large expected counts, this gives the test statistic for the Pearson chi-squared test of homogeneity or the Pearson chi-squared test of independence, with asymptotic chi-squared distribution on degrees of freedom.
Pearson chi-squared test of homogeneity 2026-10-06
The Pearson chi-squared test of homogeneity tests whether several independent categorical samples have the same category probabilities. Under the null, expected cell counts equal the product of the corresponding row and column totals divided by the total sample size. The Pearson chi-squared statistic for contingency tables has an asymptotic chi-squared distribution with degrees of freedom, when expected counts are sufficiently large. The sampling design differs from a Pearson chi-squared test of independence, though the statistic has the same form.