Thought Toys · Chance & inference · Exhibit 52

Genetic drift

No mutation, no advantage, no disadvantage — just chance sampling one generation into the next. Run the same neutral population many times over and something strange shows up: almost every single run ends up entirely one type or the other, yet in a neutral population their average never drifts from where it started.

Many populations, same start — frequency of one gene variant over time

The populations
your turn — see what tips the balance

What you're seeing

Each thin line is its own separate population, all starting at the same frequency. Every generation, each population resamples itself entirely by chance — like drawing next year's parents out of a hat, weighted only by how common the variant already is (or, if you add selection, weighted a little more or less by how fit it is). There is no "trying" to spread and no "trying" to die out; it's sampling noise, generation after generation, compounding.

Watch what happens to any one line: sooner or later it hits the floor (the variant vanished) or the ceiling (the variant is now the only one left) and stops — a population can't un-fix a gene. Every line eventually gets absorbed at 0% or 100%. But watch the bold average line instead, and — as long as selection is exactly zero — it barely moves from the starting frequency, the whole time. Every individual population is careening toward an extreme; their average is standing almost perfectly still. That's not a coincidence, it's a theorem.

Now nudge selection off zero. A small edge does nothing to a small population's fate most of the time — chance still runs the show. But make the population big enough, or the edge strong enough, and the tug-of-war flips: the favored variant starts winning almost every single run, no matter how rare it started out. The quantity that decides which regime you're in — population size times selection strength, not selection strength alone — is the dial underneath the dial.

The rule, exactly. A haploid population of N genes carries k copies of the tracked variant (frequency p=k/N). Each generation resamples: k' ~ Binomial(N, psel),   psel = (1+s)k ⁄ ((1+s)k+(Nk)) which reduces to plain Binomial(N,p) when s=0. Because E[k'|k]=k exactly when neutral, p is a martingale; since the chain always eventually gets absorbed at 0 or N, that forces P(fixation)=p0exactly, for any N. Verified in node (improve/verify/52-wright-fisher.js): across thousands of replicate runs, fixation frequency lands within Monte Carlo error of p0 at several N and p0; mean time-to-absorption grows with N, tracking the diffusion approximation (p0) 2N[p0lnp0+(1p0)ln(1p0)] to within a few percent (e.g. N=100: 141.1 simulated vs. 138.6 predicted generations). Counter-example: turn on selection strong enough that N·s≫1 and the identity breaks hard — starting at p0=0.1 with s=+0.25 (N·s=25) fixes 99.3% of the time; starting at p0=0.9 with s=−0.25 is lost 99.6% of the time. A comparably small s=0.003 with N·s=0.06 still lands within Monte Carlo error of the neutral law (0.313 vs. the predicted 0.30) — it's the product that decides, not the raw sign of s.

Also in Chance & inference: The gaps are chaos. The count is law. →

All 16 in Chance & inference
  1. 05The Galton board
  2. 06The Monty Hall problem
  3. 09Bayes' theorem
  4. 13Buffon's needle
  5. 14The central limit theorem
  6. 28Simpson's paradox
  7. 30Markov chains
  8. 31Averages that never settle
  9. 35The birthday paradox
  10. 38The drunkard's walk
  11. 39Zipf's law
  12. 40Benford's law
  13. 42The coupon collector's problem
  14. 48The wisdom of crowds
  15. 52Genetic drift — you are here
  16. 63The gaps are chaos. The count is law.

← the cabinet · Thought Toys — a cabinet of explorable explanations. Exhibit 52.