DRIFTPOPULATION GENETICS LAB / 012FREE · BROWSER-LOCAL

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.

GEN 01
0.0%9.0%18.0%0 A copies: 0.004%1 A copies: 0.049%2 A copies: 0.309%3 A copies: 1.235%4 A copies: 3.499%5 A copies: 7.465%6 A copies: 12.441%7 A copies: 16.588%8 A copies: 17.971%9 A copies: 15.974%10 A copies: 11.714%11 A copies: 7.099%12 A copies: 3.550%13 A copies: 1.456%14 A copies: 0.485%15 A copies: 0.129%16 A copies: 0.027%17 A copies: 0.004%18 A copies: 4.700e-4%19 A copies: 3.299e-5%20 A copies: 1.100e-6%05101520Number of A copies · generation 1
Calculated probabilityStarting count
Expected A count8 / 20
Standard deviation2.1909 copies
Expected diversity*0.456

*Mean of 2x(1−x), not 2 × mean(x) × (1−mean(x)). It is the chance that two independent, with-replacement copy draws differ.

Neutral experiment ready. Run the full experiment to see many generations and long-run results.

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
Numerical probabilities, not frequencies from the illustrative paths. A displayed zero can also reflect floating-point underflow.
A copiesCurrent probability
00.00003656158440
10.0004874877920
20.003087422683
30.01234969073
40.03499079040
50.07464701953
60.1244116992
70.1658822656
80.1797057878
90.1597384780
100.1171415505
110.07099487911
120.03549743956
130.01456305213
140.004854350709
150.001294493522
160.0002696861505
170.00004230370988
180.000004700412209
193.298534883e-7
201.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