← Guides Pure Drift

Introductory 12 min read Open the module

Genetic drift

Allele frequencies change by chance alone, faster in small populations, until an allele is fixed or lost.

Read first: Genotype frequencies and Hardy-Weinberg

Drift is sampling error

Take one locus with two alleles, A and a, in a population of N diploid individuals. Each generation the N offspring inherit 2N gene copies, and those copies are a sample of the copies the parents carried. A sample is never exactly the population it came from, so the frequency of A, written p, moves a little every generation even when A and a are equally good at surviving and reproducing. That movement is genetic drift.

The Pure Drift module runs many replicate populations side by side. Every population starts at the same frequency p₀, has the same size N, and experiences no selection, no mutation and no migration. Every difference between the lines on the chart is chance. Drift has no direction, and the average over populations stays at p₀, but each single population wanders.

The model behind the chart is the Wright-Fisher model. With the current frequency p, the number of A copies in the next generation is a draw from Binomial(2N, p), and the new frequency is that count divided by 2N. Every plotted value after generation 0 is therefore a multiple of 1/2N. With N = 20 the possible frequencies are 0, 0.025, 0.05 and so on up to 1.

Ten populations of twenty

Figure 1. Ten replicate populations of N = 20 (40 gene copies), all starting at p₀ = 0.5, for 100 generations. The thick line is the mean over populations. In this run 5 populations have fixed A, 3 have lost it, and 2 are still polymorphic at generation 100.

How big is one step

The size of each random step follows from the binomial draw. The variance of the new frequency around the old one is p(1 − p)/2N, so the typical step is the square root of that. At p = 0.5 and N = 20 the step is √(0.25/40) = 0.079, about 8 percentage points per generation. At N = 500 it is √(0.25/1000) = 0.016, five times smaller.

Two things follow. First, drift is strongest at intermediate frequencies, where p(1 − p) is largest, and weakest near 0 and 1. Second, the strength of drift scales with 1/N: doubling the population halves the variance of a step, which only shrinks the typical step by √2. Population size matters, but it takes a large change in N to make a visible difference on the chart.

Over t generations the steps add up. The variance among replicate populations after t generations is p₀(1 − p₀)[1 − (1 − 1/2N)^t]. For N = 500, p₀ = 0.5 and t = 100 the expected standard deviation among populations is 0.154. The Variance Envelope option on the module draws p₀ ± 2 standard deviations of this expectation around the mean line.

Ten populations of five hundred

Figure 2. The same experiment with N = 500, on the same 0 to 1 axis. After 100 generations no population is fixed or lost. The standard deviation among the ten final frequencies is 0.16, close to the expected 0.15.

Exercise

Compare two population sizes

Open the module and run Pop 10, Ne 20, P(A) 0.5, Gen 100. Save the run from the Runs panel, change Ne to 500, run again and tick the saved run so the two overlay.

What to expect. The N = 20 lines spread across the whole axis and several hit 0 or 1; the N = 500 lines stay in a narrow band around 0.5. Step 3 of the walkthrough shows the same comparison with a fixed seed.

Open the walkthrough step →

Fixation and loss

The frequencies 0 and 1 are absorbing. Once every copy is a, there is no A left to sample, and drift alone cannot bring it back; the same holds once every copy is A. Every population therefore ends in one of two states, and the only questions are which one and how long it takes.

The answer to the first question is simple: a neutral allele fixes with probability equal to its starting frequency, P(fix) = p₀. One way to see it is to label the 2N copies in generation 0. Eventually every copy in the population descends from a single one of them, and each original copy is equally likely to be that ancestor; a fraction p₀ of the original copies were A.

The second question has an answer too. The mean time to absorption, in generations, is about −4N[p₀ ln p₀ + (1 − p₀) ln(1 − p₀)]. From p₀ = 0.5 this is 4N ln 2, about 2.8N generations, which is 55 generations for N = 20 and 1,386 for N = 500. A population that starts near an edge is absorbed sooner, usually at that edge.

Fixation is the end of variation at that locus. Before it arrives, drift already removes heterozygosity on average: the expected heterozygosity H falls by a factor (1 − 1/2N) every generation, so H_t = H₀(1 − 1/2N)^t. It halves in about 2N ln 2 generations, 28 generations at N = 20 and 693 at N = 500. The Heterozygosity Decline module plots this curve next to simulated populations.

This is why drift is the null model of population genetics. Selection, mutation and migration are measured against it: an allele that rises faster than drift could carry it, or a population that keeps more heterozygosity than drift would leave, needs another explanation. The Drift + Selection and Drift + Mutation modules add those forces one at a time to the same chart.

Forty populations from p₀ = 0.3

Figure 3. Forty populations of N = 20 starting at p₀ = 0.3, run for 300 generations. All 40 are absorbed. Theory expects 30% of them, 12, to fix A; in this run 12 fix and 28 lose it. The triangles at the right edge count the outcomes.

Exercise

Test the fixation probability

Set Pop 100, Ne 20, P(A) 0.3 and Gen 500, then run several times and read the Fixed count from the outcomes panel each time.

What to expect. Around 30 of 100 fix, with a run-to-run spread of about ±5 (the binomial standard deviation of the count is 4.6). Try P(A) 0.1 and 0.9 and the Fixed count follows p₀.

Open the walkthrough step →

Summary

  • Drift is the sampling of 2N gene copies each generation: the next count of A is Binomial(2N, p).
  • A single step has standard deviation √(p(1 − p)/2N), so drift is strongest at p = 0.5 and in small populations.
  • The mean over replicate populations stays at p₀; the variance among them grows as p₀(1 − p₀)[1 − (1 − 1/2N)^t].
  • Frequencies 0 and 1 are absorbing, and a neutral allele fixes with probability p₀.
  • Expected heterozygosity decays as (1 − 1/2N)^t, halving in about 1.4N generations.