Biology · Simulator 040
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)
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.
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?
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.
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.
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.
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.
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.