Genetic Drift Simulator: Wright-Fisher Model of Random Allele Frequency Change

simulator intermediate ~10 min
Loading simulation...
With N=100 and p₀=0.5, expect 2-3 of 5 replicates to fix or lose the allele within 200 generations

In a population of 100 diploid individuals starting at p=0.5, genetic drift causes substantial allele frequency fluctuations. Over 200 generations, roughly half the replicate populations will have fixed or lost the allele entirely, demonstrating that drift is a powerful evolutionary force in small populations.

Formula

X(t+1) ~ Binomial(2N, p(t))
H(t) = H(0) × (1 − 1/(2N))^t
E[T_fixation] ≈ 4N generations
Var(Δp) = p(1−p) / (2N)

Genetic Drift: Evolution by Chance

While natural selection is often considered the primary driver of evolution, genetic drift — the random fluctuation of allele frequencies due to finite population size — is an equally fundamental force. First formalized by Sewall Wright in his landmark 1931 paper, drift demonstrates that evolution does not require adaptation; it can proceed through sheer chance alone.

The Wright-Fisher Model

The Wright-Fisher model captures drift with elegant simplicity. Consider a diploid population of N individuals (2N allele copies). Each generation, offspring independently sample their alleles from the parental pool. The number of copies of allele A in the next generation follows a binomial distribution: X(t+1) ~ Binomial(2N, p(t)), where p(t) is the current allele frequency.

This random sampling introduces variance: Var(Δp) = p(1-p)/(2N). Small populations have large variance — their allele frequencies bounce around erratically. Large populations have tiny variance — their frequencies barely move. This is why drift is often described as the 'population size effect' in evolution.

Consequences of Drift

Loss of variation: Drift is a one-way ratchet for genetic diversity. Every generation, heterozygosity decays by a fraction 1/(2N). Once an allele reaches frequency 0 or 1, it is permanently fixed or lost (absent mutation). The expected heterozygosity after t generations is H(t) = H(0)(1 - 1/(2N))^t.

Fixation probability: For a neutral allele (no fitness effect), the probability of eventual fixation equals its initial frequency: P(fix) = p₀. This remarkable result means a new mutation (p₀ = 1/(2N)) has a fixation probability of exactly 1/(2N) — most mutations are lost by drift.

Time to fixation: The expected time for a neutral allele to fix, conditional on fixation, is approximately 4N generations. In a population of 100, this means ~400 generations; in a population of 10,000, ~40,000 generations.

Drift vs. Selection

When is drift stronger than selection? The critical threshold is |s| < 1/(2N), where s is the selection coefficient. For a population of N=100, any selection coefficient smaller than 0.005 is effectively invisible — drift overwhelms selection. This is why Motoo Kimura's Neutral Theory (1968) argues that most molecular evolution is driven by drift acting on selectively neutral or nearly neutral mutations, not by positive selection.

Explore the simulator above: watch how small populations (N=10-50) show dramatic frequency swings and rapid fixation, while large populations (N=5000+) maintain diversity over hundreds of generations.

FAQ

What is genetic drift?

Genetic drift is the random change in allele frequencies that occurs because populations are finite. Each generation, alleles are sampled randomly from the parent generation to form offspring, introducing stochastic variation. Over time, this random walk leads to allele fixation (frequency = 1) or loss (frequency = 0).

What is the Wright-Fisher model?

The Wright-Fisher model, developed by Sewall Wright and R.A. Fisher, is the foundational mathematical model for genetic drift. It assumes non-overlapping generations, constant population size, random mating, and no selection. In each generation, 2N allele copies are drawn randomly from the previous generation's allele pool.

How does population size affect genetic drift?

Drift is inversely proportional to population size. In small populations (N < 100), allele frequencies fluctuate wildly and fixation occurs rapidly. In large populations (N > 10,000), drift is negligible and frequencies remain nearly stable. The expected time to fixation for a neutral allele is approximately 4N generations.

What is the expected heterozygosity under drift?

Expected heterozygosity decays as H(t) = H(0) × (1 - 1/(2N))^t, where N is the population size and t is the number of generations. This shows that heterozygosity is lost at a rate of approximately 1/(2N) per generation.

Sources

Embed

<iframe src="https://homo-deus.com/lab/evolution/genetic-drift/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub