01 / 20
$$\chi^2$$

Chi-Square Tests for
Mendelian Ratios

Learn how to use the \(\chi^2\) goodness-of-fit test to determine whether observed genetic data match the expected Mendelian ratios.

AP Biology Statistics

Why Do We Need the \(\chi^2\) Test?

When Mendel crossed two heterozygous pea plants (\(Pp \times Pp\)), he expected a \(3:1\) phenotype ratio. But real data never match perfectly: maybe he saw 787 purple and 277 white instead of a perfect 798:266.

The question is: is the difference just random chance, or is something else going on? The chi-square test gives us a mathematical way to answer that question.

Review: Mendelian Ratios

Monohybrid Cross
\(Pp \times Pp\) yields a \(3:1\) phenotype ratio and a \(1:2:1\) genotype ratio.
Dihybrid Cross
\(PpYy \times PpYy\) yields a \(9:3:3:1\) phenotype ratio across two traits.
Test Cross
\(Pp \times pp\) yields a \(1:1\) phenotype ratio, used to confirm genotype.

Observed vs Expected Values

Observed
787
Purple
277
White
Expected
798
Purple
266
White
Total \(n = 1064\)
\(\frac{3}{4} \times 1064 : \frac{1}{4} \times 1064\)

Observed values come from your experiment. Expected values are calculated from the Mendelian ratio and the total sample size: \(E = \text{ratio fraction} \times n\).

The \(\chi^2\) Formula

\(O - E\)
The deviation: how far each observed value is from its expected value.
\((O - E)^2\)
Squaring makes all deviations positive and penalises large deviations more.
\(\div\, E\)
Dividing by expected normalises the deviation relative to what was predicted.

Degrees of Freedom

Degrees of freedom (df) tell us how many categories are free to vary once the total is fixed. For a \(3:1\) monohybrid cross there are 2 categories, so \(df = 2 - 1 = 1\). For a \(9:3:3:1\) dihybrid cross there are 4 categories, so \(df = 4 - 1 = 3\).

Monohybrid (\(3:1\))
\(df = 1\)
Test cross (\(1:1\))
\(df = 1\)
Dihybrid (\(9:3:3:1\))
\(df = 3\)

The p-value and Critical Value

After computing \(\chi^2\), we compare it to a critical value from a chi-square distribution table at a significance level of \(p = 0.05\).

\(\chi^2 < \text{critical}\)
Fail to reject the null hypothesis. The data are consistent with the expected ratio: differences are likely due to chance.
\(\chi^2 > \text{critical}\)
Reject the null hypothesis. The data deviate significantly: something other than chance may explain the results.

Null vs Alternative Hypothesis

Null Hypothesis (\(H_0\)) Alternative Hypothesis (\(H_a\))
States Observed data fit the expected Mendelian ratio Observed data do not fit the expected ratio
When \(\chi^2\) is small Supported: fail to reject Not supported
When \(\chi^2\) is large Not supported Supported: reject \(H_0\)
Conclusion Differences are due to chance Differences are statistically significant

How to Perform a \(\chi^2\) Test

1
State the null hypothesis. The observed data fit the expected Mendelian ratio.
2
Calculate expected values. Multiply each ratio fraction by the total: \(E = \frac{\text{ratio part}}{\text{ratio sum}} \times n\).
3
Compute \(\chi^2\). For each category: \(\frac{(O - E)^2}{E}\), then sum all values.
4
Find degrees of freedom. \(df = \text{categories} - 1\).
5
Compare to the critical value at \(p = 0.05\). If \(\chi^2\) < critical value, fail to reject \(H_0\).

Example 1: Monohybrid Cross

A cross of \(Pp \times Pp\) produces 740 purple and 260 white offspring (total \(n = 1000\)). Does this fit a \(3:1\) ratio?

Phenotype Observed (\(O\)) Expected (\(E\)) \(\frac{(O-E)^2}{E}\)
Purple 740 750 \(\frac{(-10)^2}{750} = 0.133\)
White 260 250 \(\frac{(10)^2}{250} = 0.400\)

Example 2: Dihybrid Cross

A dihybrid cross (\(PpYy \times PpYy\)) yields 320 offspring. Expected ratio: \(9:3:3:1\).

Phenotype \(O\) \(E\) \(\frac{(O-E)^2}{E}\)
Purple, Yellow 190 180 \(\frac{100}{180} = 0.556\)
Purple, Green 55 60 \(\frac{25}{60} = 0.417\)
White, Yellow 58 60 \(\frac{4}{60} = 0.067\)
White, Green 17 20 \(\frac{9}{20} = 0.450\)

Example 3: Rejecting the Null

A cross expected to give a \(1:1\) ratio produces 120 tall and 80 short plants (\(n = 200\)).

Phenotype \(O\) \(E\) \(\frac{(O-E)^2}{E}\)
Tall 120 100 \(\frac{400}{100} = 4.00\)
Short 80 100 \(\frac{400}{100} = 4.00\)

Visualising the \(\chi^2\) Distribution

\(\chi^2\) value
Probability Density
0
2
4
6
8
10
\(df=1\)
\(df=3\)
3.84
Reject region (df=1)
Fail to reject

The dashed line marks the critical value. Values to its right fall in the reject region: the data deviate too much to be explained by chance alone.

Critical Values Reference Table

df \(p = 0.10\) \(p = 0.05\) \(p = 0.01\)
1 2.71 3.84 6.63
2 4.61 5.99 9.21
3 6.25 7.81 11.34
4 7.78 9.49 13.28

Common Mistakes

✕ Using Percentages
The \(\chi^2\) formula requires raw counts, not percentages or proportions. Always convert back to actual numbers of offspring.
✕ Wrong df
Using the number of categories instead of categories minus 1. A \(3:1\) cross has 2 categories, so \(df = 1\), not 2.
✕ Reversed Conclusion
Saying "reject" when \(\chi^2\) is less than the critical value. A small \(\chi^2\) supports the null hypothesis.

Question 1 of 5

What does the null hypothesis state in a chi-square test for a Mendelian ratio?

Question 2 of 5

A monohybrid cross produces 72 dominant and 28 recessive offspring (total \(n=100\)). The expected \(3:1\) ratio predicts 75 dominant and 25 recessive. What is \(\chi^2\)?

Question 3 of 5

For a dihybrid cross with a \(9:3:3:1\) expected ratio, how many degrees of freedom are there?

Question 4 of 5

A researcher calculates \(\chi^2 = 5.20\) for a monohybrid cross (\(df = 1\)). The critical value at \(p = 0.05\) is 3.84. What should the researcher conclude?

Question 5 of 5

Why do we square the difference \((O - E)\) in the \(\chi^2\) formula?