Drift and mutation together
Mutation pulls every population towards one balance point, and the size of the population sets how far drift scatters them around it.
Read first: Genetic drift
Mutation first, then sampling
The Drift + Mutation module adds recurrent mutation to the Wright-Fisher model of pure drift. Allele A mutates to a at rate μ per generation, and a mutates back to A at rate ν. Each generation has two steps. Mutation comes first and is deterministic: p′ = p(1 − μ) + (1 − p)ν. Sampling comes second and is random: the count of A copies is a draw from Binomial(2N, p′).
Mutation alone has a balance point. A is lost at rate μp and gained at rate ν(1 − p). The two flows are equal at p̂ = ν/(μ + ν). With μ = 0.01 and ν = 0.005 this is 0.005/0.015 = 1/3. The balance does not depend on N, and the distance to it shrinks by a factor (1 − μ − ν) = 0.985 per generation.
Mutation also keeps variation alive. In pure drift the frequencies 0 and 1 trap a population for good. With μ and ν above zero, a population at p = 0 can regain A when a copy of a mutates, so neither end is absorbing.
A hundred individuals around the balance
What sets the spread
The mean is near p̂ = 0.333 and the populations are scattered around it. Mutation pulls each population back, and sampling pushes each one away. The two reach a standing balance in which p follows a Beta(4Nν, 4Nμ) distribution (a diffusion approximation). For N = 100 this is Beta(2, 4), with mean 1/3 and standard deviation √(2 × 4/(6² × 7)) = 0.178. The run above gives 0.169.
The size of N enters through the product 4Nμ. A larger N gives larger Beta parameters, which narrows the distribution. At N = 1,000 the parameters are 20 and 40, and the standard deviation falls to 0.060. Ten times more individuals shrinks the spread by a factor of about three, because the standard deviation falls roughly as 1/√(4N).
The balance point itself did not move. Only the scatter around it did.
Exercise
Make the population ten times larger
Set Pop 40, Ne 100, P(A) 0.9, Gen 300, μ 0.01, ν 0.005 and run it. Save the run, change Ne to 1000, run again, and overlay the saved run.
What to expect. The N = 100 lines range from about 0.05 to 0.75. The N = 1000 lines stay between about 0.24 and 0.45, with a standard deviation near 0.05 to 0.06. Both groups centre on 1/3.
Open the walkthrough step →When 4Nμ is small
Drift can win against mutation. If 4Nμ and 4Nν are both well below 1, the Beta distribution turns into a U shape with almost all of its mass at 0 and 1. A population sits at one end, waits for a mutation to arrive, and then drifts to the other end or back.
Take N = 100, μ = 0.0002 and ν = 0.0001. The balance is still 1/3, but 4Nμ = 0.08 and 4Nν = 0.04. After 500 generations the populations are mostly at the ends, and the mean tells you little about any one population.
The order of magnitude of 4Nμ is the number that matters. Above 1, mutation holds the population near p̂. Below 1, drift moves the population to the edges and mutation supplies new variants only now and then.
Rare mutation, N = 100
Exercise
Switch the back mutation off
Set ν 0, μ 0.01, Ne 100, P(A) 0.5, Gen 300 and run it. Read the Lost count in the outcome panel.
What to expect. Most populations end with A lost (36 of 40 in the reference run). With ν = 0 a lost A cannot return, so p = 0 is absorbing, while p = 1 is not, because μ > 0 still converts A copies to a.
Open the module →Summary
- Each generation applies mutation, p′ = p(1 − μ) + (1 − p)ν, and then samples 2N copies from Binomial(2N, p′).
- The mutation balance is p̂ = ν/(μ + ν) and does not depend on N; with μ = 0.01 and ν = 0.005 it is 1/3.
- Drift scatters populations around p̂ with a Beta(4Nν, 4Nμ) shape: standard deviation 0.178 at N = 100, 0.060 at N = 1000.
- When 4Nμ is below about 1, populations sit at 0 or 1 and mutation only occasionally moves them.
- With the default rates μ = 0.0001 and ν = 0.00001, mutation is too weak to see at N = 20.