SimuVeda/ Biology

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.

Class 11–12CollegeClass 12 Biology: Evolution (Hardy–Weinberg, genetic drift)

Experiments 0 of 0 Challenge not tried

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.

Related simulators

Worked example

Start: a population of N = 50 (2N = 100 gene copies) with allele A at p = 0.3.

One generation: the variance of the change is p(1 − p) / 2N = 0.3 × 0.7 / 100 = 0.0021, a standard deviation of about 0.046. So the next generation usually lands between about 0.25 and 0.35, and nobody chose that change.

Fifty generations: heterozygosity starts at 2pq = 0.42 and falls to about 0.42 × (1 − 1/100)50 ≈ 0.42 × 0.61 ≈ 0.25.

The end: in 30% of runs allele A fixes at 100%, in 70% it is lost, because the chance of fixation equals the starting frequency. Set N = 50, p = 0.3 and 100 replicates to check it.

Common questions

What is genetic drift in simple words?

Random change in how common a gene variant is, caused only by which individuals happen to reproduce. No variant is better; luck alone moves the frequency up or down each generation.

Why is genetic drift stronger in small populations?

The random change per generation has variance p(1 − p) / 2N, so it grows as N shrinks. In 10 individuals one lucky parent shifts the frequency a lot; in 10 000 the luck averages out.

How is genetic drift different from natural selection?

Selection changes frequencies in a direction, towards variants that survive or reproduce better. Drift has no direction: on average p stays the same, but each population wanders until the allele fixes or is lost.

Keyboard shortcuts

Space
Play or pause
S
Step
R
Reset
F
Full screen
?
Show this list