Opening your learning space
Starting the app …
Opening your learning space
Starting the app …
The chi-square goodness-of-fit test checks whether observed frequencies (e.g. the phenotypes of a cross) are compatible with the frequencies expected under a hypothesis (e.g. a Mendelian segregation ratio).
Free to browse · flashcards or a multiple-choice quiz · import from Essential
Formula
χ2, B, E are dimensionless counts; the test value χ2 is unitless
| Symbol | Meaning | Unit |
|---|---|---|
| Test statistic (sum of the weighted squared deviations) | – | |
| observed frequency of a class | count | |
| expected frequency of that class (from the hypothesis) | count | |
| degrees of freedom = number of classes − 1 | – |
\chi^2 = \sum \frac{(B - E)^2}{E}Original schematic by Quanta
Free with a Quanta account. Your download stays ready after registration.
Karl Pearson introduced the test in 1900. You compare the computed value with a critical value from the chi-square table for the appropriate degrees of freedom df and a significance level (usually α = 5 %). If is smaller than the critical value, the null hypothesis (observed = expected) is kept; if is larger, it is rejected. In genetics this checks whether a cross follows the expected ratio (3:1, 9:3:3:1). For a ratio with k classes, .
Applies as a goodness-of-fit test for counted frequencies in disjoint classes with sufficiently large expected values (rule of thumb E ≥ 5).
For each class you measure the deviation observed minus expected, square it and divide by the expected value.
Degrees of freedom for the goodness-of-fit test
k is the number of classes; only with estimated parameters do you subtract more.
Contribution of a single class
Shows which class contributes most to the deviation.
100 offspring, expected ratio 3:1. Observed: 80 dominant, 20 recessive. Does the 3:1 ratio fit?
and 25.
.
, critical 3.84.
Since , the 3:1 ratio is kept.
Dihybrid cross, 160 offspring, expected 9:3:3:1. Observed: 95, 30, 27, 8. Is the deviation significant?
, 30, 30, 10.
.
, critical 7.81.
Since , the deviation is not significant.
Using percentages instead of absolute counts.
needs counted frequencies; expected counts come from ratio · total number.
Determining the degrees of freedom incorrectly.
For a plain goodness-of-fit test df = classes − 1, not the total number of individuals.
Interpreting a small as proof of the hypothesis.
The test can only keep or reject the null hypothesis, never prove it.
Confusing the direction in the significance comparison.
Only when exceeds the critical value is the hypothesis rejected.
Formula cluster
Connects genetics, probability and hypothesis testing.
Monohybrid cross, 100 offspring, expected 3: dominant, 25 recessive. Observed: dominant, 20 recessive. . , critical value χ2(0.05; 1) = 3.84. Since , the deviation is not significant and the 3:1 ratio is kept.
Genetics (testing segregation ratios), ecology (distribution tests), quality control, any test of frequencies against an expected pattern
Here is how to work through a typical Chi-Square Test (Goodness of Fit) (χ² = Σ (B − E)² / E) task step by step:
Task
100 offspring, expected ratio 3:1. Observed: 80 dominant, 20 recessive. Does the 3:1 ratio fit?
Solution path
and 25.
.
, critical 3.84.
Since , the 3:1 ratio is kept.
Task
Dihybrid cross, 160 offspring, expected 9:3:3:1. Observed: 95, 30, 27, 8. Is the deviation significant?
Solution path
, 30, 30, 10.
.
, critical 7.81.
Since , the deviation is not significant.
First you state the null hypothesis, for example that a cross follows the 3:1 ratio. From it you compute for each phenotype class the expected number E as ratio times total. Then for each class you form from the observed number B and expected number E and sum all contributions to the test value . You compare it with the critical value from the chi-square table for the degrees of freedom df = classes − 1 and the level . Example: 100 offspring, expected 75:25, observed 80:20 gives . At the critical value is 3.84. Since 1.333 is smaller, the 3:1 ratio is kept.
In the goodness-of-fit test the degrees of freedom are df = number of classes minus 1. Testing a monohybrid ratio with two phenotype classes gives . For the dihybrid 9:3:3:1 ratio with four classes, . The subtraction of 1 arises because the total is fixed: if all classes but one are known, the last follows automatically. The degrees of freedom determine which row of the chi-square table applies and thus the critical value. A common mistake is to use the total number of individuals as degrees of freedom. If parameters are additionally estimated from the data, you subtract one further degree of freedom per estimated parameter, which does not occur in the pure ratio test of genetics.
The value 3.84 is the critical chi-square value for one degree of freedom and a significance level of 5 %. It marks the boundary from which a deviation is considered meaningful. If the calculated value is below 3.84, the deviation between observed and expected frequencies is compatible with chance, and the null hypothesis is kept. If it is above, the deviation is so large that it would be purely random with a probability under 5 %, and you reject the hypothesis. Other degrees of freedom have other values, such as 5.99 at or 7.81 at . You always read the appropriate value from the chi-square table for your own degrees of freedom and the chosen level.
Dividing by the expected value E weights each deviation relative to its expected size. A deviation of 10 individuals matters strongly for an expected class of 20, but hardly for an expected class of 1000. Without the division, large classes would dominate the test value simply by their size, even though their relative deviation is small. Through all classes are made comparable: each contribution measures how strongly the class deviates relative to its expectation. Squaring additionally ensures that positive and negative deviations do not cancel and that larger deviations count disproportionately more. This yields a fair overall measure of goodness of fit across all classes.
A significant result, that is value above the critical value, means the observed frequencies deviate so strongly from the expected that pure chance is unlikely. In genetics this means the cross probably does not follow the assumed ratio. Possible causes are gene linkage, incomplete dominance, lethal factors or an unfavourable sample. It is important that the test only checks compatibility with a hypothesis and gives no reason; the biological interpretation must be added by you. A non-significant result does not prove the hypothesis, it only shows that the data do not contradict it. The test can therefore reject or keep a hypothesis, but never confirm it definitively.
Quanta exam set
Curated exam set for "Chi-Square Test (Goodness of Fit)":
Question (front)
Which formula describes Chi-Square Test (Goodness of Fit)?
Answer in your set
Question (front)
How do you rearrange Chi-Square Test (Goodness of Fit) for Degrees of freedom for the goodness-of-fit test?
Answer in your set
Question (front)
Which common mistake happens with Chi-Square Test (Goodness of Fit)?
Answer in your set
+ 7 more cards: units, variables, derivation, example, exam task
The formula set contains 10 cards. After importing, review them and start practicing; your ratings determine later review intervals.
This list names subject references and further reading. A page or section number appears when it is part of the reference; these are not verbatim quotations.
Create a curated FSRS exam set for χ² = Σ (B − E)² / E: formula recall, variables, derivation, rearrangement, worked example, common mistakes and exam context.
Curated formula set · LaTeX · FSRS spaced repetition · import from Essential