Loading
The essential statistical test that determines whether observed genetic ratios match theoretical predictions from Mendelian inheritance.
When Gregor Mendel published his groundbreaking work on pea plant inheritance in 1866, he reported remarkably clean ratios: 3:1 phenotype ratios in monohybrid crosses and 9:3:3:1 ratios in dihybrid crosses. But in reality, biological experiments rarely produce results that perfectly match theoretical predictions. Seeds may fail to germinate, organisms may die before phenotyping, and chance variation is always present. The fundamental question that emerged was: how do we know if our experimental results are "close enough" to the predicted ratio, or if they reveal something genuinely unexpected about the underlying genetics?
This question demanded a statistical tool — one that could rigorously evaluate whether deviations between observed and expected results were simply due to random chance or were statistically significant, suggesting that the genetic model being tested was incorrect. The answer came from the chi-square (χ²) goodness-of-fit test, a method that became indispensable in genetics and remains one of the most widely used statistical tests in biology to this day.
The gap that chi-square analysis fills is deceptively simple yet profoundly important: it transforms a subjective judgment ("these numbers look about right") into an objective, quantifiable decision with a defined confidence level. Without it, genetics would lack the statistical rigor necessary to distinguish real biological phenomena from random noise.
The chi-square (χ²) goodness-of-fit test is built upon several interconnected concepts. Understanding each of them is essential before performing the calculation itself. At its heart, the test asks one question: Is the difference between what we observed and what we expected small enough to be explained by chance alone?
The chi-square analysis follows a clear, stepwise process. The diagram below illustrates the complete workflow from forming a hypothesis through to interpreting the result. Each stage feeds directly into the next, and understanding this flow will help you execute the test confidently on any genetics problem.
Notice that the workflow is fundamentally a comparison. You calculate a single number — the χ² statistic — and compare it to a critical value from a reference table at a chosen significance level (almost always p = 0.05). If your calculated χ² is smaller than the critical value, the differences are attributable to chance and you fail to reject the null hypothesis — your data are consistent with the genetic model. If χ² exceeds the critical value, the deviations are too large to be explained by chance alone, and you reject the null hypothesis.
A crucial nuance: "failing to reject H₀" is not the same as "proving H₀ is true." The test can only tell you whether the data are consistent with the model, not that the model is certainly correct. There could be other models that also fit the data.
The chi-square goodness-of-fit test uses a deceptively simple formula. Each phenotype category contributes a term to the overall statistic, and the sum of these terms tells you how far your observed data stray from the expected distribution.
Let's unpack each component of this formula. The term (O − E) is the deviation — the raw difference between what you observed and what the model predicted. This is squared, (O − E)², for two reasons: it eliminates negative signs (so positive and negative deviations don't cancel each other out), and it amplifies larger deviations more than smaller ones. Finally, dividing by E normalizes the deviation relative to the expected count, because a difference of 10 means very different things when E = 20 versus E = 1000.
The expected values must always be calculated from the total number of organisms in your study and the proportions predicted by the genetic model. For example, in a 9:3:3:1 dihybrid ratio with 160 total offspring, the expected values would be: 160 × 9/16 = 90, 160 × 3/16 = 30, 160 × 3/16 = 30, and 160 × 1/16 = 10.
Degrees of freedom account for the constraint that the expected values must add up to the total sample size. Once you know all but one of the expected values, the last one is automatically determined. A monohybrid cross has two phenotype categories, so df = 2 − 1 = 1. A dihybrid cross with four phenotype categories has df = 4 − 1 = 3. The degrees of freedom determine which row of the chi-square critical value table you use for interpretation.
After calculating your χ² statistic, you need a reference table to determine whether the value is large enough to reject the null hypothesis. The table below shows critical values at several probability levels for degrees of freedom commonly encountered in genetics problems. The p = 0.05 column is the most commonly used threshold — it represents a 5% chance that deviations this large (or larger) would occur by random chance alone.
| df | p = 0.90 | p = 0.50 | p = 0.10 | p = 0.05 | p = 0.01 | p = 0.001 |
|---|---|---|---|---|---|---|
| 1 | 0.016 | 0.455 | 2.706 | 3.841 | 6.635 | 10.828 |
| 2 | 0.211 | 1.386 | 4.605 | 5.991 | 9.210 | 13.816 |
| 3 | 0.584 | 2.366 | 6.251 | 7.815 | 11.345 | 16.266 |
| 4 | 1.064 | 3.357 | 7.779 | 9.488 | 13.277 | 18.467 |
| 5 | 1.610 | 4.351 | 9.236 | 11.070 | 15.086 | 20.515 |
To read this table, locate your degrees of freedom in the left column and move across to the p = 0.05 column. This gives you the critical value. If your calculated χ² is less than this critical value, you fail to reject H₀ and conclude that the data are consistent with the predicted ratio. If your χ² is greater than the critical value, you reject H₀ — the data deviate significantly from the prediction.
The chi-square distribution is right-skewed — it starts at zero and extends infinitely to the right. Higher degrees of freedom shift the peak of the curve to the right and make the distribution wider. The shaded rejection region in the right tail represents the area where only 5% of random samples would fall if the null hypothesis were true. This is why exceeding the critical value is strong evidence against H₀.
A biologist crosses two heterozygous purple-flowered pea plants (Pp × Pp). According to Mendelian genetics, the expected phenotypic ratio of the F₂ generation is 3 purple : 1 white. The experiment produces 740 purple-flowered and 260 white-flowered plants (total = 1000). Do these results support the 3:1 hypothesis?
Like every statistical tool, the chi-square goodness-of-fit test has specific strengths that make it ideal for genetics and specific limitations that must be understood to avoid misinterpretation. Knowing when the test is appropriate — and when it is not — is just as important as knowing how to calculate the statistic.
| Strengths | Limitations | Key Assumptions |
|---|---|---|
| Simple to calculate — requires only basic arithmetic | Cannot be used with percentages or proportions — requires raw counts | Data must be in the form of frequency counts (not ratios or proportions) |
| Works with any predicted ratio (3:1, 9:3:3:1, 1:1:1:1, etc.) | Unreliable when any expected value is less than 5 | All expected values should be ≥ 5 for valid results |
| Provides an objective, reproducible measure of "fit" | Does not indicate which category contributes most to the deviation | Observations must be independent (each organism counted once) |
| Well-established critical values widely available in tables | Sensitive to sample size — very large samples may show significance for trivially small deviations | Random sampling from the population |
| Applicable beyond genetics: ecology, epidemiology, behavioral studies | Does not prove causation — only assesses fit between observed and expected | Categories must be mutually exclusive and exhaustive |
The most commonly violated assumption in student work is the minimum expected count rule. If any expected value falls below 5, the chi-square approximation becomes unreliable and can lead to incorrect conclusions. In genetics, this usually happens with very small sample sizes or rare phenotype classes. In such cases, the Fisher exact test is a better alternative.
Another important point: a chi-square test can tell you that your data do not fit a 3:1 ratio, but it cannot tell you what the correct ratio actually is. You would need to propose an alternative hypothesis (e.g., 1:1 for a testcross, or 9:7 for complementary epistasis) and run a separate chi-square test against that new prediction.
The chi-square goodness-of-fit test introduced here is the foundation for several more sophisticated applications in genetics and biology. Understanding how it connects to these advanced topics will prepare you for upper-division coursework and research contexts.
| Basic Application | Advanced Extension | Key Difference |
|---|---|---|
| Testing Mendelian ratios (goodness-of-fit) | Chi-square test of independence — tests whether two categorical variables are associated | Uses contingency tables (2×2 or larger) instead of a single row of categories |
| Testing simple 3:1 or 9:3:3:1 ratios | Epistasis ratio testing — modified dihybrid ratios (9:7, 12:3:1, 9:3:4, etc.) | Same χ² formula, but expected values come from epistatic interaction models |
| Testing one gene or two-gene crosses | Linkage analysis — testing whether genes are independently assorting or linked | Significant χ² against independent assortment ratios suggests genetic linkage |
| Single-generation analysis | Hardy-Weinberg equilibrium testing — are allele frequencies changing in a population? | Expected genotype frequencies derived from p² + 2pq + q² = 1 |
| Simple p = 0.05 threshold | Bonferroni correction & multiple testing — adjusting significance thresholds when performing many simultaneous tests | Reduces false positive rate when testing multiple hypotheses at once |
In linkage analysis, the chi-square test plays a particularly important role. When a dihybrid cross produces offspring that deviate significantly from the expected 9:3:3:1 ratio (and epistasis has been ruled out), this is evidence that the two genes are located on the same chromosome — they are linked. The chi-square test provides the statistical evidence to make this claim. Thomas Hunt Morgan's famous work with Drosophila fruit flies relied on exactly this kind of analysis to demonstrate that genes are physically located on chromosomes.
For Hardy-Weinberg equilibrium, the chi-square test compares observed genotype frequencies in a population to those predicted by the Hardy-Weinberg equation. If the data significantly deviate from expectations, one or more of the five assumptions of Hardy-Weinberg must be violated: non-random mating, genetic drift, mutation, migration, or natural selection may be at work. This makes chi-square a diagnostic tool for detecting evolutionary forces.
As you move into more advanced statistics, you will encounter related tests such as the G-test (log-likelihood ratio test), which is mathematically more rigorous but gives very similar results to chi-square for most practical genetics problems. You may also encounter Yates' continuity correction, which adjusts the chi-square formula for 2×2 tables (df = 1) to reduce the tendency toward false positives with small samples.
Work through these five problems in order. They increase in difficulty from basic conceptual understanding to multi-step analysis and critical thinking. Try each problem before revealing the answer.
Aa × aa), a researcher expects a 1:1 ratio of dominant to recessive offspring. She observes 280 dominant and 220 recessive (total = 500). Calculate the chi-square value and determine whether the data support the 1:1 hypothesis.AaBb × AaBb) is predicted to yield a 9:3:3:1 ratio. From 640 offspring, the observed counts are: 370 A_B_, 110 A_bb, 100 aaB_, and 60 aabb. Perform a complete chi-square analysis.The chi-square (χ²) goodness-of-fit test is the standard statistical method for evaluating whether observed genetic data match a predicted Mendelian ratio. Developed by Karl Pearson in 1900 and refined by Ronald Fisher, the test compares observed (O) and expected (E) counts using the formula χ² = Σ [(O − E)² / E]. A null hypothesis (H₀) is stated — typically that the data fit a specific genetic ratio — and the calculated χ² is compared to a critical value from a reference table at p = 0.05 with the appropriate degrees of freedom (df = categories − 1).
If χ² is less than the critical value, we fail to reject H₀ — the data are statistically consistent with the predicted ratio, and deviations are attributable to random chance. If χ² exceeds the critical value, we reject H₀ — the deviations are too large to be explained by chance, suggesting the genetic model is incorrect and an alternative explanation (such as epistasis, linkage, or non-Mendelian inheritance) should be considered. Key assumptions include using raw frequency counts, ensuring all expected values are at least 5, and recognizing that the test assesses fit to a model but does not prove the model is correct. This foundational tool extends naturally into Hardy-Weinberg testing, linkage analysis, and numerous applications across biology and beyond.
Keep learning with more lessons from the same subject.