Chi-Square Test for Mendelian Ratios Calculator

Do your offspring counts fit the ratio Mendelian genetics predicts? Choose the expected ratio, enter the observed number in each phenotype class, and this calculator runs the chi-square goodness-of-fit test, showing the expected counts, each class’s contribution and the P-value.

Inputs

Results

Chi-square statistic
0.47
Degrees of freedom
3
P-value
0.9254
Conclusion at the 5 % level
Consistent with 9:3:3:1 (no significant deviation)

    RefBIO-GEN-002
    Methodχ² = Σ(O − E)²/E, k − 1 degrees of freedom
    UnitsSI
    Date2026-11-24

    Working

    Calculated in SI base units; inputs are converted from the units you choose.

    1. Expected countsEᵢ = N × ratioᵢ / ΣratioN = 556: 312.8, 104.3, 104.3, 34.75
    2. Chi-square statisticχ² = Σ(O − E)²/Eχ² = 0.01619 + 0.1349 + 0.1013 + 0.2176 = 0.47
    3. P-valueupper tail of χ² with 3 degrees of freedomP = 0.9254

    Observed and expected

    ClassRatioObservedExpected(O − E)²/E
    19315312.750.01619
    23108104.250.1349
    33101104.250.1013
    413234.750.2176

    Interpreting the result

    A small chi-square (large P-value) means the deviations from the expected ratio are about what chance would produce. With P below 0.05 the counts are unlikely under the hypothesised ratio, suggesting linkage, epistasis, lethality or mis-scoring. Mendel’s own dihybrid pea data, 315 round yellow, 108 round green, 101 wrinkled yellow and 32 wrinkled green, fit 9:3:3:1 remarkably closely.

    Assumptions and limits

    • Independent observations and counts (not percentages).
    • Each expected count at least 5.
    • Degrees of freedom = number of classes − 1 (no parameters estimated from the data).

    References

    • Mendel, G. (1866), Versuche über Pflanzen-Hybriden, Verhandlungen des naturforschenden Vereines in Brünn 4, 3–47.
    • Griffiths, A. J. F. et al., Introduction to Genetic Analysis, 12th ed., W. H. Freeman, 2020, chapter on single-gene inheritance and the chi-square test.

    Questions

    Do Mendel’s 315 : 108 : 101 : 32 peas fit 9:3:3:1?
    Yes: χ² = 0.47 with 3 degrees of freedom, P = 0.9254.
    Does 290 : 110 fit a 3:1 ratio?
    Yes: χ² = 1.333 with 1 degree of freedom, P = 0.2482.

    This calculator is a design aid. Check results against the governing code or standard and have critical work verified by a qualified engineer. Read the disclaimer.