Chi-squared test 2026-10-14
A chi-squared test rejects a null hypothesis for a statistic whose null distribution is a chi-squared law, exactly or asymptotically. Pearson tests compare observed and expected counts; both goodness-of-fit and chi-squared tests of independence are instances.
Let a paired binary table have cells and . The uncorrected McNemar test is , while the ordinary independent-sample chi-squared test on the two marginal allele columns is . For nonzero difference and positive denominators, they coincide exactly when . Such numerical coincidence does not justify discarding pairing; altering concordant counts can change the unpaired statistic while leaving McNemar's statistic unchanged.
// Target: biology.bigb
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 29 5 a Solution Created 2026-10-03 Updated 2026-10-14
Let denote the two ordered alleles at the genetic locus. Under Hardy-Weinberg equilibrium they are independent with probabilities . Write the multiplicative penetrance as , with parameters chosen so these are valid probabilities, and set . ThenThe Bayes' theorem givesThus multiplicative penetrance preserves Hardy-Weinberg equilibrium: the affected subjects still have two independent allele draws, with tilted allele frequencies. The displayed product uses ordered allele slots. For the usual unordered genotypes, the corresponding probabilities areThe factor of two is required for heterozygotes and must not be dropped when translating the ordered notation into genotype counts.
For genetic association analysis, the case genotype probabilities factor into allele frequencies, so under this model an allelic comparison with representative population controls is appropriate; separate dominance departures are not required by the penetrance model. The ratio of case allele frequency to population allele frequency is proportional to , and relative risk multipliers satisfy . Population controls are important to this exact statement. Among specifically unaffected controls,which generally does not factor. For a rare disease it is close to the population genotype law, but no rare-disease assumption was needed for the case factorization itself. Population stratification and sampling dependence must also be addressed before using an ordinary allelic chi-squared test.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 29 5 d Solution Created 2026-10-03 Updated 2026-10-14
A case chromosome is transmitted and a pseudo-control chromosome is untransmitted. Summing the paired table by columns for cases and by rows for controls givesFor the ordinary unpaired chi-squared test of independence, the expected cells are 30,30,70,70. Its uncorrected Pearson statistic isFor the paired McNemar's test, only the discordant transmissions matter, with counts 24 and 18. ThusBoth uncorrected statistics happen to coincide and have the same approximate one-degree-of-freedom chi-squared distribution reference, giving . The data do not show persuasive transmission imbalance at the conventional 5% level.
The equality is a numerical coincidence, not a justification for ignoring pairing. To see the equality criterion for paired and unpaired allele tests, write the original matched cells as and . The unpaired marginal-table statistic iswhereas McNemar's is . Here , , and , giving equality. Changing concordant counts can change the unpaired statistic without changing McNemar's. The transmission disequilibrium test should retain its conditional paired interpretation.
If a continuity correction is used, state it explicitly: McNemar's corrected statistic is ; the corresponding Yates-corrected marginal statistic also coincides here. An exact conditional test uses and gives the two-sided probability .