Chi-Square Test for Genetic Ratios
The Chi-Square Test for Genetic Ratios
When you cross two organisms and predict a Mendelian ratio such as 3:1 or 9:3:3:1, the counts you collect commonly differ from the prediction because outcomes vary across samples.
The chi-square (χ2) goodness-of-fit test answers one question: is the mismatch small enough to be ordinary sampling noise, or large enough that the proposed ratio should be rejected?
Setting up the test
The null hypothesis H0 says the offspring were drawn from a population that follows the expected ratio, so every deviation is chance. For each phenotypic class you need the observed count O and the expected count E, where E is the class's share of the ratio multiplied by the total number of offspring scored. The statistic is
Two features of that formula do real work. Squaring the deviation removes the sign, so a shortfall and a surplus of the same size contribute equally.
Dividing by E rescales each deviation against how big a deviation that class should produce by chance: being 8 offspring short of an expected 180 is unremarkable, while being 8 short of an expected 20 is not.
Degrees of freedom equal the number of phenotypic classes minus one, never the number of individuals. Once you know the total and all but one class count, the last class is fixed, so only k−1 counts are free to vary.
Worked example
A Yy×Yy pea cross is expected to give a 3:1 ratio of yellow to green seeds. Of 120 offspring, 96 are yellow and 24 are green. Expected counts are 120×3/4=90 yellow and 120×1/4=30 green.
Class | O | E | O−E | (O−E)2/E |
|---|---|---|---|---|
Yellow | 96 | 90 | +6 | 36/90 = 0.400 |
Green | 24 | 30 | −6 | 36/30 = 1.200 |
χ2=0.400+1.200=1.600. With 2 classes, df=1, and the critical value at α=0.05 is 3.84. Because 1.600 is below 3.84, we fail to reject H0: these data are consistent with a 3:1 ratio.
Notice that the two deviations are the same size (6 offspring) but the green class contributes three times as much to χ2, purely because its expected count is smaller.
The df = 1 chi-square density is plotted against a linear chi-square axis. Its density diverges as x approaches 0, so the curve is clipped at the top edge. The dashed line marks the 0.05 critical value, and the shaded region to its right is the rejection tail.
Chi-Square Critical Values (alpha = 0.05)
Reading the decision correctly
Failing to reject is not the same as proving the ratio. It means these data do not contradict it. A different cross, a linked pair of genes, or simply a larger sample could still reveal a departure.
Conversely, rejecting H0 tells you the data are inconsistent with the proposed ratio but does not say which alternative is true, linkage, a lethal genotype, epistasis, and non-random survival of offspring can all produce the same kind of departure.
Practical rules and common mistakes
- Do not use percentages or proportions alone. Retain the sample size and either convert them to counts or use the algebraically equivalent proportion formula that includes n. The test's sensitivity comes from sample size, and converting 96 out of 120 into “80%” discards exactly that information.
- Compute df from classes, not from individuals. A four-class dihybrid cross has df=3 whether you score 80 offspring or 8,000.
- Keep enough expected counts. The usual rule of thumb is that every expected count should be about 5 or more; with smaller expected counts the tabulated critical values become unreliable.
- Carry intermediate terms at full precision. Rounding each term to two decimals before adding can shift the total by enough to matter when χ2 lands near the critical value.
A dihybrid cross designed to test independent assortment produces four distinct phenotypic classes (matching a 9:3:3:1 ratio). What degrees of freedom should be used to find the critical chi-square value on the chart?
The df = 1 chi-square density is plotted against a linear chi-square axis. Its density diverges as x approaches 0, so the curve is clipped at the top edge. The dashed line marks the 0.05 critical value, and the shaded region to its right is the rejection tail.
Chi-Square Critical Values (alpha = 0.05)
A cross expected to yield a 3:1 ratio of purple to white flowers produces 100 offspring: 80 purple and 20 white. Calculate the chi-square value for this data.
Give your answer as a number.