Skip to main content
Sandbox Physics
Evolution as statistical physics

L1 · Chapter 1

Genetic drift lets a neutral gene take over a finite population

Fifty bacteria share a flask. All are equally fit, and one carries a harmless mutation. Every generation the flask is refilled to fifty by copying cells picked at random. Nobody is better than anybody else, yet after about a hundred generations every cell carries the same version of the gene. Random sampling alone does this, and the size of the population sets how fast.

A population that copies itself at random

Take NN individuals, each carrying one copy of a gene in one of two versions, called alleles: the mutant AA or the original aa. Let ii be the number of AA individuals and p=i/Np=i/N their frequency. Time is counted in generations, and parents die when their children are born.

To build the next generation, each of its NN members picks a parent at random from the current one, with every parent equally likely, and copies its allele. The picks are independent. The number of AA children is then a binomial count: NN trials, each a success with probability pp. This is the Wright–Fisher model.

Nothing in the rule favours either allele. Every change in frequency comes from the luck of the draw, and population geneticists call it genetic drift.

P(it+1=j∣it=i)=(Nj)p j(1−p)N−j,p=iNP(i_{t+1}=j\mid i_t=i)=\binom{N}{j}p^{\,j}(1-p)^{N-j},\qquad p=\frac{i}{N}
The chance of jj mutant children when the parents hold ii mutants.

Source: K. S. Korolev · N. Berestycki

The average stays put while the spread grows

A binomial count with NN trials has mean NpNp and variance Np(1−p)Np(1-p). Dividing by NN gives the frequency in the next generation:

The mean does not move. Each generation adds a random step whose typical size is p(1−p)/N\sqrt{p(1-p)/N}, and the steps add up like a random walk. The walk ends when the frequency reaches 00 or 11, because a population with no copy of an allele can never draw one again. The allele is then lost or fixed.

Now average over many populations that start at the same p0p_0. The average frequency is the same in every generation, so at the end it still equals p0p_0. At the end each population sits at 00 or 11, and the average is the fraction that reached 11. A neutral allele therefore fixes with probability u(p0)=p0u(p_0)=p_0.

E[pt+1∣pt]=pt,Var[pt+1∣pt]=pt(1−pt)N\mathrm{E}[p_{t+1}\mid p_t]=p_t,\qquad \mathrm{Var}[p_{t+1}\mid p_t]=\frac{p_t(1-p_t)}{N}
Drift has no direction. Its strength falls as the population grows.

Source: N. Berestycki · K. S. Korolev

Heterozygosity: the chance that two individuals differ

To follow diversity, draw two individuals at random, with replacement. They carry different alleles with probability H=2p(1−p)H=2p(1-p), called the heterozygosity. It is largest at p=1/2p=1/2 and zero once one allele has fixed.

Average HH over the next draw. The mean square of the new frequency is the square of its mean plus its variance, E[pt+12]=pt2+pt(1−pt)/N\mathrm{E}[p_{t+1}^2]=p_t^2+p_t(1-p_t)/N. Substituting gives a one-line recursion:

Each generation removes a fraction 1/N1/N of the expected diversity. A population of 5050 keeps about e−1≈0.37e^{-1}\approx0.37 of it after 5050 generations. A population ten times larger needs ten times as long.

E[Ht+1]=2(E[pt+1]−E[pt+12])=(1−1N)Ht ⟹ Ht=H0(1−1N)t≈H0 e−t/N\mathrm{E}[H_{t+1}]=2\left(\mathrm{E}[p_{t+1}]-\mathrm{E}[p_{t+1}^2]\right)=\Bigl(1-\frac1N\Bigr)H_t\ \Longrightarrow\ H_t=H_0\Bigl(1-\frac1N\Bigr)^{t}\approx H_0\,e^{-t/N}
The expected heterozygosity decays exponentially, with a time constant of one population size in generations.

Source: K. S. Korolev

Worked example: one neutral mutant among fifty

Problem. A population of N=50N=50 starts with one neutral mutant. How likely is the mutant to fix, how long does fixation take when it happens, and how much diversity is left after 5050 generations?

Fixation. The starting frequency is p0=1/50=0.02p_0=1/50=0.02, so u=0.02u=0.02. In 4949 populations out of 5050 the mutant disappears.

Time. For large NN the frequency behaves like a diffusion, and one unit of diffusion time equals NN Wright–Fisher generations. The mean time to fixation, counted only in populations where the mutant fixes, is then given by the formula below. At p=0.02p=0.02 it gives 99.099.0 generations. Solving the finite Wright–Fisher chain exactly gives 96.9796.97 generations; the diffusion formula is a few per cent high because it treats NN as large.

Diversity. H0=2×0.02×0.98=0.0392H_0=2\times0.02\times0.98=0.0392, and after 5050 generations H50=0.0392×0.9850=0.0143H_{50}=0.0392\times0.98^{50}=0.0143.

Check. The drift Lab runs this case as 1200012000 seeded replicate populations. The mutant fixed in a fraction 0.0212±0.00130.0212\pm0.0013 of them, within one standard error of 0.020.02, and the populations where it fixed took 96.2±3.496.2\pm3.4 generations.

tˉfix(p)≈−2N(1−p)ln⁡(1−p)p\bar t_{\mathrm{fix}}(p)\approx-\frac{2N(1-p)\ln(1-p)}{p}
Mean generations to fixation, given that the allele fixes, from the diffusion limit of the neutral model.

Source: N. Berestycki · K. S. Korolev

Try it in the Lab

Let luck decide a neutral gene

  1. Choose the preset One neutral newcomer. Before the batch finishes, predict what fraction of the replicate populations will end with the mutant fixed.
  2. Switch to Half and half: a coin flip and predict again. Then compare both measured fractions with the exact values shown beside them.
  3. Double the population size and keep the starting frequency. Predict how the mean time to fixation changes, run it, and explain the result with the variance per generation.

Exercises with explained answers

  1. A neutral allele has frequency 0.250.25 in a population of 2020. What is the chance that it fixes? Does the answer change for a population of 20002000?

    Show the answer

    It fixes with probability 0.250.25 in both. The expected frequency never changes, and at the end it is 00 or 11, so the fraction of populations that fix equals 0.250.25. Population size changes how long it takes, not the odds.

  2. How many generations does a population of N=100N=100 need to lose half of its expected heterozygosity?

    Show the answer

    Solve (1−1/100)t=1/2(1-1/100)^t=1/2, which gives t=ln⁡2/ln⁡(100/99)≈69t=\ln2/\ln(100/99)\approx69 generations. The shortcut t≈Nln⁡2=69.3t\approx N\ln2=69.3 agrees to within one generation.

  3. In one run, a mutant rises from 0.020.02 to 0.40.4 in thirty generations. Does that show the mutant is favoured?

    Show the answer

    No. A neutral allele that ends up fixed must climb through every frequency on the way, and about one population in 5050 does so by luck. One trajectory cannot separate luck from advantage. The fraction of many replicate populations that fix can, because selection moves it away from the starting frequency.

Sources and what we recomputed

  1. K. S. Korolev, M. Avlund, O. Hallatschek and D. R. Nelson, Genetic demixing and evolutionary forces in the one-dimensional stepping stone model, arXiv:0904.4625v2 (2011)

    Version 2, full text. Section II, Population genetics in well-mixed populations: genetic drift as random sampling of a finite population, the heterozygosity as the chance that two sampled individuals differ, and its loss with time.

  2. N. Berestycki, Recent progress in coalescent theory, arXiv:0909.3985v1 (2009), Ensaios Matemáticos, Sociedade Brasileira de Matemática

    Version 1, full text. Section 2.1.1: the Kingman coalescent, in which each pair of lineages merges at rate one. Theorem 2.3: the Moran genealogy becomes this coalescent after rescaling time. Theorem 2.4: the Wright-Fisher genealogy does too when time is measured in units of NN generations. Theorem 2.8, Eqs. (36)-(38): a neutral allele fixes with probability equal to its frequency, with the diffusion formula for the mean absorption time; the formula after it gives the time conditioned on fixation.

FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy