Pro 🔒~20 min

Natural Selection & Population Genetics

Darwin's engine of evolution

How it works

Natural selection is the differential survival and reproduction of individuals with heritable traits better suited to their environment. Darwin's four postulates: variation exists in populations; variation is heritable; more offspring are produced than can survive; individuals with favorable traits survive and reproduce more. Hardy-Weinberg equilibrium describes allele frequencies in a non-evolving population (random mating, no selection, no mutation, no migration, large population). Deviations from H-W indicate evolution is occurring. Selection against recessive alleles is slow because heterozygotes 'hide' the allele. Genetic drift (random fluctuations, stronger in small populations) can fix or eliminate alleles regardless of fitness. Bottleneck and founder effects reduce genetic diversity. Over time, selection + isolation → speciation.

Upgrade to Pro to access this experiment

Step-by-step

  1. Choose a background environment (green/brown/mixed) and a starting allele frequency.
  2. Run the simulation and watch the population evolve — camouflaged beetles survive longer.
  3. The allele frequency chart updates each generation.
  4. Enable Hardy-Weinberg mode to check if the population is in equilibrium.
  5. Try bottleneck events (reduce population suddenly) to see genetic drift.

Key formulas

  • p2+2pq+q2=1(Hardy-Weinberg)p^2 + 2pq + q^2 = 1 \quad (\text{Hardy-Weinberg})Hardy-Weinberg: genotype frequencies in a non-evolving population
  • Δp=spq21sq2(selection against recessive)\Delta p = \frac{spq^2}{1 - sq^2} \quad (\text{selection against recessive})Change in allele frequency per generation under selection
  • p+q=1(p=freq(A),q=freq(a))p + q = 1 \quad (p = \text{freq}(A), \, q = \text{freq}(a))Allele frequencies must sum to 1

Frequently asked questions

In a population, the frequency of allele 'a' is q=0.4. Under Hardy-Weinberg equilibrium, what are the frequencies of AA, Aa, and aa genotypes?
P=0.6, q=0.4. AA=p²=0.36, Aa=2pq=0.48, aa=q²=0.16. Check: 0.36+0.48+0.16=1 ✓.
In a sample of 200 individuals, you find 32 individuals with the recessive phenotype (aa). What is the frequency of the recessive allele?
Aa frequency = 32/200 = 0.16 = q². Therefore q = √0.16 = 0.4.
Why does selection against a recessive allele become less effective at low allele frequencies?
At low q, almost all 'a' alleles are hidden in Aa heterozygotes (which are not selected against). Selection can only act on aa homozygotes — very rare when q is small.
A population of 10,000 is reduced to 10 individuals (bottleneck) then recovers. Even if selection is neutral, why might the recovered population have very different allele frequencies?
Genetic drift: with only 10 individuals, allele frequencies fluctuate randomly. Some alleles may be lost entirely (frequency → 0) or fixed (frequency → 1) by chance alone. The founders determine the entire future population's genetic composition — the founder effect.