Natural selection at one locus
Three fitnesses decide whether an allele sweeps, settles at a balance, or depends on where it starts.
Read first: Genotype frequencies and Hardy-Weinberg, Genetic drift
Fitness acts on genotypes
Selection does not see alleles; it sees individuals, and an individual is a genotype. At one locus with alleles A and a the three genotypes AA, Aa and aa survive and reproduce in proportion to their relative fitnesses wAA, wAa and waa. The module fixes these three numbers and follows the frequency p of A over generations. Only the ratios matter: multiplying all three fitnesses by the same constant changes nothing.
Each generation starts from random mating, so the zygotes are in Hardy-Weinberg proportions p², 2pq and q², with q = 1 − p. After selection the share that survives is the mean fitness, w̄ = p²wAA + 2pq·wAa + q²waa. The survivors produce the next generation of gametes, and because an AA adult gives only A gametes while an Aa adult gives half A, the new frequency is p′ = (p²wAA + pq·wAa)/w̄.
A worked case: p = 0.5 with wAA = wAa = 1 and waa = 0.8. The mean fitness is 0.25 + 0.5 + 0.2 = 0.95, so 95 of every 100 zygotes survive; p′ = (0.25 + 0.25)/0.95 = 0.526. One generation moved p by 0.026. The population is treated as infinite, so there is no drift; the same inputs always give the same curve.
Directional selection against a recessive
Why the end is slow
The change per generation can be written Δp = pq[p(wAA − wAa) + q(wAa − waa)]/w̄. The factor pq in front is the point: selection needs variation to act on, and pq is small whenever either allele is rare. With the fitnesses of the figure, Δp is 0.0024 at p = 0.01, 0.026 at p = 0.5 and only 0.0005 at p = 0.95.
The slowness at the end has a second cause. Selection here acts only against aa, and when a is rare almost every a copy sits inside an Aa heterozygote, which is as fit as AA. At p = 0.95 only q² = 0.0025 of the population is aa, so selection cannot reach the other 2pq = 0.095 of individuals that carry a. After 200 generations q is still 0.029. A rare recessive allele is nearly invisible to selection, which is why harmful recessives persist in real populations.
The mirror case, selection against a dominant allele, is fast at the end and slow at the start: a rare dominant allele is exposed in every heterozygote that carries it. The Dominance and Selection module lets you set the dominance coefficient h directly and compare several values on one chart.
Exercise
Follow the S-shaped curve
Open the module with its defaults (wAA 1, wAa 1, waa 0.8, P(A) 0.01, Gen 200) and press Run. Hover the chart to read p at generations 26, 75 and 200.
What to expect. The readings are about 0.50, 0.90 and 0.971. Then set waa to 0.5 and run again: the curve is steeper, but the approach to 1 is still slow.
Open the walkthrough step →Heterozygote advantage
A balance inside the range
When the heterozygote is fitter than both homozygotes (overdominance), neither allele can win. Whichever allele is common ends up mostly in the less fit homozygote, so selection pushes it back down. The frequency settles at p̂ = (wAa − waa)/(2wAa − wAA − waa), which for the figure is 0.3/0.4 = 0.75. Starting from p₀ = 0.99 the curve returns to the same value from above.
This is the classic explanation of balanced polymorphism, with sickle-cell haemoglobin in malarial regions as the textbook example. Note what the balance costs: at equilibrium a fraction 2p̂q̂ of each generation is heterozygous, but p̂² + q̂² of it is a less fit homozygote. The mean fitness at p̂ is below wAa, and the population carries that load every generation.
The same formula gives an equilibrium when the heterozygote is the least fit (underdominance), but then the sign of the denominator flips and the balance is unstable. The module labels p̂ stable or unstable and draws it solid or dashed.
Heterozygote disadvantage
Exercise
Cross the unstable point
Set wAA 1, wAa 0.8, waa 0.9 and Gen 100. Run with P(A) 0.4, save the run, then run with P(A) 0.3 and overlay the two.
What to expect. The first curve goes to 1 and the second to 0, on either side of the dashed line at 0.333. From P(A) 0.3 the frequency is below 0.01 by generation 59. Which allele wins depends on the starting frequency, not on which homozygote is fitter.
Open the walkthrough step →Summary
- Selection acts on genotype fitnesses wAA, wAa and waa; the new frequency is p′ = (p²wAA + pq·wAa)/w̄.
- The change per generation carries a factor pq, so selection is slow whenever either allele is rare.
- Selection against a recessive stalls at the end because rare a copies hide in heterozygotes.
- Overdominance keeps both alleles at the stable balance p̂ = (wAa − waa)/(2wAa − wAA − waa).
- Underdominance has the same p̂ but it is unstable: the starting frequency decides which allele fixes.
- The model is deterministic and infinite; the Drift + Selection module adds chance back in.