Braineos
Sign in
← Back to decks
Sign in to save your progress, vote, and build your own decks.Sign in

AP Biology Exam Skills: Chi-Square Test

Chi square AP Biology guide: the null hypothesis, expected values, the formula, degrees of freedom and the p = 0.05 critical values on the formula sheet. Practice deciding when to reject or fail to reject the null with genetics crosses and a pill bug choice experiment. AP is a trademark registered by the College Board, which is not affiliated with Braineos and doesn't endorse it.

22 cards·by Ms. Fern
Study this deckPlay Tower Defense

Chi-square: is the difference just chance?

In this lesson · 8 sections

In 1900, the statistician Karl Pearson published a way to measure how far a set of observed counts strays from the counts a hypothesis predicts. In 1936, Ronald Fisher used that kind of reasoning on Mendel's pea data and argued the results fit the predicted ratios more closely than chance usually allows. Historians still disagree about what, if anything, that says about Mendel. The question behind it is the one you'll answer on the exam: is the gap between what you saw and what you expected just chance? Let's look closer.

What the test asks

The chi-square goodness-of-fit test compares observed counts with expected counts. You'll use it most in Unit 5 (heredity), but it works for any count data sorted into categories, such as animal behavior in Unit 8.

Start with the null hypothesis: there is no statistically significant difference between observed and expected results; any difference is due to chance. In a cross, it usually says the offspring fit a predicted ratio, such as 3:1.

Expected values

Expected values come from the hypothesis, not from the data. Multiply the total number observed by the fraction each category should get.

  • 3:1 ratio with 160 offspring: 3/4 × 160 = 120 and 1/4 × 160 = 40.
  • 9:3:3:1 ratio: 9/16, 3/16, 3/16 and 1/16 of the total.
  • No preference between two choices: half the total in each.

Always use raw counts. Percentages give the wrong answer.

Using the formula sheet

The College Board gives you an equations and formulas sheet on the exam. It has the chi-square formula, χ² = Σ (o − e)² / e (o is observed, e is expected), and a table of critical values. Your job is knowing how to use them.

  1. For each category, subtract expected from observed, square it, then divide by expected.
  2. Add those numbers up. That sum is χ².
  3. Find the degrees of freedom: number of categories minus 1.
  4. In the table, go to the p = 0.05 row and your degrees of freedom column. At p = 0.05 the critical values are 3.84 for 1 degree of freedom, 5.99 for 2, 7.81 for 3 and 9.49 for 4, and the table runs to 8. There's also a p = 0.01 row; use p = 0.05 unless a question tells you otherwise.

Reject or fail to reject

  • χ² greater than the critical value: reject the null hypothesis. A difference this large would happen by chance less than 5% of the time if the null were true, so something else is probably going on.
  • χ² less than the critical value: fail to reject the null hypothesis. The difference can be explained by chance.

Worked examples (made-up data)

A monohybrid cross. An F2 generation has 112 purple-flowered and 48 white-flowered plants. Expected for 3:1: 120 and 40. χ² = 64/120 + 64/40 = 0.53 + 1.60 = 2.13. With 1 degree of freedom, 2.13 < 3.84: fail to reject. The data are consistent with 3:1.

A dihybrid test cross. A test cross is expected to give four phenotypes in a 1:1:1:1 ratio. Of 200 offspring, the counts are 82, 78, 21 and 19, against 50 each expected. χ² = 20.48 + 15.68 + 16.82 + 19.22 = 72.2. With 3 degrees of freedom, 72.2 > 7.81: reject. Two classes are far too common, which suggests the genes are linked.

Pill bugs in a choice chamber. Of 40 pill bugs, 28 move to the wet side and 12 to the dry side. Null: no preference, so 20 each. χ² = 64/20 + 64/20 = 6.4. With 1 degree of freedom, 6.4 > 3.84: reject. The pill bugs probably prefer the wet side.

Common mistakes students make

  • Saying "accept the null" or "prove the hypothesis". You either reject it or fail to reject it.
  • Writing the alternative as the null. The null always says there's no significant difference.
  • Using the number of categories as degrees of freedom. Subtract 1.
  • Forgetting to divide by expected, or dividing by observed instead.
  • Using percentages instead of counts.

Frequently asked questions

How do you calculate chi-square in AP Biology?

For each category, compute (observed − expected)² / expected, then add the results. Compare the total with the critical value for your degrees of freedom at p = 0.05.

What does fail to reject the null hypothesis mean?

Your chi-square value is below the critical value, so the difference between observed and expected could be due to chance. It doesn't prove the null is true.

How do you find degrees of freedom for chi-square?

For a goodness-of-fit test, subtract 1 from the number of categories. A 9:3:3:1 cross has four phenotype classes, so 3 degrees of freedom.

Do you have to memorize the chi-square table?

No. The table is on the formula sheet; practice reading the right row and column.

Try it

Say each answer before you flip the card. Then predict: what would you expect to see if you ran the pill bug test with only 10 animals, 7 on the wet side and 3 on the dry side?

AP is a trademark registered by the College Board, which is not affiliated with Braineos and doesn't endorse it.

Quiz me on this
Chi-square goodness-of-fit test
Null hypothesis (chi-square)
Alternative hypothesis (chi-square)
Chi-square formula
Observed value (o)
Expected value (e)
How to find expected values for a 3:1 ratio
Expected fractions for a 9:3:3:1 ratio
Degrees of freedom (goodness of fit)
Critical value
p = 0.05 critical values for df 1 to 4
Chi-square value greater than the critical value
Chi-square value less than the critical value
Why not say "accept the null hypothesis"?
p = 0.05
Why use counts, not percentages?
What a large chi-square value means