Biology

Chi-Square Goodness-of-Fit Calculator (Genetic Ratios)

Enter observed counts and the expected ratio to test the fit.

Your numbers

Separate numbers with commas, spaces or new lines. You can paste a column from a spreadsheet.
Separate numbers with commas, spaces or new lines. You can paste a column from a spreadsheet.

Your results

Chi-square value
Chi-square value
—
Degrees of freedom
—
p-value
—
Conclusion at the 5% level
—
Total observed
—

Chi-Square Goodness-of-Fit Calculator (Genetic Ratios) by TheCalcTools

How the Chi-Square Goodness-of-Fit Calculator (Genetic Ratios) works

Expected counts are the total multiplied by each ratio share. Chi-square adds (observed − expected)² ÷ expected over all categories; larger values mean a worse fit.

The p-value is the chance of a deviation this large if the ratio were true, from the chi-square distribution with (categories − 1) degrees of freedom. Expected counts should be at least 5 in each category for the test to be reliable.

The formula

χ² = Σ (O − E)² ÷ E; df = k − 1; p = 1 − F(χ², df)

Worked example

Using the default values shown in the calculator:

Observed counts315, 108, 101, 32
Expected ratio (same order)9, 3, 3, 1
  1. Mendel’s pea data 315 : 108 : 101 : 32 against 9 : 3 : 3 : 1 gives χ² = 0.470 with 3 df.
  2. p = 0.925: Fits the expected ratio (p ≥ 0.05).

Result:

Chi-square value0.4700
Degrees of freedom3
p-value0.9254
Conclusion at the 5% levelFits the expected ratio (p ≥ 0.05)
Total observed556

Frequently asked questions

Does a high p-value prove the ratio?

No. It only means the data are consistent with it. A low p-value suggests the model (for example independent assortment) does not fit.

Sources and further reading

More in Biology · All calculators

This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.