Genetic Drift and the Wright-Fisher Model, Explained

After reading this you will be able to predict how fast a neutral gene variant fixes or vanishes by chance alone, compute the drift from one generation to the next, and tell when randomness beats a mild selective advantage.

What genetic drift is

Imagine a small island with 10 diploid finches. Each bird carries two copies of a gene, so the population holds 2N = 20 gene copies. Suppose 10 of those copies are variant A and 10 are variant a. The frequency of A is p = 0.5.

Now the birds reproduce. No variant helps a bird survive or mate better: A and a are equally fit. Yet the next generation is not guaranteed to hold 10 copies of A again. Reproduction is a lottery. Some birds leave more offspring than others by luck, and each offspring inherits copies drawn at random. The count of A in the next generation might be 8, or 13, or anything else.

That random wandering of allele frequency is genetic drift. Run it long enough and one variant always wins: the frequency hits either 0 (the allele is lost) or 1 (the allele is fixed). Once it hits an edge with no mutation, it stays there. Diversity is gone for good.

The hook is the speed. On this 20-copy island, half of all starting-at-0.5 populations reach an edge within roughly 28 generations. Scale up to 10,000 finches and the same event takes tens of thousands of generations. Small populations lose diversity fast.

When to use this model, and when not

The Wright-Fisher model is the standard starting point for neutral evolution. Reach for it when you want the pure statistics of sampling: a fixed population size, discrete non-overlapping generations, and random mating. It answers questions like "how likely is this variant to fix?" and "how long until diversity collapses?"

Do not use it as a literal biography of any real species. Real populations have overlapping generations, migration, fluctuating size, spatial structure, and selection that changes with the environment. The model ignores all of that. It is a null hypothesis: it tells you what you would see from chance alone, so you can judge whether a real pattern needs a fancier explanation.

A useful way to read any drift result: if pure chance already explains the pattern, you do not need selection to explain it. Selection is the extra story you invoke only when drift falls short.

The formula and the intuition behind it

Let N be the number of diploid individuals, so there are 2N gene copies. Let p_t be the frequency of allele A in generation t. To build the next generation, draw 2N copies at random, each one being A with probability p_t. The number of A copies, call it i, follows a binomial distribution:

P(i \mid p_t) = \binom{2N}{i} \, p_t^{\,i} \, (1 - p_t)^{\,2N - i}

Here \binom{2N}{i} counts the ways to choose which draws are A, p_t^{\,i} is the chance those i draws all come up A, and (1-p_t)^{2N-i} is the chance the rest come up a. The new frequency is p_{t+1} = i / 2N.

Two facts drive everything. First, the expected frequency does not change: on average, p_{t+1} = p_t. Drift has no preferred direction. Second, the variance of the new frequency is

\text{Var}(p_{t+1}) = \frac{p_t \, (1 - p_t)}{2N}

The variance shrinks as N grows. That single 2N in the denominator is why small populations drift hard and large ones barely budge. At p_t = 0.5 with N = 10, the standard deviation of one generation's step is \sqrt{0.25 / 20} \approx 0.112. With N = 1000 it is \sqrt{0.25 / 2000} \approx 0.0112, ten times smaller.

Selection tilts the sampling probability. Give A a relative fitness advantage s, and each draw is A with probability

p_t^{*} = \frac{(1 + s) \, p_t}{(1 + s) \, p_t + (1 - p_t)}

Mutation flips a fraction of copies each generation, feeding lost variants back in. Both are optional adjustments to the same binomial draw.

Population size controls drift speed. At N=10 the one-generation standard deviation of allele frequency near p=0.5 is about 0.112; at N=100 it is about 0.0354; at N=1000 it is about 0.0112. Larger populations take proportionally longer to fix an allele: mean time to fixation or loss scales roughly with N.

A worked example reproducing the demo

The demo button starts every population at frequency p_0 = 0.5 with a small population, no selection and no mutation. Work through the first generation by hand for N = 10, so 2N = 20.

One Wright-Fisher generation by hand

  1. Start with 10 copies of A out of 20, so p_0 = 0.5.
  2. Draw 20 copies. Each is A with probability 0.5. The expected number of A is 20 \times 0.5 = 10.
  3. The spread of that count has standard deviation \sqrt{20 \times 0.5 \times 0.5} = \sqrt{5} \approx 2.24 copies.
  4. So a typical outcome is somewhere between 8 and 12 copies of A. Say the draw gives 12. Then p_1 = 12/20 = 0.6.
  5. Repeat from p_1 = 0.6: the next expected count is 20 \times 0.6 = 12, with the same kind of spread. The walk continues until a draw returns 0 or 20 copies.

The chance of hitting an edge in a single step from p = 0.5 is tiny: 0.5^{20} \approx 9.5 \times 10^{-7} for all-A, and the same for all-a. Fixation almost always takes many generations of wandering, not one lucky jump.

The tool runs many such populations in parallel from the same p_0. Because every line is neutral, they fan out symmetrically around 0.5 at first, then peel off toward the edges one by one.

One sample population that drifts upward and fixes at 1.0 by generation 14. Other runs from the same start would head toward 0 instead.

Reading and interpreting the results

The most important number is the fixation probability. For a neutral allele, it equals the starting frequency. An allele at p_0 = 0.5 fixes in 50% of runs and is lost in the other 50%. An allele at p_0 = 0.1 fixes in only 10% of runs. Run 100 populations and count how many hit 1.0: with p_0 = 0.1 you should see close to 10.

The second number is time to fixation or loss. For a neutral allele starting at 0.5, the mean number of generations until every run has hit an edge is roughly 2.77 N. At N = 10 that is about 28 generations; at N = 100 about 277; at N = 1000 about 2770. The relationship is linear in N.

Neutral drift from p=0.5: how size sets speed and step
N2N copiesOne-step SD of pMean generations to an edge
10200.111827.7
501000.05138.6
1002000.03536277.3
100020000.011182773

When you add selection, watch how often the favored allele still loses. A fresh mutation with advantage s = 0.01 in a population of N = 100 fixes with probability near 2s = 0.02, only 2%. Drift throws away 98 of every 100 beneficial mutations before selection can act on them. That is the central lesson: mild selection is weak against chance in small populations.

Common mistakes

Do not read a rising line as evidence of selection. Half of all neutral lines rise, by definition. A single run tells you almost nothing. Judge selection by comparing many runs against the neutral fixation probability, not by the shape of one trajectory.

Three more traps catch people often.

First, expecting drift to "balance out." Frequencies do not return to 0.5. Once a line drifts to 0.7 it is just as likely to keep rising as to fall back, and it has no memory of where it started. There is no restoring force.

Second, confusing loss with low fitness. In a neutral model, a variant that vanishes was not worse. It was unlucky. Absence in the present is not proof of past disadvantage.

Third, forgetting that mutation changes the endgame. With mutation turned on, alleles never stay permanently fixed or lost, because new copies keep reappearing. The population settles into a balance of drift removing diversity and mutation restoring it, not into a single winner.

Related simulations on this site

Genetic drift is one member of a family of models where simple local rules produce large-scale pattern. To see selection acting on whole organisms rather than abstract alleles, try Evolving Creatures, which reshapes a foraging population generation by generation. For self-organisation from local interactions, Boids Flocking Simulator and Firefly Synchronization both show global order emerging without a leader. If you prefer growth rules, L-System Plants build fractal ferns from short grammars, and Slime Mould Networks grow transport networks from millions of agents.

Frequently asked questions

Why does a neutral allele ever fix if it has no advantage?

Because every generation is a finite random sample. With no mutation and no immigration, the frequency has only two places it can stop wandering: 0 and 1. Given enough time it must reach one of them. The lack of advantage means only that which edge it hits is decided by luck, weighted by the starting frequency.

What population size counts as "small" for drift?

There is no sharp cutoff, but the mean time to fixation scales as about 2.77 N generations. Below a few hundred individuals, drift resolves within human-observable timescales and easily overrides mild selection. Above tens of thousands, drift is slow enough that even weak selection usually dominates.

How strong must selection be to beat drift?

A rough rule: selection wins when N s \gt 1, that is, the population size times the selection coefficient exceeds 1. With N = 100, an advantage of s = 0.01 gives N s = 1, right at the boundary where chance still matters a great deal.

Does the model use real numbers of individuals?

It uses a single number called the effective population size, which is often smaller than the census count because not everyone reproduces equally. The tool treats N as that effective size directly, so read the results as sensitivity to breeding population, not headcount.

Why do the lines fan out and then collapse to the edges?

Early on, every population sits near the start, so the spread of frequencies grows: that is the fanning. Later, lines that reach 0 or 1 stop moving. As more lines get stuck at the edges, the middle empties out and the picture collapses toward two flat bands at 0 and 1.