← Guides Drift + Selection

Core 12 min read Open the module

Drift and selection together

Selection pushes an allele one way every generation, and chance decides whether a small population follows.

Read first: Genetic drift, Natural selection at one locus

Selection first, then sampling

The Drift + Selection module runs replicate populations of N diploid individuals, each with 2N gene copies at one locus with alleles A and a. Every generation has two steps in a fixed order. Selection comes first and is deterministic. Sampling comes second and is random.

In the selection step the genotypes AA, Aa and aa occur in the proportions p², 2pq and q², where q = 1 − p. They survive in proportion to the fitnesses wAA, wAa and waa, and the frequency after selection is p′ = (p²wAA + pq·wAa)/w̄, with mean fitness w̄ = p²wAA + 2pq·wAa + q²waa. In the sampling step the count of A copies is a draw from Binomial(2N, p′), and the new frequency is that count divided by 2N.

A worked case: wAA = 1, wAa = 0.95, waa = 0.9 and p = 0.1. The genotypes occur at 0.01, 0.18 and 0.81, so w̄ = 0.01 + 0.171 + 0.729 = 0.910 and p′ = (0.01 + 0.0855)/0.910 = 0.105. Selection moves p from 0.100 to 0.105. With N = 20 the sampling step then adds noise with a standard deviation of √(0.105 × 0.895/40) = 0.048, ten times the push. Selection acts as a bias in the sample, and the noise decides how much of the bias shows.

Five hundred individuals: selection wins

Figure 1. Forty populations of N = 500, starting at p₀ = 0.1 with wAA = 1, wAa = 0.95, waa = 0.9. All 40 fix A. The mean frequency is 0.950 at generation 100, close to the 0.955 of the no-drift curve, and 0.999 at generation 200.

Twenty individuals: a favoured allele can be lost

The fitnesses above are additive: each copy of A adds the same amount, so the relative advantage of A over a is s = 0.05/0.9 = 0.056 per copy. With N = 500 the lines hug the selection curve and every population ends at p = 1. The first fixation is at generation 103 and the last at 232, so even here chance shifts the timing by more than 100 generations.

Now cut N to 20. The same selection acts on 40 gene copies, and the sampling noise is large. A starts at 0.1, which is only 4 copies, and one unlucky generation can remove all of them. Kimura derived the fixation probability for this case: u = (1 − e^(−4Nsp₀))/(1 − e^(−4Ns)). With N = 20 and s = 0.056 we get 4Ns = 4.44 and u = 0.363. A neutral allele at p₀ = 0.1 fixes with probability 0.1, so selection helps, but it does not guarantee anything.

The figure below shows 16 of 40 populations fixing A. The theory expects 0.363 × 40 = 14.5, and the binomial standard deviation of that count is 3.0, so 16 is an ordinary result. The other 24 populations lost A despite its advantage.

Twenty individuals, same fitnesses

Figure 2. The same experiment with N = 20. Every population is absorbed within 300 generations: 16 fix A and 24 lose it. Kimura expects 14.5 of 40 to fix. With all three fitnesses set to 1, a neutral run of the same seed fixes 3 of 40.

Exercise

Count the losses of a favoured allele

Set Pop 100, Ne 20, P(A) 0.1, wAA 1, wAa 0.95, waa 0.9, Gen 300 and run it several times. Then set all three fitnesses to 1 and repeat.

What to expect. About 36 of 100 populations fix A with selection (Kimura: 0.363) and about 10 without it. Raise Ne to 500 and A fixes in nearly every population.

Open the walkthrough step →

Heterozygote advantage and drift

When the heterozygote is fittest, selection has an interior target. With wAA = 0.9, wAa = 1 and waa = 0.8 the equilibrium is p̂ = (wAa − waa)/(2wAa − wAA − waa) = 0.2/0.3 = 0.667. Below p̂ selection raises p, and above it selection lowers p, so the equilibrium holds both alleles.

In a population of 5,000, ten replicates started at p₀ = 0.5 sit close to the target after 200 generations: the mean is 0.664 and the standard deviation 0.010. In a population of 20 the same selection is too weak against the noise. At p = 0.5 the restoring push is 0.0135 per generation, while the sampling step has a standard deviation of √(0.25/40) = 0.079. In the run of the module with N = 20, all 10 populations are fixed by generation 200, with none polymorphic.

This is the reason balancing selection can only keep a polymorphism when the population is large relative to 1/s. In a small population drift removes the variation that selection is trying to keep.

Exercise

Compare 5,000 with 20

Set wAA 0.9, wAa 1, waa 0.8, P(A) 0.5, Gen 200. Run with Ne 5000 and then with Ne 20.

What to expect. At Ne 5000 all lines gather near 0.667 with a spread of about 0.01. At Ne 20 the lines scatter and most reach 0 or 1.

Open the module →

Summary

  • Each generation applies selection, p′ = (p²wAA + pq·wAa)/w̄, and then samples 2N copies from Binomial(2N, p′).
  • In a large population (N = 500) all 40 populations follow the selection curve and fix the favoured allele.
  • In a small population (N = 20) the same selection fixes A in 16 of 40 populations and loses it in 24; Kimura expects 14.5 fixations.
  • Drift overwhelms selection when 4Ns is below about 1; at N = 500 it is 111, at N = 20 it is 4.4.
  • Heterozygote advantage holds p near 0.667 at N = 5000 (SD 0.010), but at N = 20 every population is fixed by generation 200.