How to use the simulator
- Preset cross menu. Pick Monohybrid 3:1 (2 classes), Incomplete dom. 1:2:1 (3 classes) or Dihybrid 9:3:3:1 (4 classes). Choosing a preset loads its category names and sample observed counts, and calculates the expected counts from the ratio.
- Observed and Expected columns. Every count is a number box you can edit. Type in the counts from a lab or an exam question and the results update as you type.
- Fill expected from ratio button. Rescales the selected preset's ratio to the total of your current observed counts and rewrites the Expected column, rounded to two decimal places. Click it each time you change the observed numbers, so that the expected counts add up to the same total.
- statistic, to three decimal places
- degrees of freedom: the number of categories with an expected count above zero, minus 1
- critical value (=0.05): the table value for that df (the simulator shows 3.841, 5.991 and 7.815, which the AP table rounds to 3.84, 5.99 and 7.81)
- A verdict bar that reads either REJECT the hypothesis (deviation is significant) or FAIL TO REJECT (deviation likely due to chance)
The formula
- is the observed count in a category and is the expected count in that category.
- Calculate for each category, then add all of them together.
- Expected counts come from the hypothesis: (total observed) (that category's fraction of the ratio). For a 9:3:3:1 ratio, the fractions are 9/16, 3/16, 3/16 and 1/16.
- Degrees of freedom: .
Worked example
A_B_:
A_bb:
aaB_:
aabb:
A_B_:
A_bb:
aaB_:
aabb:
Common mistakes on the AP exam
- Using percentages or ratios instead of counts. Chi-square only works with raw counts. Entering 76 and 24 (percent) when the real counts were 152 and 48 gives the wrong .
- Wrong degrees of freedom. df is the number of categories minus 1, not the number of offspring minus 1. A dihybrid cross with four phenotype classes has df = 3.
- Dividing by O instead of E. The denominator is always the expected count.
- Forgetting to square, or squaring the sum. Square each on its own, divide by E, and only then add. The plain differences always add up to zero.
- Saying the hypothesis is "proven" or "accepted." A low means you fail to reject the null hypothesis. It does not prove the hypothesis is true.
- Stating a conclusion without the comparison. Free-response answers should give the value, the df, the critical value, the comparison (for example ) and what it means biologically.