Biology · Genetics
Mendelian ratio chi-square test.
Enter observed offspring counts and pick the expected ratio to get chi-square, degrees of freedom, the p-value and whether the counts fit at the 5% level.
Inputs
Goodness of fit
Enter observed counts.
Testing a cross against its expected ratio
Pearson's chi-squared goodness-of-fit test compares observed counts with the counts a model expects: χ² = Σ (observed − expected)² / expected. The degrees of freedom are the number of categories minus 1, and the 5% critical values are 3.841, 5.991, 7.815, 9.488 for 1 to 4 degrees of freedom (Wikipedia, Pearson's chi-squared test). Wikipedia notes that a common rule wants expected counts of at least 5. A result that is not significant means the data are consistent with the ratio, not that the ratio is proven; Wikipedia's Punnett square article adds that a result far from 9:3:3:1 can signal lethal alleles, epistasis or linked genes.
Worked example. OpenStax Table 12.1 lists Mendel's F2 seed texture counts as 5,474 round and 1,850 wrinkled, 2.96:1. Against 3:1 the expected counts are 5,493 and 1,831, so χ² = 0.263 with 1 degree of freedom and p = 0.61, well inside the 5% critical value of 3.84. Wikipedia's 44 versus 56 against 1:1 gives χ² = 1.44 and p of about 0.23. The 1:1:1:1 preset is what the Punnett tool gives for AaBb × aabb: 1:1:1:1.
Frequently asked questions
What does the p-value mean here?
It is the probability of a chi-square at least this large if the cross really follows the expected ratio. A p-value above 0.05 means the counts are not significantly different from it.
How many degrees of freedom do I use?
Number of classes minus 1: 1 for a 3:1 cross, 3 for 9:3:3:1 (Wikipedia, Pearson's chi-squared test).
Why can I fail to reject a wrong ratio?
With small samples, several ratios can fit equally well. A non-significant result shows consistency, not proof, so larger samples give a more reliable test.
What if I have fewer than 5 expected in a class?
The chi-square approximation gets unreliable. Wikipedia describes a common rule of 5 or more expected in every cell; collect more offspring or combine classes.
Which ratio should I pick for a dihybrid test cross?
AaBb x aabb with unlinked genes gives 1:1:1:1. A big departure in the parental classes suggests the genes are linked.
Sources
Checked
- Wikipedia: Pearson’s chi-squared test
- OpenStax Biology 2e: 12.1 Mendel’s Experiments and the Laws of Probability
- OpenStax Biology 2e: 12.3 Laws of Inheritance
- Wikipedia: Punnett square
Runs entirely in your browser. Nothing you type is sent or stored.
Teaching model, not advice
A classroom statistics tool. It does not replace a statistician for research data, and a significance test is only as good as the ratio assumed.