5.3 to 5.4 Testing ratios with chi-squareIs it chance, or is it real?

Start with a null hypothesis: a statement that there is no real difference between what you observed and what your model predicts, so any difference is due to random chance. In genetics, the model is usually a Mendelian ratio. The null hypothesis might be: there is no statistically significant difference between the observed counts and the counts expected from a 3 : 1 ratio.
?Wait, what's a null hypothesis again?
The test has four parts. First, use the predicted ratio and the total number of offspring to get the expected count (e) for each category. Second, compute $\chi^2 = \sum \frac{(o - e)^2}{e}$, one term for each category, where o is the observed count. Third, find the degrees of freedom: df = number of categories − 1. Fourth, compare $\chi^2$ to the critical value for that df at p = 0.05 from the formula sheet.
| p | df 1 | df 2 | df 3 | df 4 | df 5 |
|---|---|---|---|---|---|
| 0.05 | 3.84 | 5.99 | 7.81 | 9.49 | 11.07 |
| 0.01 | 6.63 | 9.21 | 11.34 | 13.28 | 15.09 |
The decision rule: if $\chi^2$ is greater than the critical value, reject the null hypothesis; the difference is statistically significant and probably not due to chance alone. If $\chi^2$ is less than or equal to the critical value, fail to reject the null hypothesis; the data are consistent with the predicted ratio. A bigger $\chi^2$ means a bigger gap between data and prediction.
?Wait, what does p = 0.05 mean?
| Phenotype | o | e | (o - e)² / e |
|---|---|---|---|
| purple | 412 | 420 | 64 / 420 = 0.15 |
| yellow | 148 | 140 | 64 / 140 = 0.46 |
| total | 560 | 560 | χ² = 0.61 |
- (a) Null: there is no statistically significant difference between the observed counts and those expected from a 3 : 1 ratio (Pp × Pp). Any difference is due to chance.
Why?
Write the null as "no significant difference". Writing the alternative instead is a classic lost point. - (b) Total = 412 + 148 = 560. Expected: 3/4 × 560 = 420 purple and 1/4 × 560 = 140 yellow.
Why?
Expected values are counts, never percentages or ratios. - $\chi^2 = \frac{(412 - 420)^2}{420} + \frac{(148 - 140)^2}{140} = \frac{64}{420} + \frac{64}{140} = 0.15 + 0.46 = 0.61$.
Why?
Square each difference before dividing, so the minus sign disappears. - (c) Two categories, so df = 2 − 1 = 1. Critical value at p = 0.05: 3.84.
- (d) 0.61 < 3.84, so fail to reject the null hypothesis. The data are consistent with a 3 : 1 ratio, which supports both parents being heterozygous with purple dominant.
Why?
Conclusions need the comparison, the decision and what it means for the biology.
Answer: χ² = 0.61, df = 1, critical value 3.84. 0.61 < 3.84, so fail to reject the null: the data fit 3 : 1.
Stuck? Get a hint
- Expected = fraction from the ratio × the total count.
- One (o − e)² / e term per category, then add.
- df = categories − 1. Compare χ² to the table value, not to 0.05.
I thought about it. Show me
Mendel's own numbers make a nice test. In his dihybrid cross of round yellow peas, he counted 315 round yellow, 108 round green, 101 wrinkled yellow and 32 wrinkled green seeds. Are those consistent with 9 : 3 : 3 : 1?
| Seed type | o | e (9:3:3:1) | (o - e)² / e |
|---|---|---|---|
| round, yellow | 315 | 312.75 | 0.016 |
| round, green | 108 | 104.25 | 0.135 |
| wrinkled, yellow | 101 | 104.25 | 0.101 |
| wrinkled, green | 32 | 34.75 | 0.218 |
| total | 556 | 556 | χ² = 0.470 |
- Null: no significant difference between the observed counts and those expected from 9 : 3 : 3 : 1.
- Total = 556. Expected: 9/16 × 556 = 312.75, 3/16 × 556 = 104.25 (twice), 1/16 × 556 = 34.75.
Why?
Expected counts can be decimals. Don't round them to whole numbers before you calculate. - Terms: 0.016 + 0.135 + 0.101 + 0.218, so χ² = 0.470.
- Four categories: df = 3, critical value 7.81. 0.470 < 7.81, so fail to reject the null. The data are consistent with independent assortment.
Answer: χ² = 0.470 < 7.81 (df = 3): fail to reject. The genes for seed shape and color assort independently.
Stuck? Get a hint
- The four expected fractions are 9/16, 3/16, 3/16 and 1/16.
- Keep the decimals in the expected counts.
- Four categories gives df = 3.
- Aχ² = 1.6, which is less than 5.99, so fail to reject the null.
- Bχ² = 1.6, which is less than 3.84, so reject the null.
- Cχ² = 1.6, which is greater than 0.05, so reject the null.
- Dχ² = 3.2, which is greater than 3.84, so reject the null.
Show the answer
A. Expected: 80, 160, 80. χ² = 64/80 + 0/160 + 64/80 = 1.6. Three categories give df = 2 and a critical value of 5.99, and 1.6 < 5.99, so fail to reject. Comparing χ² to 0.05 is the top trap: 0.05 only tells you which row of the table to read.

Never write "accept the null" or "the null is proven". Write "fail to reject the null hypothesis". And when the question asks for the null, start with "There is no statistically significant difference between..." so you can't write the alternative by accident.
- Null hypothesis: no significant difference between observed and expected; differences are due to chance.
- χ² = Σ (o − e)² / e, using counts. df = categories − 1. Critical value at p = 0.05 from the sheet.
- χ² > critical value: reject the null. χ² ≤ critical value: fail to reject.
- State the conclusion in biology words: the data do or do not support the proposed inheritance pattern.