St. Petersburg Paradox illustration

St. Petersburg Paradox

The St. Petersburg paradox is a lottery with infinite expected value that nobody would pay much to play. A fair coin is tossed until it lands heads; if the first head is on toss k the prize is 2^k. The expected prize is 1/2·2 + 1/4·4 + 1/8·8 + …, an infinite sum, yet most games pay just 2 or 4. This simulator plays the game over and over and tracks the running average payout, which drifts slowly upward without settling — growing roughly like the logarithm of the number of games — showing why expected value alone is a poor guide to what the game is worth.

Runs 100% in your browser — simulations are computed locally on your device.

Notes

  • The payout is 2^k when the first head appears on toss k, which happens with probability 1/2^k.
  • Each term of the expected value contributes 1/2, so the sum diverges — the mean is infinite.
  • The running average grows like log₂(N): the occasional huge jackpot keeps dragging it up, so it never converges.
  • Runs 100% in your browser — simulations are computed locally on your device.