GENETICS • DATA INTERPRETATION & EXPERIMENTAL DESIGN

Chi-Square Tests for Mendelian Ratios — Interpret chi-square tests for Mendelian ratios (intro)

Learn how scientists use math to decide whether experimental results actually match predicted genetic ratios.

Historical Context & Motivation

Imagine you flip a coin 100 times and get 55 heads and 45 tails. You expected 50 of each, but your results are a little off. Does that mean the coin is unfair, or is it just normal luck? This is exactly the kind of question scientists face when they study genetics. Gregor Mendel predicted specific ratios for traits in pea plants, like a 3:1 ratio of dominant to recessive offspring. But real experiments almost never produce perfect ratios. So how do scientists decide whether their data is close enough?

That is where the chi-square test (written as χ²) comes in. It is a statistical tool that measures how far your observed results are from what you expected. Over more than a century, this test has become one of the most important tools in genetics.

1866
Mendel Publishes His Work
Gregor Mendel published his famous experiments on pea plants, predicting that certain trait ratios like 3:1 should appear in offspring. His work went mostly unnoticed for decades.
1900
Mendel's Laws Rediscovered
Three scientists independently rediscovered Mendel's principles. Researchers now needed a way to test whether their own experimental results matched Mendel's predicted ratios.
1900
Karl Pearson Develops Chi-Square
Mathematician Karl Pearson introduced the chi-square (χ²) test as a way to compare observed data to expected data. This gave scientists a reliable, mathematical method to judge their results.
1930s–Present
Chi-Square Becomes Standard in Genetics
The chi-square test became a standard part of genetics research and education. Today, it is used in everything from plant breeding to medical genetics to forensic science.

The big question this concept addresses is: When your experimental results don't perfectly match a predicted ratio, is the difference just due to random chance, or is something else going on? The chi-square test gives us a way to answer that question with math instead of guesswork.

Core Principles & Key Definitions

Before we dive into the math, let's nail down the key ideas you need. The chi-square test is built on a few simple principles that work together.

1

Observed Values (O)

These are the actual results you count from an experiment. For example, if you cross two plants and get 78 purple flowers and 22 white flowers, those are your observed values.
2

Expected Values (E)

These are the numbers you predict based on a genetic ratio. In a 3:1 ratio with 100 offspring, you'd expect 75 of one type and 25 of the other.
3

Null Hypothesis (H₀)

This is your starting assumption: the data does fit the expected Mendelian ratio, and any difference is just due to random chance. The chi-square test checks whether this assumption holds.
4

Degrees of Freedom (df)

This is the number of categories minus one. If you have 2 phenotype categories (like purple and white), then df = 2 − 1 = 1. This number helps you interpret your χ² value.
5

P-Value

The p-value tells you the probability that your results happened by chance alone. A p-value above 0.05 means your data is consistent with the expected ratio. Below 0.05 means the difference is likely real.
KEY TAKEAWAY
Think of the chi-square test like a referee at a basketball game. The referee doesn't play the game — they just watch the action and decide whether everything looks fair. The null hypothesis is like saying "the game is fair." The chi-square test watches your data and decides whether the difference between what you got and what you expected is just normal randomness (fair game) or something more suspicious (unfair game). If the p-value is greater than 0.05, the referee says "play on" — your data fits the ratio. If it's less than 0.05, the referee blows the whistle — something doesn't match.

Visualizing the Chi-Square Process

Let's walk through the chi-square process visually. The diagram below shows how you go from a genetic cross all the way to a decision about whether your data supports a Mendelian ratio.

This flowchart shows the five main steps of a chi-square test applied to genetics. You start by performing a cross and counting outcomes (Steps 1–2), then calculate expected values from the predicted ratio (Step 3). After applying the formula (Step 4), you compare your result to a critical value (Step 5) to decide whether the data fits the Mendelian ratio.

Notice that the test ends with two possible outcomes. If your calculated χ² value is less than or equal to the critical value from a chi-square table, you accept the null hypothesis — your data fits the expected ratio. If χ² is greater than the critical value, you reject the null hypothesis, meaning the difference between observed and expected results is too large to be explained by chance alone.

The Chi-Square Formula

The math behind the chi-square test is simpler than it looks. You only need one formula, and you apply it to each category of your data. Let's break it down.

CHI-SQUARE FORMULA
χ² = Σ (O − E)² / E
χ² = chi-square value (the test statistic) • Σ = sum (add up the result for each category) • O = observed value (what you actually counted) • E = expected value (what you predicted based on the ratio)

Here is what each part does. First, you subtract the expected value from the observed value (O − E). This tells you how far off each category is. Then you square that difference, which makes all values positive and gives more weight to big differences. Finally, you divide by the expected value, which scales the difference so that categories with large numbers don't dominate unfairly.

DEGREES OF FREEDOM
df = n − 1
df = degrees of freedom • n = number of phenotype categories. For a monohybrid cross (2 categories), df = 2 − 1 = 1. For a dihybrid cross (4 categories), df = 4 − 1 = 3.

Once you've calculated your χ² value, you look it up in a chi-square critical values table. You find the row that matches your degrees of freedom and check the column for p = 0.05. If your χ² is smaller than the critical value, the data supports the expected ratio. If your χ² is larger, the data does not support it.

💡 Why p = 0.05?
Scientists commonly use p = 0.05 as their cutoff. This means there is a 5% chance (or 1 in 20) that the difference happened by pure luck. If the probability of getting your results by chance is less than 5%, scientists say the result is statistically significant — meaning something other than random chance is likely at work.

The Chi-Square Critical Values Table

After you calculate your χ² value, you need something to compare it to. That's the job of the critical values table. This table tells you the maximum χ² value you can have and still say your data fits the expected ratio at a given confidence level.

Chi-Square Critical Values — the p = 0.05 column (highlighted in pink) is the most commonly used cutoff in genetics.
Degrees of Freedom (df)p = 0.10p = 0.05p = 0.01
12.713.846.63
24.615.999.21
36.257.8111.34
47.789.4913.28
This bar chart compares observed results (solid bars) with expected results (dashed-outline bars) for a monohybrid cross. The purple category shows 78 observed versus 75 expected, while the white category shows 22 observed versus 25 expected. The chi-square test measures whether these small differences are within the range of normal chance.

Looking at the bar chart, you can see the observed values (solid bars) are close to — but not exactly the same as — the expected values (dashed bars). The chi-square test turns those visual differences into a single number you can evaluate. In the next section, we'll walk through a complete worked example to see exactly how.

Worked Example: Monohybrid Cross

Let's work through a complete chi-square test from start to finish. Imagine you cross two heterozygous purple-flowered pea plants (Pp × Pp) and count the offspring. You get 78 purple and 22 white flowers out of 100 total. Mendel's model predicts a 3:1 ratio. Does your data support this?

Chi-Square Test: Purple vs. White Flowers
1
Step 1 — State the Null HypothesisOur null hypothesis (H₀) is: the observed data fits a 3:1 Mendelian ratio. Any difference between observed and expected values is due to random chance.
2
Step 2 — Calculate Expected ValuesTotal offspring = 100. In a 3:1 ratio, 3 out of every 4 should be purple and 1 out of 4 should be white. So: Expected purple = 100 × (3/4) = 75. Expected white = 100 × (1/4) = 25.
Epurple = 75, Ewhite = 25
3
Step 3 — Apply the Formula to Each CategoryFor purple: (O − E)² / E = (78 − 75)² / 75 = (3)² / 75 = 9 / 75 = 0.12. For white: (O − E)² / E = (22 − 25)² / 25 = (−3)² / 25 = 9 / 25 = 0.36.
Purple contribution = 0.12, White contribution = 0.36
4
Step 4 — Sum to Get χ²Add the values from each category: χ² = 0.12 + 0.36 = 0.48.
χ² = 0.48
5
Step 5 — Determine Degrees of FreedomWe have 2 phenotype categories (purple and white). Degrees of freedom = n − 1 = 2 − 1 = 1.
df = 1
6
Step 6 — Compare to Critical Value and InterpretFrom the chi-square table, the critical value for df = 1 at p = 0.05 is 3.84. Our calculated χ² of 0.48 is much less than 3.84. This means we fail to reject the null hypothesis. The data is consistent with a 3:1 Mendelian ratio. The small difference between observed and expected values is likely due to normal random variation.
0.48 < 3.84 → Accept H₀ → Data supports the 3:1 ratio ✓

Strengths & Limitations of the Chi-Square Test

The chi-square test is a powerful and widely-used tool, but like any tool, it has its strengths and its limits. Understanding both will help you know when to use it and when to be cautious about your conclusions.

Chi-square tests are versatile but must be used thoughtfully.
StrengthsLimitations
Simple to calculate — requires only basic arithmetic (subtraction, squaring, division)Requires a reasonably large sample size — expected values in each category should be at least 5
Works with categorical data (counts of things), which is exactly what genetics crosses produceOnly tells you whether data fits or doesn't fit a ratio — it doesn't tell you what the correct ratio actually is
Provides an objective, numerical answer instead of relying on subjective judgmentCannot prove the null hypothesis is true — it can only fail to disprove it
Can be used for any predicted ratio (3:1, 9:3:3:1, 1:1, etc.)A large sample can make even tiny, meaningless differences appear "significant"
KEY TAKEAWAY
Think of the chi-square test like a spell-checker for genetics experiments. It catches big mistakes (like data that totally doesn't match your prediction), but it can't guarantee your writing is perfect. A spell-checker might say "no errors found" even if your sentence doesn't make sense — similarly, passing a chi-square test doesn't prove your genetic model is correct; it just means your data doesn't obviously contradict it. Always pair your chi-square results with good experimental design and biological reasoning.

Connecting to Advanced Genetics

The introductory chi-square test you've learned is the foundation for more advanced statistical analysis in genetics. As you study more complex inheritance patterns, the same basic approach scales up. Here's a quick comparison of where you are now versus where these ideas lead.

The introductory chi-square test is the gateway to more complex genetic analysis.
What You Learned (Intro)Where It Goes (Advanced)
Testing a simple 3:1 monohybrid ratioTesting 9:3:3:1 dihybrid ratios, epistasis ratios (9:7, 12:3:1), and linked gene ratios
df = 1 (two categories)df = 3 or more for crosses with many phenotype categories
Using a chi-square table to find the critical valueUsing software to calculate exact p-values and analyze larger datasets
Deciding "fits" or "doesn't fit"Comparing multiple genetic models to find the best fit, such as testing for linkage or gene interaction

As you move into more advanced biology courses, you'll find that the chi-square test is also used outside of genetics. It appears in ecology (testing whether organisms are randomly distributed), medicine (checking whether a treatment affects outcomes), and many other fields. The core logic — comparing what you observe to what you expect — stays exactly the same. Mastering it now gives you a tool you'll use again and again.

Practice Problems

PROBLEM 1CONCEPTUAL
In a chi-square test, what does it mean if you "fail to reject the null hypothesis"? Does it prove that the Mendelian ratio is correct?
PROBLEM 2BASIC CALCULATION
A student crosses two heterozygous tall pea plants (Tt × Tt) and gets 60 tall and 20 short offspring out of 80 total. The expected ratio is 3:1. Calculate the chi-square value.
PROBLEM 3INTERMEDIATE
In another cross, a student expects a 3:1 ratio and observes 84 dominant and 36 recessive out of 120 offspring. Calculate χ², determine the degrees of freedom, and state whether the data supports the 3:1 ratio at p = 0.05.
PROBLEM 4APPLIED
A genetics researcher crosses two organisms heterozygous for two independent traits (AaBb × AaBb), expecting a 9:3:3:1 phenotype ratio. From 160 offspring, she observes: 100 A_B_, 25 A_bb, 30 aaB_, and 5 aabb. Calculate χ² and determine whether the data supports the 9:3:3:1 ratio (the critical value for df = 3 at p = 0.05 is 7.81).
PROBLEM 5CRITICAL THINKING
A student performs a monohybrid cross and calculates χ² = 0.001. She is thrilled because her data is "almost perfect." Her teacher, however, says results that are too close to perfect can also be a concern. Why might an extremely low χ² value be suspicious, and what could it suggest about the experiment?

Lesson Summary

The chi-square (χ²) test is a statistical method used to determine whether observed experimental data fits an expected Mendelian ratio such as 3:1 or 9:3:3:1. The formula χ² = Σ (O − E)² / E compares observed (O) and expected (E) values for each phenotype category. The result is a single number that you compare to a critical value from the chi-square table, using the appropriate degrees of freedom (df = n − 1).

If your χ² value is less than the critical value at p = 0.05, you fail to reject the null hypothesis, meaning your data is consistent with the predicted ratio. If χ² is greater than the critical value, you reject the null hypothesis, suggesting the data does not fit the expected ratio. Remember: the test doesn't prove a ratio is correct — it only evaluates whether your data is consistent with it. Always use chi-square results alongside sound experimental design and biological knowledge.

Varsity Tutors • Genetics • Chi-Square Tests for Mendelian Ratios