Chance and Selection

Why do some gene variants spread while others vanish, and when is that selection rather than luck? Each beetle below carries two gene copies, one on each wing case.

Begin with the rule that nothing changes →

A population of beetles breeding itself, one generation per second. Each new generation is a random draw of gene copies from the last (exact Wright–Fisher sampling). With no selection the colours still change, and can vanish; raise the population size and the strip follows the dashed line more closely. Give orange an advantage (s above 0: orange-orange beetles have fitness 1 + s, mixed ones 1 + s/2) and it usually climbs, but at N = 10 it is often lost: press Show 20 runs to see how often.

Evolution, at its smallest scale, is bookkeeping: how common is each version of a gene, and how does that number change from one generation to the next? Four things can change it. Natural selection pushes it in a direction. Genetic drift, the luck of which gene copies happen to be passed on, jostles it in no direction at all. Mutation creates new variants and gene flow brings them in from elsewhere. Take all four away and nothing changes; that is the Hardy–Weinberg principle, and it is where this site begins.

The plate above is one population, run live. Leave selection at zero and watch long enough: the share of orange gene copies wanders, and sooner or later one colour takes over by chance. Set selection to 0.05 and shrink the population to ten beetles, and luck can still beat the better variant; Show 20 runs draws twenty populations at once, so you can count how often. Here, and everywhere on this site, s means the same thing: beetles with two orange copies have fitness 1 + s, beetles with none have 1, and mixed beetles sit in between (1 + s/2 unless a page says otherwise). Which of the two wins, chance or selection, depends on the population size, and the chapters below work out exactly how.

Six chapters, one model

Each chapter switches on one force in the same model, then tests it against real measurements: 216 blood-group surveys, 107 bottles of fruit flies bred in the 1950s, a Cambridge garden full of peppered moths, the genomes of elephant seals that came back from about twenty animals.

How this is checked

Every simulation draws its random numbers from a seeded generator, so any figure can be shared in its exact state. The Wright–Fisher sampling is exact binomial sampling, not an approximation, and the code is tested against the exact Markov chain and the classical formulas of Wright, Kimura and Haldane. Every number and historical claim is listed in a claims register with its source, and an independent reviewer checks them before publication. Where a figure idealizes, a note says so and gives the real story. Sources are listed on the sources page.

Tools

Quick guides