---
title: "Fixation probability and time, and why a better mutant often loses"
description: "Add selection to random sampling, solve the Moran model exactly, derive the diffusion formula and test both on thousands of seeded populations."
canonical_url: "https://sandboxphysics.com/stories/evolution-statistical-physics/fixation-probability-and-time/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/evolution-statistical-physics/fixation-probability-and-time/"
last_modified: "2026-10-30"
---

[Evolution as statistical physics](https://sandboxphysics.com/stories/evolution-statistical-physics/)

L2 · Chapter 2

# Fixation probability and time, and why a better mutant often loses

Sandbox Physics · 2026-10-30

A mutant that grows five per cent faster sounds like a sure winner. In a population of fifty it is lost about nine times out of ten. Early on it exists as one or two copies, and a single unlucky generation removes it before its advantage can count. This chapter computes that probability three ways, exactly and approximately, and checks them against simulations.

## Before you begin

The previous chapter: Wright–Fisher sampling, its mean and variance, and the neutral fixation probability. Exponentials, and solving a first-order linear differential equation, are used once.

- Compute the fixation probability of a mutant in the Moran model from the recursion for birth-death chains.
- Derive the diffusion formula for the Wright–Fisher model, and explain when drift or selection dominates through the product of population size and selection coefficient.

## Selection tilts the draw

Give every $A$ individual a relative fitness $1+s$, where $s$ is the selection coefficient. In the Wright–Fisher draw, a child now picks an $A$ parent with probability $p'$ instead of $p$. A positive $s$ favours the mutant and a negative one harms it.

The mean change per generation is about $s\,p(1-p)$, a push towards fixation. The random part is the same as before, with variance $p(1-p)/N$. Selection wins when its push over one generation is large compared with the random step, which happens when $|Ns|$ is large.

$$
p'=\frac{p(1+s)}{1+sp},\qquad \mathrm{E}[\Delta p]\approx s\,p(1-p),\qquad \mathrm{Var}[\Delta p]\approx\frac{p(1-p)}{N}
$$

Mean and variance of the change in one generation, to first order in the selection coefficient.

Source: K. S. Korolev · O. Hallatschek and D. R. Nelson

## An exact answer for the Moran model

The Moran model changes one individual at a time. In each step one individual is chosen to reproduce, with probability proportional to fitness, and one is chosen uniformly to die. The number of mutants moves up by one, down by one, or stays put, so the process is a birth-death chain.

Let $\phi_i$ be the probability that $i$ mutants eventually take over. Conditioning on the first step that changes $i$ gives a recursion with $\phi_0=0$ and $\phi_N=1$. Its solution depends only on the ratio of the down and up probabilities, which equals $1/r$ for constant fitness $r$. For neutral mutants it reduces to $\phi_i=i/N$, as in the previous chapter.

One Moran generation is $N$ steps. Traced backwards, its lineages merge twice as fast per generation as Wright–Fisher lineages, so its drift is twice as strong. The same $s$ then gives about half the fixation probability.

$$
\phi_i=\frac{1-r^{-i}}{1-r^{-N}},\qquad r=1+s
$$

Probability that $i$ mutants of relative fitness $r$ take over a Moran population of $N$.

Source: A. Traulsen and C. Hauert · N. Berestycki

## The diffusion formula for Wright–Fisher

The Wright–Fisher chain has no closed form with selection, but it can be solved numerically, and for large $N$ it has a good approximation. Let $u(p)$ be the fixation probability from frequency $p$. After one generation the frequency has moved by a small random step, and $u$ must equal its own average over that step. Expanding to second order in the step gives the equation below.

Divide by $p(1-p)/(2N)$ to get $u''=-2Ns\,u'$, so $u'$ decays as $e^{-2Nsp}$. Integrating once and imposing $u(0)=0$ and $u(1)=1$ gives the result on the right. A single mutant in a large population fixes with probability close to $2s$ when $Ns$ is large, and close to $1/N$ when $Ns$ is small.

$$
\frac{p(1-p)}{2N}\,u''(p)+s\,p(1-p)\,u'(p)=0\ \Longrightarrow\ u(p)=\frac{1-e^{-2Nsp}}{1-e^{-2Ns}}
$$

The diffusion approximation for the Wright–Fisher fixation probability.

Source: O. Hallatschek and D. R. Nelson · N. Berestycki

## Worked example: a five per cent advantage among fifty

Problem. One mutant with $s=0.05$ appears in a population of $N=50$. How likely is it to fix in the Wright–Fisher model, and how long does a successful mutant take?

Diffusion. With $2Ns=5$ and $p=0.02$, $u=(1-e^{-0.1})/(1-e^{-5})=0.0958$.

Exact chain. Writing the $51\times51$ transition matrix and solving the linear equations for absorption gives $0.0941$. The diffusion formula is $1.8$ per cent high. The Moran formula with the same $N$ and $r=1.05$ gives $0.0522$, about half, as expected from its stronger drift.

Time. The exact chain gives a mean of $75.8$ generations for mutants that fix, against $97.0$ for a neutral mutant in the same population. Successful favoured mutants rise faster.

Check. In $12000$ seeded replicate populations of the Lab preset Better, yet usually lost, the mutant fixed in a fraction $0.0948\pm0.0027$ and took $77.6\pm1.1$ generations. The fraction is within a quarter of a standard error of the exact value; the time is $1.6$ standard errors high, which is within ordinary scatter.

Answer. More than nine favoured mutants in ten are lost. The $2s$ rule of thumb, $0.1$, is already close.

Source: A. Traulsen and C. Hauert · O. Hallatschek and D. R. Nelson

## When drift beats selection, and when it does not

The product $Ns$ decides. In a population of $20$ a harmful mutant with $s=-0.05$ starting at $p=0.3$ still fixes with exact probability $0.1255$, far above zero; the Lab measures $0.1304\pm0.0031$. In a population of $100$ a mutant with $s=0.05$ starting at $p=0.1$ fixes with probability $0.625$, six times its starting frequency.

Across the five Lab presets, the simulated fixation fractions and times scatter around the exact values as the standard errors predict. That check only tests the simulation against the exact chain of the same model. Whether real populations behave like Wright–Fisher sampling is a separate question.

Source: K. S. Korolev · A. Traulsen and C. Hauert

## Try it in the Lab

### [Watch a better mutant get lost](https://sandboxphysics.com/labs/neutral-drift-fixation/)

1. Choose Better, yet usually lost. Predict the fraction of populations in which the mutant fixes before reading the exact value.
2. Set the selection coefficient to zero and keep everything else. Predict how much the fraction drops, then check it.
3. Choose Selection wins in a larger group, then lower the population size towards ten. Explain with the product of population size and selection coefficient why the advantage stops mattering.

## Exercises with explained answers

1. In a Moran population of $N=10$, one mutant has relative fitness $r=1.1$. What is its fixation probability, and how does it compare with a neutral mutant?

   Show the answer

   $\phi_1=(1-1/1.1)/(1-1.1^{-10})=0.0909/0.6145=0.148$. A neutral mutant fixes with probability $0.1$, so the advantage raises the chance by about half.

2. Use the diffusion formula for one mutant with $s=0.01$ in a Wright–Fisher population of $N=1000$.

   Show the answer

   Here $p=0.001$ and $2Ns=20$. $u=(1-e^{-0.02})/(1-e^{-20})=0.0198$, which is almost exactly $2s$: the mutant is lost about $98$ times in $100$.

3. The Lab estimates a fixation probability near $0.094$ from $12000$ populations. What is the binomial standard error, and how many populations would bring it down to $0.001$?

   Show the answer

   $\sqrt{0.094\times0.906/12000}=0.0027$. The error falls as one over the square root of the number of runs, so $0.001$ needs $0.094\times0.906/0.001^2\approx85000$ populations.

[Previous: Genetic drift lets a neutral gene take over a finite population](https://sandboxphysics.com/stories/evolution-statistical-physics/drift-in-a-finite-population/) [Next: The coalescent traces a sample back to its common ancestor](https://sandboxphysics.com/stories/evolution-statistical-physics/ancestry-and-the-coalescent/)

## 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)](https://arxiv.org/abs/0904.4625v2)

   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. [A. Traulsen and C. Hauert, Stochastic evolutionary game dynamics, arXiv:0811.3538v1 (2008), in Reviews of Nonlinear Dynamics and Complexity, Vol. II](https://arxiv.org/abs/0811.3538v1)

   Version 1, full text. Section 1.3.1: the Moran process as a birth-death chain with transition probabilities. Section 1.3.2, Eqs. (1.7)-(1.20): fixation probabilities from a recursion, with the closed form of Eq. (1.20), which reduces to the starting fraction for neutral selection. Eqs. (1.26)-(1.35): mean and conditional fixation times.

3. [N. Berestycki, Recent progress in coalescent theory, arXiv:0909.3985v1 (2009), Ensaios Matemáticos, Sociedade Brasileira de Matemática](https://arxiv.org/abs/0909.3985v1)

   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 $N$ 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.

4. [O. Hallatschek and D. R. Nelson, Life at the front of an expanding population, arXiv:0810.0053v2 (2008)](https://arxiv.org/abs/0810.0053v2)

   Version 2, full text. Eq. (41): a selective advantage gives sector boundaries a mean drift on top of their diffusion. Eq. (42): the drift is $\tan(\Phi/2)$ for opening angle $\Phi$. Eq. (46): $\cos(\Phi/2)$ is the ratio of wild-type to mutant front speed. Eq. (49): survival probability of a beneficial sector at a linear front; its footnote 4 notes the formal similarity to the Kimura fixation probability in a well-mixed population.
