THE WRIGHT–FISHER MODEL
A generation is a sample, not a promise.
Explore how chance, selection and mutation change a small, idealized population. Follow possible paths—and the probability model behind them.
ONE-GENERATION PREVIEW
Many possible outcomes.
One probability model.
*Mean of 2x(1−x), not 2 × mean(x) × (1−mean(x)). It is the chance that two independent, with-replacement copy draws differ.
AT GENERATION 1
At a boundary is not always forever.
- No A copies · count 0
- 0.004%
- Both alleles present
- 99.996%
- All A copies · count 20
- 1.100e-6%
Without mutation, zero A and all A are permanent absorbing states: loss and fixation of A. The population itself does not disappear.
LONG-RUN MODEL
Eventual outcomes are not deadlines.
Run the full experiment to calculate long-run probabilities and waiting times, or a stationary distribution when mutation works both ways.
Probability table · generation 1
| A copies | Current probability |
|---|---|
| 0 | 0.00003656158440 |
| 1 | 0.0004874877920 |
| 2 | 0.003087422683 |
| 3 | 0.01234969073 |
| 4 | 0.03499079040 |
| 5 | 0.07464701953 |
| 6 | 0.1244116992 |
| 7 | 0.1658822656 |
| 8 | 0.1797057878 |
| 9 | 0.1597384780 |
| 10 | 0.1171415505 |
| 11 | 0.07099487911 |
| 12 | 0.03549743956 |
| 13 | 0.01456305213 |
| 14 | 0.004854350709 |
| 15 | 0.001294493522 |
| 16 | 0.0002696861505 |
| 17 | 0.00004230370988 |
| 18 | 0.000004700412209 |
| 19 | 3.298534883e-7 |
| 20 | 1.099511628e-8 |
Keep or inspect your experiment
Settings are temporary in this tab. No account, upload server or automatic saving. Download JSON to reopen an experiment; CSV files contain the calculated distributions or the illustrative paths separately.
WHAT THIS MODEL MEANS
A precise calculation within a deliberately small world.
The lifecycle
For i A copies in M individuals, A receives reproductive weight r and a receives weight 1. Mutation acts on that weighted parent pool. The next generation independently samples M copies, with replacement.
qᵢ = [ri(1−u) + (M−i)v] / [ri + M−i]
P(i → j) = Binomial(M, qᵢ) at j
u is A → a; v is a → A. Selection before mutation is an explicit assumption. Reversing the order defines a different model.
What is left out
No overlapping generations, changing population size, migration, recombination, dominance, spatial structure or environmental feedback. “Weight” is a model input, not a ranking of organisms. M is a modeled haploid population size, not a measured effective population size.
Do not use this educational lab for medical, conservation or personal-genetic decisions. There is no personal genetic-data input.
Numerical honesty
All M + 1 states are propagated. This is floating-point arithmetic, not exact arithmetic or a diffusion approximation. Positive state elimination retains rare absorption channels. Seeded paths use finite-resolution pseudorandom draws and are illustrative, not evidence that a rare event is impossible. Numerical zeros in propagated distributions are not, by themselves, proof of impossibility.
Limits: M 2–100; weight 0.5–2; mutation zero or 0.001–0.25. The positive-rate floor is a numerical teaching range, not a biologically calibrated rate.
Method references: WFES and its haploid supplementary model · Durrett, neutral drift and diversity · Grassmann–Taksar–Heyman, positive stationary calculations