Allele frequencies, genotype ratios, and conditions for genetic equilibrium
The Hardy-Weinberg principle states that allele and genotype frequencies in a population remain constant from generation to generation in the absence of evolutionary forces. Five conditions must be met: (1) no mutation, (2) random mating, (3) no natural selection, (4) infinite population size (no genetic drift), and (5) no gene flow (migration). Given allele frequencies p and q (where p + q = 1), genotype frequencies are AA = p², Aa = 2pq, aa = q². Violations of these conditions cause departure from Hardy-Weinberg expectations. Selection, mutation, migration, and drift can all change allele frequencies; non-random mating (assortative mating, inbreeding) changes genotype but not allele frequencies. The mutationRate slider in this simulation defaults to a deliberately exaggerated value for classroom visibility — real per-locus mutation rates are typically 10⁻⁵ to 10⁻⁸ per generation, not 0.02.
Plus 148+ other Pro labs covering AP Physics, Biology, Chemistry, Earth Science, and Math — with unlimited simulation time, advanced parameters, and detailed analytics.
Already have an account?
Sign in →The Hardy-Weinberg principle is a mathematical baseline that describes allele and genotype frequencies in a population that is not evolving. If a population meets five conditions — no mutation, no migration, random mating, no natural selection, and a large enough population to avoid genetic drift — allele frequencies p and q remain constant generation after generation, and genotype frequencies are always p² (AA) + 2pq (Aa) + q² (aa) = 1. No real population is perfectly static, but the principle is useful precisely because deviations from it reveal which evolutionary force is operating. A population of sickle-cell carriers that has more heterozygotes than 2pq predicts is showing balancing selection. A small island population whose allele frequencies jump erratically from year to year is showing genetic drift. This simulation lets you set starting conditions and then introduce selection, mutation, and population size to watch the equilibrium break — or hold.
MisconceptionA dominant allele automatically becomes more common over time.
CorrectDominance describes how an allele is expressed, not how common it is. Hardy-Weinberg equilibrium holds allele frequencies constant regardless of dominance — frequency change only happens when one of the five equilibrium conditions is violated. Note that under selection, dominance does affect dynamics: a deleterious dominant allele is exposed to selection in every heterozygote, whereas a deleterious recessive can persist hidden in carriers, so the two decline at very different rates.
MisconceptionIf a trait is rare, the allele must be recessive.
CorrectTrait rarity and allele dominance are unrelated. A dominant allele can be rare (frequency near 0) if it has recently arisen by mutation or causes low fitness. Huntington's disease is caused by a dominant allele that remains rare because its fitness effects appear after reproductive age.
MisconceptionHardy-Weinberg equilibrium means allele frequencies are always 50/50.
CorrectHardy-Weinberg equilibrium preserves whatever starting frequencies are set — it does not push them toward 0.5. If p = 0.9 at generation 0 and all five conditions are met, p stays at 0.9 indefinitely. The principle is about stability, not about a specific value.
MisconceptionIn a population of 50, the Hardy-Weinberg equation still gives accurate predictions.
CorrectHardy-Weinberg assumes effectively infinite population size. In a population of 50, genetic drift — random sampling error in allele transmission — is large enough to shift frequencies by several percent per generation. The equation can still be applied as a reference expectation, but deviations from it are expected and do not necessarily indicate selection.
It means allele frequencies are not changing across generations, and observed genotype frequencies match the expected p², 2pq, q² proportions calculated from those allele frequencies. In practice, researchers calculate expected genotype counts from observed allele frequencies and compare them to observed counts using a chi-square test. A non-significant result is consistent with equilibrium; a significant result indicates at least one of the five conditions is being violated.
With pFreq = 0.7 and q = 0.3: AA = p² = 0.49, Aa = 2pq = 2(0.7)(0.3) = 0.42, aa = q² = 0.09. Check: 0.49 + 0.42 + 0.09 = 1.00. In a population of 1,000, that predicts 490 AA individuals, 420 Aa carriers, and 90 aa individuals.
AP standard 7.A.1 requires students to apply the Hardy-Weinberg equation to calculate allele and genotype frequencies and to determine whether a population is evolving. A classic AP Free Response scenario gives students the frequency of one phenotype class (e.g., 9% show the recessive trait), asks them to solve for q, then p, then 2pq, and finally to state which evolutionary force might explain an observed deviation. In this simulator, compare the HW Equilibrium preset with selectionCoeff, mutationRate, migrationRate, or low popSize cases to practice that reasoning.
When q is small, nearly all copies of the recessive allele are carried in heterozygotes (Aa), not in the homozygotes (aa) that selection can actually see. The fraction of 'a' alleles exposed to selection (those sitting in aa homozygotes) is 2q² / (2pq + 2q²) = q / (p + q) ≈ q when q is small. The remaining fraction p ≈ 1 is hidden in heterozygotes. As q approaches zero, almost none of the remaining 'a' alleles are in aa individuals, so selectionCoeff has less visible variation to act on.
Allele frequency is the proportion of a specific allele among all allele copies in a gene pool (p for A, q for a). Phenotype frequency is the proportion of individuals showing a given trait — which depends on dominance. A recessive phenotype frequency equals q², not q. If the recessive allele has q = 0.01, the recessive phenotype frequency is q² = 0.0001 (0.01% of the population), while p² + 2pq = 0.9999 of the population shows the dominant phenotype — even though the recessive allele still makes up 1% of the gene pool.