When molecule counts are small — a few copies of a gene, a handful of signaling proteins — averages lie and randomness rules. Gillespie’s stochastic simulation gets it exactly right: from each reaction’s propensity (rate × how many ways it can happen), draw when the next reaction fires (τ = ln(1/r)/atotal) and which one (weighted by propensity). No time-steps, no approximation — the true trajectory of a noisy chemical world.
The demo computes reaction propensities and the next-reaction time from the total propensity: live demo
“Gillespie is just a faster ODE solver.” — it is exact for the discrete stochastic system, capturing noise that deterministic rate equations erase. cited
The exact trajectory of a random chemistry. algorithm
On i-13 (ln via series), propensities a₁=60, a₂=20 give atotal=80 and a short next-reaction time: