← Back to course

Dihybrid Crosses & the Chi-Square Test

You’ll be able to

Why a ratio needs a statistical test

A dihybrid cross AaBb × AaBb is expected to give a 9:3:3:1 phenotype ratio, but real offspring counts almost never land on those numbers exactly. Score 160 flies and you might see 84 : 34 : 28 : 14 instead of the textbook 90 : 30 : 30 : 10. The scientific question is whether that gap is just sampling chance around a true 9:3:3:1, or whether it is large enough to mean the genes are not behaving as two independently assorting Mendelian loci (they might be linked, or one genotype might be lethal). We answer it objectively with the chi-square (χ²) goodness-of-fit test. The test starts from a null hypothesis (H₀): the observed data fit the expected ratio, and any deviation is due to chance alone.

The forked-line method: getting the expected numbers

Before you can test a ratio you have to predict it. Rather than draw a 16-box (or, for three genes, 64-box) grid, use the forked-line method: solve each gene as its own monohybrid cross, then branch and multiply. For AaBb × AaBb, seed shape gives ¾ A_ and ¼ aa; each branch then splits by color into ¾ B_ and ¼ bb. Multiply along each path: ¾ × ¾ = 9⁄16, ¾ × ¼ = 3⁄16, ¼ × ¾ = 3⁄16, ¼ × ¼ = 1⁄16 → the 9:3:3:1 ratio. The same branching handles a trihybrid (AaBbCc × AaBbCc) in seconds: it produces a 27:9:9:9:3:3:3:1 ratio with no grid at all. To turn a ratio into expected counts, multiply each fraction by the total number of offspring scored.

How the chi-square test works

The test compares each observed count (O) with the expected count (E) predicted by the null hypothesis. For every category you compute (O − E)², divide by E (which scales the deviation relative to how big that category should be), and sum across all categories — that sum is χ². A χ² near 0 means observed ≈ expected (great fit); a large χ² means the data stray far from the prediction. You then compare χ² to a critical value read from a table at the 0.05 significance level using the correct degrees of freedom (df = number of categories − 1). Decision rule: if χ² < critical value, fail to reject H₀ (the fit is acceptable); if χ² ≥ critical value, reject H₀ (the deviation is too big to be chance).

Chi-square goodness-of-fit statistic
χ² = Σ (O − E)² / E
O = observed count, E = expected count. Sum the term (O − E)² / E over every phenotype category. Use raw counts, never percentages.
Degrees of freedom
df = (number of categories) − 1
A 9:3:3:1 cross has 4 categories → df = 3. A monohybrid 3:1 cross has 2 categories → df = 1. Degrees of freedom depend on the categories, NOT on the sample size.
Worked example

A dihybrid cross of pea plants is predicted to give a 9:3:3:1 phenotype ratio. Among 160 offspring the observed counts are 84 round-yellow, 34 round-green, 28 wrinkled-yellow, and 14 wrinkled-green. At the 0.05 significance level (critical value 7.815 for 3 df), do the data fit a 9:3:3:1 ratio?

  1. 1.State H₀: the offspring fit a 9:3:3:1 ratio; deviations are due to chance.
  2. 2.Compute expected counts from the total of 160: 9⁄16 × 160 = 90 round-yellow, 3⁄16 × 160 = 30 round-green, 3⁄16 × 160 = 30 wrinkled-yellow, 1⁄16 × 160 = 10 wrinkled-green. (Check: 90 + 30 + 30 + 10 = 160.)
  3. 3.Compute (O − E)² / E for each category. Round-yellow: (84 − 90)² / 90 = 36 / 90 = 0.400. Round-green: (34 − 30)² / 30 = 16 / 30 = 0.533. Wrinkled-yellow: (28 − 30)² / 30 = 4 / 30 = 0.133. Wrinkled-green: (14 − 10)² / 10 = 16 / 10 = 1.600.
  4. 4.Sum the terms: χ² = 0.400 + 0.533 + 0.133 + 1.600 = 2.67.
  5. 5.Find degrees of freedom: df = 4 categories − 1 = 3. The 0.05 critical value for 3 df is 7.815.
  6. 6.Compare: χ² = 2.67 is LESS than the critical value 7.815.
Answer: χ² = 2.67 with 3 degrees of freedom. Because 2.67 < 7.815, we fail to reject the null hypothesis: the observed counts are consistent with a 9:3:3:1 ratio, and the deviations are attributable to chance.
On the exam

The single most common χ² mistake on the AP exam is miscounting degrees of freedom. df = number of phenotype categories − 1, never the sample size. Four categories (9:3:3:1) → df = 3; two categories (3:1 or 1:1) → df = 1. Pick the wrong row of the table and a correct χ² still yields the wrong conclusion.

Checkpoint

A geneticist scores 400 offspring against an expected 9:3:3:1 ratio (four phenotype classes) and runs a chi-square test. How many degrees of freedom should be used to find the critical value?

Checkpoint

In the worked cross above, χ² = 2.67 with 3 degrees of freedom, and the 0.05 critical value is 7.815. What is the correct conclusion?

Tip

Read the decision rule as a threshold: the critical value marks the largest χ² you would tolerate as "just chance" 95% of the time. χ² below the line → fail to reject (good fit). χ² at or above the line → reject (significant deviation). A p-value below 0.05 is the same statement in probability language.

Checkpoint

A monohybrid cross expected to give 3:1 produces 130 dominant : 70 recessive among 200 offspring. The chi-square works out to χ² = 10.67 with 1 degree of freedom (0.05 critical value 3.841). What should the researcher conclude?

Answer the 3 checkpoints as you read.

Sign in to save your progress