Hardy–Weinberg equilibrium, selection and genetic drift

BiologyGeneticsAges 17–18

Use with my class

A randomly mating population with two alleles A and a: genotype frequencies p², 2pq and q² are calculated and plotted every generation alongside an illustrative cloud of individuals. With no selection and a large population, allele frequencies stay constant across generations (Hardy–Weinberg equilibrium); turn on selection against the recessive phenotype or shrink the population size to see allele frequency shift directionally or fluctuate at random, sometimes eliminating an allele altogether.

Lesson: Population genetics: random-mating populations, the Hardy–Weinberg law, factors that change allele frequencies

What it shows

The Hardy–Weinberg principle states that in a large, randomly mating population with no selection, mutation or migration, the allele frequencies p and q stay constant and genotype frequencies settle at p², 2pq and q² after one generation. The simulation follows two alleles, A and a, generation by generation. Selection against the aa phenotype lowers the fitness of recessive homozygotes, so q falls steadily but ever more slowly, because recessive alleles hidden in heterozygotes escape selection. Genetic drift, the random sampling of gametes in a small population, makes p wander unpredictably and can fix or lose an allele.

How to use

Start with a large Population size N and the Selection coefficient against recessive aa at 0, then press Next generation a few times: p stays near the dashed line. Raise the selection coefficient and let the run continue to see directional change. Press Reset, set N to a few dozen with Random sampling of gametes (genetic drift) on, and repeat several runs to compare how often an allele is lost.

Parameters you can change

  • Initial allele frequency of A (p) 0.05–0.95
  • Population size N 10–5000 individuals
  • Selection coefficient against recessive aa 0–1
  • Random sampling of gametes (genetic drift)
  • Generations per second 1–20 gen/s

Questions to explore

  1. In a population at equilibrium with p = 0.6, what percentage of individuals are heterozygous?
  2. Why does selection against aa rarely eliminate allele a completely, even after many generations?
  3. Why can genetic drift in a small population eliminate an allele even without any selection?

Teaching ideas

All guides