PPolySim OS
For Researchers · Gambler's Ruin

Gambler's Ruin for an A/B test

Built for researchers prototyping or validating an idea. Prototype fast, reproduce exactly, and share a citable, interactive version of your model. Simulate an A/B test 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 researchers?
Yes — this version of "Gambler's Ruin for an A/B test" is framed for researchers prototyping or validating an idea. Prototype fast, reproduce exactly, and share a citable, interactive version of your model.
Do I need to install anything?
No. It runs in any modern browser, free, with no account required.