SimuVeda

Biology · Simulator 040

Genetic Drift

Run many identical populations side by side, with no selection at all, only the luck of who reproduces. Watch allele frequencies wander and eventually hit 0% or 100%. Change the population size and see how much faster small populations lose variety.

How the model works

In the Wright–Fisher model, each new generation of N diploid individuals (2N gene copies) is drawn at random from the previous one. If an allele has frequency p, the number of copies next generation is binomial: k ~ Binomial(2N, p). On average p stays the same, but it jitters, and the jitters accumulate.

variance per generation: p(1 − p) / 2N
heterozygosity: H_t ≈ H₀ (1 − 1/2N)^t

Eventually every population fixes at 100% or loses the allele at 0%. The chance of fixation equals the starting frequency. The expected time to fixation from p = 0.5 is about 2.8 N generations, so small populations lose variation quickly. This is why bottlenecks and founder effects matter for endangered species.

Each line is one population, with a fixed random seed for reproducible comparisons.

Neutral alleles, constant population size, random mating and no mutation or migration.

Guided experiments

  1. Small populations. N = 10, 20 replicates, p = 0.5. Prediction: most lines hit 0 or 1 within about 30–60 generations, roughly half each way.
  2. Large populations. N = 500. Prediction: lines stay near 0.5 for hundreds of generations. Drift is weak in large populations.
  3. Rare new allele. p = 0.05, N = 50. Prediction: about 95% of populations lose it, about 5% fix it, purely by chance.

Challenge

A population of 2000 butterflies crashes to 10 survivors for one generation, then recovers. How much heterozygosity is lost in that bottleneck generation, compared with a normal generation?

Reveal the explanation

Loss per generation is 1/(2N). At N = 10 that is 1/20 = 5% in a single generation, against 1/4000 = 0.025% normally, 200 times more. A few bottleneck generations can erase variation that took thousands of generations to build up.

References

  • OpenStax, Biology 2e, §19.2 “Population Genetics”.
  • Hartl & Clark, Principles of Population Genetics, ch. 3.