AP Biology - Unit 5 Heredity - Science Practice 5.C

AP Bio Chi-Square: Calculator and Practice Problems

Enter your observed and expected counts and get the chi-square value, degrees of freedom, the critical value from the AP Biology formula sheet and the conclusion. Then work through four practice problems with every step shown.

What is a chi-square test in AP Biology?

A chi-square test checks whether the difference between observed and expected results is small enough to be due to chance. Calculate χ² = Σ (O − E)²/E, find the degrees of freedom (number of categories minus one) and compare χ² with the critical value at p = 0.05 from the chi-square table on the AP Biology Equations and Formulas sheet. If χ² is greater than the critical value, reject the null hypothesis; if it is less than or equal to it, fail to reject. Chi-square is a required skill (science practice 5.C) and the formula and table are given in the exam.

Formula:
χ² = Σ (O − E)²/E
Degrees of freedom:
Categories − 1
Critical value at p = 0.05:
3.84 (df 1), 5.99 (df 2), 7.81 (df 3)
On the AP exam:
Formula and table are on the reference sheet

Chi-square calculator

Load a problem:
CategoryObservedRatio part
4 of 6 categories

Expected counts from the ratio and 160 observed: Yellow round 90, Yellow wrinkled 30, Green round 30, Green wrinkled 10.

Chi-square (χ²)

1.78

Degrees of freedom

3

Critical value

7.81

p = 0.05

Conclusion

Fail to reject the null hypothesis

1.78 is less than or equal to 7.81 (df = 3, p = 0.05). The difference between observed and expected is small enough to be explained by chance.

Step-by-step table and written conclusion

Every (O − E)²/E row of your data, and a conclusion written the way AP Biology free-response answers are scored.

CategoryOEO − E(O − E)²(O − E)²/E
Yellow round98908640.71

Step-by-step table and written conclusion

Create a free Lorea account to see the full working for your data and a conclusion you can check your own against.

Free. Your results stay on this page.

Critical values from the chi-square table on College Board's AP Biology Equations and Formulas sheet. The decision compares χ² rounded to two decimals with the table value, as you would on the exam.

Do you need to know chi-square for AP Bio?

Yes. In the official AP Biology Course and Exam Description, “Perform chi-square hypothesis testing” is science practice 5.C, part of the Statistical Tests and Data Analysis practice, and it is a suggested skill for Topic 5.3 (Mendelian Genetics) and Topic 5.4 (Non-Mendelian Genetics). The course description says students can expect to calculate a chi-square value and explain its meaning in a given scenario, and it notes that students commonly state an alternative hypothesis when the question asks for the null hypothesis.

Chi-square is not only a genetics tool. The same course description suggests it for an animal behavior lab with pill bugs in a choice chamber, and it expects you to know when chi-square is not the right test: it compares counts in categories, not measurements such as heights or rates, where means and error bars are used instead.

What you do not need to memorize: the formula and the critical values. Both are printed on the AP Biology Equations and Formulas sheet you receive in the exam. What you do need is the method: set up the null hypothesis, calculate the expected counts, find the degrees of freedom, read the right value from the table and write the conclusion.

How to do a chi-square test in biology, step by step

  1. 01

    State the null hypothesis.

    There is no significant difference between the observed and expected results; any difference is due to chance. Tie it to the variables, for example "the offspring follow a 3:1 ratio" or "pill bugs show no preference between the two sides".

  2. 02

    Calculate the expected counts.

    Multiply the total number observed by each category's share of the ratio. For a 9:3:3:1 cross with 160 offspring: 160 × 9/16 = 90, 160 × 3/16 = 30, 30 and 10.

  3. 03

    Work out (O − E)²/E for each category.

    Subtract expected from observed, square the difference, divide by expected. Squaring makes every value positive, so differences cannot cancel out.

  4. 04

    Add the values to get χ².

    χ² is the sum of the (O − E)²/E column. Round to two decimals, the precision of the table.

  5. 05

    Find the degrees of freedom.

    Number of categories minus one: 2 phenotypes give df = 1, 4 phenotypes give df = 3.

  6. 06

    Compare with the critical value and conclude.

    Use the p = 0.05 row. χ² greater than the critical value: reject the null hypothesis. χ² less than or equal: fail to reject it.

Chi-square critical value table (AP Biology formula sheet)

These are the values printed on the AP Biology Equations and Formulas sheet. Degrees of freedom are equal to the number of distinct possible outcomes minus one.

p valuedf 1df 2df 3df 4df 5df 6df 7df 8
0.053.845.997.819.4911.0712.5914.0715.51
0.016.639.2111.3413.2815.0916.8118.4820.09

Source: College Board, AP Biology Exam Reference Information (Equations and Formulas).

AP Bio chi-square practice problems

Try each problem on paper first, then open the answer. Every problem can also be loaded into the calculator above with one click, so you can check a single row of your working.

Problem 1: Dihybrid cross (9:3:3:1)

Two pea plants heterozygous for seed color and seed shape (YyRr × YyRr) produce 160 offspring: 98 yellow round, 28 yellow wrinkled, 26 green round and 8 green wrinkled. Do the data fit independent assortment?

Show the worked answer

Null hypothesis: There is no significant difference between the observed offspring and the 9:3:3:1 ratio expected if the two genes assort independently.

CategoryOE(O − E)²(O − E)²/E
Yellow round9890640.71
Yellow wrinkled283040.13
Green round2630160.53
Green wrinkled81040.40

χ² = 1.78, df = 3, critical value at p = 0.05 = 7.81. 1.78 is less than 7.81, so fail to reject the null hypothesis. The data fit the 9:3:3:1 ratio, which supports independent assortment of the two genes.

Problem 2: Monohybrid cross (3:1)

A cross between two plants heterozygous for flower color (Pp × Pp) gives 200 offspring: 135 purple and 65 white. Purple is dominant. Do the data fit a 3:1 ratio?

Show the worked answer

Null hypothesis: There is no significant difference between the observed flower colors and the 3:1 ratio expected for a monohybrid cross with complete dominance.

CategoryOE(O − E)²(O − E)²/E
Purple1351502251.50
White65502254.50

χ² = 6.00, df = 1, critical value at p = 0.05 = 3.84. 6.00 is greater than 3.84, so reject the null hypothesis. Far fewer purple and more white offspring appeared than a 3:1 ratio predicts. Chance alone is unlikely to explain this; one possibility is that white-flowered offspring survive better than purple ones.

Problem 3: Pill bug choice chamber

40 pill bugs are placed in a choice chamber with a moist side and a dry side. After 10 minutes, 29 are on the moist side and 11 on the dry side. Do pill bugs prefer one side?

Show the worked answer

Null hypothesis: Pill bugs show no preference between the moist and dry sides, so they are distributed equally (20 on each side).

CategoryOE(O − E)²(O − E)²/E
Moist side2920814.05
Dry side1120814.05

χ² = 8.10, df = 1, critical value at p = 0.05 = 3.84. 8.10 is greater than 3.84, so reject the null hypothesis. χ² = 8.10 is also above 6.63, the critical value at p = 0.01. Pill bugs are not distributed randomly: the data support a preference for the moist side.

Problem 4: Incomplete dominance (1:2:1)

Crossing two pink snapdragons (RW × RW) gives 120 offspring: 26 red, 64 pink and 30 white. Do the data fit the 1:2:1 ratio expected for incomplete dominance?

Show the worked answer

Null hypothesis: There is no significant difference between the observed flower colors and the 1:2:1 ratio expected for incomplete dominance.

CategoryOE(O − E)²(O − E)²/E
Red2630160.53
Pink6460160.27
White303000.00

χ² = 0.80, df = 2, critical value at p = 0.05 = 5.99. 0.80 is less than 5.99, so fail to reject the null hypothesis. The data fit the 1:2:1 ratio expected when the heterozygote has an intermediate phenotype.

Writing the chi-square conclusion on the free-response

A full-credit conclusion has three parts: the comparison (“χ² = 6.00 is greater than the critical value of 3.84 at df = 1 and p = 0.05”), the decision (“so we reject the null hypothesis”) and what it means in the experiment (“the offspring do not fit a 3:1 ratio, so something other than chance, such as linkage or reduced survival of one phenotype, is affecting the results”).

  • Write “fail to reject”, never “accept” or “prove” the null hypothesis.
  • Rejecting the null hypothesis does not tell you why the data differ; name a possible biological cause only as a possibility.
  • Use counts, not percentages. Chi-square on percentages gives the wrong answer.
  • When a question asks for the null hypothesis, state the “no difference” hypothesis, not your prediction.

Chi-square and Hardy-Weinberg equilibrium

The two tools meet in population genetics. The Hardy-Weinberg equilibrium equation, p² + 2pq + q² = 1, gives the genotype counts expected in a population that is not evolving; a chi-square test then checks whether the observed genotype counts differ significantly from those expectations. Hardy-Weinberg is covered in the AP Biology evolution chapter, and the inheritance patterns behind the ratios on this page are in Heredity & Genetics.

Frequently asked questions

Do you need to know chi-square for AP Bio?

Yes. The AP Biology Course and Exam Description lists "Perform chi-square hypothesis testing" as science practice 5.C and suggests it for Topics 5.3 (Mendelian Genetics) and 5.4 (Non-Mendelian Genetics). It says students can expect to calculate a chi-square value and explain its meaning in a given scenario. You do not need to memorize the formula or the critical values: both are on the AP Biology Equations and Formulas sheet you get in the exam.

Is the chi-square formula given on the AP Bio exam?

Yes. The AP Biology Equations and Formulas sheet prints χ² = Σ (o − e)²/e, the rule that degrees of freedom equal the number of distinct possible outcomes minus one, and a chi-square table with critical values for p = 0.05 and p = 0.01 at 1 to 8 degrees of freedom.

What p-value does AP Biology use for chi-square?

Use p = 0.05 unless the question gives another value. At p = 0.05 the critical values are 3.84 (1 degree of freedom), 5.99 (2), 7.81 (3), 9.49 (4) and 11.07 (5).

How do you find degrees of freedom in a chi-square test?

Count the categories (phenotypes, choice chamber sides, outcomes) and subtract one. A 3:1 monohybrid cross has 2 phenotypes and 1 degree of freedom; a 9:3:3:1 dihybrid cross has 4 phenotypes and 3 degrees of freedom.

What does fail to reject the null hypothesis mean?

Your chi-square value is at or below the critical value, so the difference between observed and expected counts can be explained by random chance. It does not prove the null hypothesis; on the AP exam write "fail to reject", not "accept".

Is this AP Bio chi-square calculator free?

Yes. The chi-square value, degrees of freedom, critical value and the reject or fail to reject decision are free with no account. The step-by-step (O − E)²/E table and the written conclusion for your own data unlock with a free Lorea account.

Can I use a calculator for chi-square on the AP Bio exam?

Yes. The Course and Exam Description allows a four-function, scientific or graphing calculator on both sections of the AP Biology exam. You still need to show the setup, so practise writing the (O − E)²/E column by hand.

Keep preparing for AP Biology

Estimate your score with the AP Bio score calculator, review terms from all units in the AP Biology game, or work through the full AP Biology study guide.

AP and Advanced Placement are registered trademarks of the College Board, which is not affiliated with and does not endorse Lorea.

Was this helpful? Rate it!

Create a free Lorea account

Turn your notes and PDFs into full AI-generated courses with quizzes, summaries, flashcards, and narrated videos — then publish, download, and share them however you like.