Chi-Square Genetics Calculator

Test whether observed genetic ratios differ significantly from expected Mendelian ratios. Calculate chi-square statistic and p-value to determine if deviations are due to chance.

📊 Genetics📐 χ² = Σ(O-E)²/E🧬 Biology
Observed class 1 (O1)
Expected ratio for class 1
Observed class 2 (O2)
Expected ratio for class 2
Observed class 3 (optional)
Expected ratio 3
Please enter valid values.

Formula & Reference

VariableSymbolFormulaUnits
Chi-Square Genetics Calculator—χ² = Σ(O-E)²/Edimensionless

Step-by-Step Examples

Example 1
Mendel Pea Data

Mendel observed 787 round : 277 wrinkled seeds. Expected 3:1.

  • Total = 1064
  • E(round) = 1064 x 3/4 = 798
  • E(wrinkled) = 1064 x 1/4 = 266
  • chi² = (787-798)²/798 + (277-266)²/266
  • = 0.152 + 0.455 = 0.607
  • df=1, critical=3.841: 0.607 < 3.841 NOT significant
✓ chi² = 0.607, p > 0.05: consistent with 3:1 ratio
Example 2
Dihybrid Cross

Observed 315 A_B_ : 108 A_bb : 101 aaB_ : 32 aabb. Expected 9:3:3:1.

  • Total = 556
  • E(9/16) = 312.75, E(3/16) = 104.25 each, E(1/16) = 34.75
  • chi² = (315-312.75)²/312.75 + ... = 0.47
  • df=3, critical=7.815: not significant
✓ chi² = 0.47, data consistent with 9:3:3:1
Example 3
Significant Deviation

Observed 100 dominant : 100 recessive. Expected 3:1.

  • E(dominant) = 150, E(recessive) = 50
  • chi² = (100-150)²/150 + (100-50)²/50
  • = 16.67 + 50 = 66.67
  • df=1: 66.67 >> 3.841 HIGHLY SIGNIFICANT
✓ chi² = 66.67, p << 0.05: reject 3:1 hypothesis

Real-World Applications

Common Mistakes to Avoid

⚠️
Degrees of freedom = classes - 1

For 2 classes (3:1): df=1, critical=3.841. For 4 classes (9:3:3:1): df=3, critical=7.815. For 3 classes: df=2.

⚠️
Expected values must be ≥5

If any expected value < 5: combine classes or use Fisher exact test. Chi-square is unreliable with small expected values.

⚠️
Compare chi-square to critical value

If chi² > critical value: significant deviation (reject null hypothesis). If chi² < critical: data consistent with expected ratio.

Frequently Asked Questions

What does chi-square test in genetics? ▾
Whether observed offspring ratios match expected Mendelian ratios. Null hypothesis: deviations are due to chance alone. If chi² is large: something other than chance is operating.
What is degrees of freedom? ▾
df = number of categories - 1 (minus any estimated parameters). For 2-class test: df=1. For 4-class dihybrid: df=3.
What p-value is considered significant? ▾
Conventionally p < 0.05 (chi² > 3.841 for df=1). Some use p < 0.01 for stricter threshold. p < 0.05 means less than 5% chance of this deviation by luck alone.
What if chi-square is way too small? ▾
Fisher noted Mendel data too perfect (chi² too small, fits too well). Suggests data smoothing or selection bias. Both extremes can indicate problems.
How is chi-square different from t-test? ▾
Chi-square: for count data / categorical data. T-test: for continuous measurements. Chi-square tests goodness-of-fit or independence. T-test tests difference in means.

Related Biology Calculators