How to use
- Keep Genotype counts and type how many AA, Aa and aa individuals you observed.
- Read p and q, the expected shares and counts, χ², the p-value and whether the sample fits equilibrium at the 5 % level.
- For a recessive trait where carriers cannot be told apart, choose Recessive phenotype share and enter the percentage with the trait.
Formulas
- p = (2·AA + Aa) / (2N), q = 1 − p, where N = AA + Aa + aa.
- Expected genotype shares: p², 2pq, q²; expected counts: these × N.
- χ² = Σ (O − E)² / E with 1 degree of freedom; the p-value is 2 × (1 − Φ(√χ²)), where Φ is the standard normal distribution (the χ² distribution with 1 df is the square of a standard normal).
- From the recessive share: q = √q², p = 1 − q, carriers = 2pq, “1 in” = 1 / 2pq.
Worked example
The default sample has AA 298, Aa 489, aa 213 (N = 1000). p = (596 + 489) / 2000 = 0.5425, q = 0.4575. Expected counts are 294.31, 496.39 and 209.31. χ² = 3.69²/294.31 + 7.39²/496.39 + 3.69²/209.31 = 0.2215, p-value 0.6379 — no significant deviation, the sample fits equilibrium.
If 1 % of a population shows a recessive trait: q = 0.1, p = 0.9, AA 81 %, Aa 18 %, aa 1 %; carriers are 1 in 5.6.
Tips
- Use counts, not percentages, in the first mode: the χ² test depends on the sample size.
- A non-significant result does not prove equilibrium; small samples rarely show deviations.
- Expected counts below about 5 make the χ² approximation rough; consider an exact test for small samples.