PPolySim OS
For K-12 Students · Gambler's Ruin

Gambler's Ruin for a survey weighting

Built for k-12 students learning it in middle or high school. Watch the idea come alive with plain-language steps and everyday examples — perfect for projects and homework. Simulate a survey weighting live below — adjust the inputs and watch it respond, right in your browser.

Gambler's RuinLive

Controls

Presets

A gambler betting against a rich casino faces gambler's ruin: even a nearly fair game (49% odds) almost always ends in bankruptcy before hitting a big target, because the house has effectively unlimited funds. The tiny edge compounds relentlessly over many bets — which is exactly how casinos stay in business.

▶ Run in Python

Data Inspector

P(ruin) theory80.8%
Ruined (this run)0 / 30
Edge per bet-1%

Governing equation

Reading this result: The house edge (p<0.5) makes ruin nearly certain — P(ruin) rises exponentially with the target, so aiming for $50 from $20 all but guarantees going broke first.

Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.

or unlock everything with Pro →

More with Gambler's Ruin

Frequently asked questions

Is this good for k-12 students?
Yes — this version of "Gambler's Ruin for a survey weighting" is framed for k-12 students learning it in middle or high school. Watch the idea come alive with plain-language steps and everyday examples — perfect for projects and homework.
Do I need to install anything?
No. It runs in any modern browser, free, with no account required.