Turn genotype counts into allele frequencies p and q, test whether your sample fits Hardy–Weinberg equilibrium, or estimate how common carriers are from how often a recessive trait appears.
p = (2·AA + Aa) ÷ 2N · q = 1 − p · p² + 2pq + q² = 1
Counts of individuals, not percentages. You need to be able to tell AA from Aa, for example from a DNA test or a codominant trait.
| Genotype | Observed | Expected | HW frequency |
|---|---|---|---|
| AA | 50 | 49 | p² = 0.49 |
| Aa | 40 | 42 | 2pq = 0.42 |
| aa | 10 | 9 | q² = 0.09 |
Allele frequency is the share of all copies of a gene in a population that are one particular version. If 100 plants carry 200 copies of a gene and 140 of them are A, the frequency of A is p = 0.7 and the frequency of a is q = 0.3.
Evolution, at its simplest, is a change in allele frequencies over generations. Measuring them is the starting point for studying selection, genetic drift, migration and inbreeding, and for estimating how many people carry a recessive condition.
The Hardy–Weinberg principle says that if nothing is pushing the population (no selection, mutation, migration or drift, and random mating), genotypes settle at p², 2pq and q². Comparing real counts with those numbers tells you whether something is going on.
Assuming Hardy–Weinberg proportions. Rare recessive alleles hide almost entirely in carriers.
| Trait affects | q | Carriers | Carriers per affected |
|---|---|---|---|
| 1 in 100 | 0.1 | 1 in 5.6 | 18 |
| 1 in 1,000 | 0.0316 | 1 in 16.3 | 61 |
| 1 in 2,500 | 0.02 | 1 in 25.5 | 98 |
| 1 in 10,000 | 0.01 | 1 in 50.5 | 198 |
| 1 in 100,000 | 0.0032 | 1 in 158.6 | 630 |
This is why selection against a rare recessive trait is so slow: almost every copy of the allele is in someone who doesn't show it.
There are two ways to be Aa: A from the mother and a from the father (p × q), or the reverse (q × p). Adding them gives 2pq.
Non-random mating (especially inbreeding), selection, migration between populations, mutation and genetic drift in small populations. A shortage of heterozygotes points towards inbreeding or a mixed sample.
Not directly. With alleles of frequencies p, q and r the genotype frequencies come from (p + q + r)², giving p², q², r², 2pq, 2pr and 2qr, and the test has more degrees of freedom.
It’s a good first estimate for a rare recessive condition in one population. Real carrier rates differ between ancestries and can be affected by consanguinity, so clinical carrier figures come from screening data, not from this formula.
Related Tools
Generate Punnett square diagrams.
Calculate dihybrid cross outcomes.
Calculate trihybrid cross outcomes.
Calculate DNA concentration from absorbance.
Calculate DNA copy number.
Convert DNA sequence to mRNA.