χ² = Σ (observed − expected)² / expected. Compare it with the critical value for (categories − 1) degrees of freedom at p = 0.05: larger means reject the expected ratio.
In Dihybrid Crosses you predicted a 9 : 3 : 3 : 1 ratio. Real offspring never match a ratio exactly. Is a small miss just chance, or a sign that the genes do not behave as you assumed? The chi-square ($\chi^2$) goodness-of-fit test answers that, using the null hypothesis that the data fit the expected ratio.
🔑 Key idea
$$\chi^2 = \sum \frac{(o - e)^2}{e}$$ with $o$ the observed count and $e$ the expected count in each category. Degrees of freedom = categories − 1. If $\chi^2$ is larger than the critical value for $p = 0.05$, reject the expected ratio.
Critical values of chi-square at p = 0.05 (from the AP Biology formula sheet).
Degrees of freedom
1
2
3
4
5
Critical value (p = 0.05)
3.84
5.99
7.81
9.49
11.07
💡 Why it works
Each term asks how far a category missed, compared with what we expected there. Squaring makes every miss count as positive. Dividing by $e$ scales the miss: being off by 10 matters a lot when you expected 20, and little when you expected 2,000. Why one less than the number of categories? Once the total is fixed, the last category is decided by the others, so only $k - 1$ categories are free to vary.
Worked examples
✏️ Worked example: Two categories
A cross of two heterozygous pea plants gives 400 offspring: 290 purple and 110 white. Do they fit 3 : 1?
Expected: 3/4 of 400 = 300 purple; 1/4 of 400 = 100 white.
Purple: $(290 - 300)^2/300 = 100/300 = 0.33$.
White: $(110 - 100)^2/100 = 100/100 = 1.00$.
$\chi^2 = 0.33 + 1.00 = 1.33$, with 2 − 1 = 1 degree of freedom.
1.33 < 3.84.
Answer: Fail to reject: the data fit 3 : 1. The difference is small enough to be chance.
✏️ Worked example: A dihybrid cross
A dihybrid cross gives 160 offspring: 78, 36, 34 and 12 in the four phenotype classes. Test the 9 : 3 : 3 : 1 ratio.
$\chi^2 = 1.60 + 1.20 + 0.53 + 0.40 = 3.73$, with 4 − 1 = 3 degrees of freedom.
3.73 < 7.81.
Answer: Fail to reject: the data are consistent with independent assortment (9 : 3 : 3 : 1).
Observed and expected counts for the dihybrid example.Where 9 : 3 : 3 : 1 comes from.
⚠️ Common mistake
Three common slips. Using percentages instead of counts (the test needs counts; 10% of 1,000 is far stronger evidence than 10% of 10). Dividing by the observed count instead of the expected one. And using the number of categories as the degrees of freedom instead of one less. Check: your expected counts must add up to the same total as the observed ones.
Practice
Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.