AP Biology Chi-Square: A Worked Example with Mendel’s Pea Data

The chi-square test has only a few steps, but each step has a typical mistake. This example uses the seed counts that Gregor Mendel reported in 1866.

The data and the question

In the second generation of a cross between pea plants with round seeds and pea plants with wrinkled seeds, Mendel counted 5,474 round seeds and 1,850 wrinkled seeds. Do these counts agree with the 3:1 ratio expected for one gene with a dominant allele and a recessive allele?

The null hypothesis is that there is no significant difference between the observed counts and the counts expected from a 3:1 ratio. Any difference is due to chance.

Calculate the expected counts

The total is 5474+1850=73245474+1850=7324 seeds. The expected number of round seeds is 34×7324=5493\frac{3}{4}\times 7324=5493. The expected number of wrinkled seeds is 14×7324=1831\frac{1}{4}\times 7324=1831.

Mistake to avoid: do not use percentages or ratios in the formula. The chi-square formula needs counts. The expected counts must add up to the same total as the observed counts: 5493+1831=73245493+1831=7324.

Calculate chi-square

The formula is χ2=∑(O−E)2E\chi^2=\sum\frac{(O-E)^2}{E}, where OO is an observed count and EE is an expected count.

Round seeds: (5474−5493)25493=3615493≈0.066\frac{(5474-5493)^2}{5493}=\frac{361}{5493}\approx 0.066. Wrinkled seeds: (1850−1831)21831=3611831≈0.197\frac{(1850-1831)^2}{1831}=\frac{361}{1831}\approx 0.197.

Add the two terms: χ2≈0.066+0.197=0.263\chi^2\approx 0.066+0.197=0.263. Mistakes to avoid: divide by the expected count, not the observed count, and square each difference before dividing.

Compare with the critical value

The degrees of freedom are the number of categories minus one. There are two categories, round and wrinkled, so there is 2−1=12-1=1 degree of freedom. The number of seeds does not matter for this step.

The table on the AP Biology equations and formulas sheet gives a critical value of 3.843.84 for p=0.05p=0.05 and one degree of freedom. The calculated value, 0.2630.263, is smaller than 3.843.84.

State the conclusion correctly

Because the calculated value is smaller than the critical value, we fail to reject the null hypothesis. The difference between the observed counts and a 3:1 ratio can be explained by chance.

Do not write that the test “proves” the 3:1 ratio or that the hypothesis is “accepted”. The correct statements are “fail to reject the null hypothesis” and “the data are consistent with a 3:1 ratio”. If the calculated value were larger than the critical value, the null hypothesis would be rejected, and you would look for a biological reason, such as linked genes or a different pattern of inheritance.

Repeat the steps with another cross

Try the same five steps on a cross with four phenotype categories, where there are three degrees of freedom. If one step keeps going wrong, bring your work to a tutoring conversation.

Explore AP tutoring · Ask about tutoring

Based in Massachusetts, USA. Tutoring is online.

Independent SAT and AP preparation. SAT and AP are trademarks of the College Board, which does not sponsor or endorse this site.