Lesson 6 of 8 / Practical and data skills
Test a predicted ratio with chi-squared
Is the difference from a 3:1 ratio too large to dismiss as sampling variation?
In this lesson: Apply a chi-squared goodness-of-fit test to one row of observed and expected counts.
About 8 min
The key ideaChi-squared compares category counts with a stated expectation: add (observed - expected) squared / expected for every category.
Work with the evidence
Compare the observed counts with a 3:1 expectation
Filled green bars: observed. Outlined bars: expected under 3:1. Total = 160 offspring.
| Class | O | E | (O - E) squared / E |
|---|---|---|---|
| Dominant | 124 | 120 | 0.133 |
| Recessive | 36 | 40 | 0.400 |
Chi-squared = 0.533. With 1 degree of freedom, the 5% critical value is 3.84. Do not reject the 3:1 null hypothesis at this level. Consistency does not prove the mechanism.
Explanation
Start with a null hypothesis: for example, the offspring follow a 3:1 phenotype ratio, and observed deviations arise from chance sampling under that model. Chi-squared uses counts of observations in mutually exclusive categories, not means, percentages or arbitrary measured lengths. Observations should be independent and expected counts sufficiently large for the approximation; at this level, use categories with expected counts of at least 5.
Calculate expected counts from the predicted ratio and the observed total. For 160 offspring under 3:1, the expected counts are 120 and 40. If the observations are 124 and 36, the contributions are (124 - 120) squared / 120 and (36 - 40) squared / 40. Their sum is approximately 0.533.
For the specified one-row goodness-of-fit test with a fixed predicted ratio, degrees of freedom are the number of categories minus 1. Two categories give 1 degree of freedom. At the 5% significance level, the critical chi-squared value for 1 degree of freedom is about 3.84. Compare the calculated value with the appropriate supplied table entry.
A value below the critical value means there is insufficient evidence to reject the null hypothesis at that level. The results are consistent with the proposed ratio; this does not prove the ratio or its genetic mechanism. A larger-than-critical value supports rejecting this particular ratio model, but does not automatically identify the correct alternative.
A significance level is a decision threshold chosen before interpreting the result. A p-value concerns the probability of results at least as discrepant, assuming the null model is true. It is not the probability that the null hypothesis itself is true, and it is not the percentage of observations that are wrong.
Step by step
- 1
State the null and expectations
Convert the predicted proportions into expected counts using the observed total.
- 2
Calculate each contribution
Square O - E, divide by E, and add across categories.
- 3
Use the correct table entry
Choose degrees of freedom and significance level, then state a conclusion in context.
Worked example
Work through the evidence
For 124 dominant and 36 recessive offspring, test a proposed 3:1 ratio at the 5% level. Critical value at 1 degree of freedom: 3.84.
One way to explain it
Expected counts are 120 and 40. Chi-squared = 16/120 + 16/40 = 0.533. Since 0.533 is less than 3.84, do not reject the 3:1 null hypothesis at 5%. The data are consistent with this ratio, without proving its mechanism.
Why this answer works
- Calculate expectations from all 160 offspring.
- Use two categories minus one for degrees of freedom.
- Make a bounded conclusion rather than accepting the model as proven.
Is this true? "A non-significant result proves the predicted genetic mechanism is correct."
Different mechanisms can produce the same ratio, and a test may have limited ability to detect a difference. Non-significance means insufficient evidence against the specified null model.