Skip to content

The chi-square test

State a null hypothesis for a genetic cross, calculate expected counts and chi-square from observed counts, and decide whether to reject the null using degrees of freedom and the critical value.

It opens on

Mendel counted 315, 108, 101 and 32 peas in a dihybrid cross; a 9 : 3 : 3 : 1 ratio of 556 peas would be 312.75, 104.25, 104.25 and 34.75. Close, but not equal. How close is close enough to say the model fits?

Why it matters

AP Biology asks you to decide whether offspring counts fit a predicted ratio, to write the null in the words of the experiment, and to say "fail to reject" or "reject" with the numbers to back it (CED 5.3 and 5.4, skill 5.C).

Good to know first

  • Dihybrid crosses (two heterozygous parents give 9 : 3 : 3 : 1)
  • probability in genetics (an expected count is a fraction of the total)
  • percent and ratio arithmetic

Step by step

  1. Null hypothesis and expected counts

    State the null hypothesis for a cross in the words of the experiment and turn a ratio into expected counts.

    Expected counts are the ratio times the total: 160 x 9/16 = 90, then 160 x 3/16 = 30, 30 and 160 x 1/16 = 10.

    A common mix-up

    Chi-square can be calculated with percentages or ratios.

    In fact: Convert each expected ratio into an expected count by multiplying by the total; use counts for o and e.

  2. The chi-square statistic

    Calculate chi-square as the sum of (o - e)² / e over all classes and explain why each term is scaled by e.

    A is 25/90 = 0.28; B is 0/30 = 0; C is (25 - 30)² / 30 = 25/30 = 0.83; D is 0/10 = 0.

    A common mix-up

    Chi-square can be calculated with percentages or ratios.

    In fact: The formula needs counts, so o and e are numbers of offspring, never percentages or the ratio.

  3. Degrees of freedom and the decision

    Find the degrees of freedom, compare chi-square with the critical value at p = 0.05, and state the decision as reject or fail to reject.

    The flies have chi-square 1.11 and the critical value for df 3 is 7.81; 1.11 is less than 7.81.

    A common mix-up

    A chi-square below the critical value proves the null hypothesis true.

    In fact: Say "fail to reject": the data are consistent with the null, which is not proof; also df is classes minus 1, not offspring minus 1.

Try it

A 3 : 1 cross has 200 offspring. State the expected counts and the null hypothesis in words.Answer

Expected 150 and 50; the offspring fit 3 : 1 and any deviation is due to chance

Hint: Multiply each fraction by the total

A class has e = 50 and o = 40. Find its term.Answer

(40 - 50)² / 50 = 100/50 = 2

Hint: Square the deviation, then divide by e

A cross with 3 phenotype classes gives chi-square 4.2. Decide, using 5.99.Answer

Df = 2; 4.2 is less than 5.99, so fail to reject the null

Hint: Df is the classes minus 1

A student writes "the null is that the genes are linked." What is wrong?Answer

The null says no difference from 9 : 3 : 3 : 1; linkage would be an alternative.

Which is the bigger surprise, 5 off an expected 90 or 5 off an expected 10?Answer

5 off 10; it is half of what was expected.

The chi-square test

30 minutes every month. No card.