How to use the chi-square test for genetics calculator
Test whether observed offspring match a Mendelian ratio. Enter observed dominant, observed recessive, expected ratio dominant, expected ratio recessive in the fields above; the expected dominant, expected recessive, chi-square χ², p-value (1 df), fit at 5% level are computed instantly and plotted on the chart so you can see how the answer changes.
Formula
Variables
- o1 — Observed dominant
- o2 — Observed recessive
- r1 — Expected ratio dominant
- r2 — Expected ratio recessive
Worked example
With observed dominant = 315, observed recessive = 101, expected ratio dominant = 3, expected ratio recessive = 1, the calculator gives expected dominant ≈ 312; expected recessive ≈ 104; chi-square χ² ≈ 0.1153846; p-value (1 df) ≈ 0.7340953; fit at 5% level ≈ Consistent with ratio.
Frequently asked questions
What is the formula for the chi-square test for genetics calculation?
Expected dominant = (o1+o2) × r1 / (r1+r2). Expected recessive = (o1+o2) × r2 / (r1+r2). Chi-square χ² = (o1-[Expected dominant])^2 / [Expected dominant]+(o2-[Expected recessive])^2 / [Expected recessive]. p-value (1 df) = 2 × (1-ncdf(√([Chi-square χ²]))). Fit at 5% level = [p-value (1 df)]>0.05?"Consistent with ratio":"Significant difference". Here o1 is observed dominant, o2 is observed recessive, r1 is expected ratio dominant, r2 is expected ratio recessive.
What inputs do I need for the chi-square test for genetics calculator?
You need observed dominant, observed recessive, expected ratio dominant, expected ratio recessive. Each field is pre-filled with a typical example so you can see how the result responds as you edit the numbers.
How do I use this calculator?
Type values into the input fields. Results and the chart update instantly. Use Reset to restore the example values, Copy results to paste them elsewhere, or Share to copy a link that preserves your inputs.
Is the result exact?
Calculations use standard formulas and double-precision arithmetic, then display about seven significant figures. Real-world measurements carry uncertainty, so treat results as estimates unless your inputs are exact.