Biology · Introductory biology · Worked example
Find allele frequencies from genotype counts
A DNA test of 200 fish at one gene finds 90 AA, 80 Aa and 30 aa. Find the allele frequencies p and q, and the genotype counts Hardy–Weinberg equilibrium predicts for a sample of this size.
Count the A copies
The 200 fish carry 400 copies of the gene. Each AA fish carries two A copies and each Aa fish carries one.
Find p
p is the share of all 400 copies that are A.
Find q
Every copy is A or a, so q = 1 − p. As a check, the 2(30) + 80 = 140 a copies are 0.35 of 400.
Predict the genotype frequencies
Under random mating, AA has frequency p², Aa has 2pq and aa has q². The three add to 1.
Turn frequencies into expected counts
Multiply each frequency by the 200 fish sampled. Expected counts need not be whole numbers: they are averages over many samples.
Compare with what was counted
The sample has a few more homozygotes and 11 fewer heterozygotes than equilibrium predicts. Whether a gap this size is more than chance is a question for a chi-square test.
| Genotype | Observed | Expected |
|---|---|---|
| AA | 90 | 84.5 |
| Aa | 80 | 91 |
| aa | 30 | 24.5 |
Result
p = 0.65 and q = 0.35. Hardy–Weinberg equilibrium predicts 84.5 AA, 91 Aa and 24.5 aa among 200 fish, against the 90, 80 and 30 counted.
Your turn
A sample of 500 plants has 320 AA, 160 Aa and 20 aa. Find p and q, and compare the counts with Hardy–Weinberg expectations.
Show the answer and explanation
p = 0.8 and q = 0.2; the expected counts are 320, 160 and 20, exactly what was counted.
The 1,000 gene copies include 2(320) + 160 = 800 A copies. Then p² = 0.64, 2pq = 0.32 and q² = 0.04, which give 320, 160 and 20 of 500.
Keep exploring
The Hardy–Weinberg tool opens with these counts and shows p, q and the expected counts. Its Send to… route carries the observed and expected counts to a chi-square test in Statistics.
Return to the concept →Sources and scope
Authored study material. Tool results depend on the stated inputs and model assumptions.
Try in the workspace
Open the example inputs, change a value and keep a useful result on your board.
Open the Hardy–Weinberg tool Open worked example on a board Hardy–Weinberg equation in Biology ReferenceYour existing work stays on this device. Examples open as editable copies.