Payout frequency (log scale) Running average, over time
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

St. Petersburg Paradox — Why Expected Value Can Diverge

The St. Petersburg paradox is a genuinely counterintuitive result at the heart of probability theory: a simple fair-coin game whose expected payout is mathematically infinite, even though every individual game ends after a finite (usually tiny) number of flips. This simulator runs the game live — flip a coin until it lands heads, win 2ⁿ coins if heads first appears on flip n — thousands of times per second, rendering a real-time 3D histogram of payout frequencies and a running-average tracker that keeps climbing instead of settling, unlike the Law of Large Numbers examples elsewhere on this site. A truncation slider caps the maximum number of flips per game, turning the divergent sum into the closed-form E[X] = C + 1 and letting you watch convergence reappear as soon as the tail is cut off.