Hot Hand: The Elephant Random Walk Simulator

Watch a phase transition happen in real time — drag the memory slider and see the exponent lock on.
The Elephant Random Walk (ERW) is a random walk with full memory: at every step it either copies a uniformly-chosen past step (probability p, "the elephant never forgets") or reverses it. The classical result is a sharp phase transition at p = 3/4 — the walk is diffusive (E|Sn| ~ n0.5) below it and superdiffusive (E|Sn| ~ n2p−1) above it. Here that's relabeled as a "hot hand" toy: each step is a made/missed shot, and p is how strongly a shooter's next shot echoes their streak so far. Below drag p and watch ~200 simulated shooters' cumulative-score trajectories, plus a live log–log fit of E|Sn| vs n whose slope visibly snaps to 2p−1 once you cross the threshold. Grounded in: J. E. González Rangel, "Asymptotics for the Laplace transform of the Elephant Random Walk via Schwarz–Christoffel mappings," arXiv:2607.15125. The paper derives sharp long-time asymptotics for the ERW's Laplace transform in the superdiffusive regime: a recurrence relation for the transform yields a generating function solved by a transport-type PDE, whose solution is written via a Schwarz–Christoffel mapping, giving precise analytic control for singularity analysis. This demo visualizes the n2p−1 growth law that regime is built on — not the paper's Laplace-transform asymptotics themselves.
—

200 shooters' cumulative score, live — n = 0

Click the canvas to pause/resume. Brighter gold trace = the highlighted "star shooter" tracked below.
Star shooter's last shots (most recent → right):
Current streak: 0  |  Best streak this run: 0

log–log fit: E|Sn| vs n

Fitted slope (live)
—
Theoretical target
—
p
0.60
Distance from 3/4
—
Dashed line = theoretical exponent (0.5 below p=3/4, else 2p−1). Solid line = live least-squares fit over the simulated data.