The St Petersburg Paradox

A fair coin is tossed until it lands heads, and the k-th toss pays 2k−1 ducats. The expected value is infinite. Watch two hundred players try to collect it, then cap what the bank can pay and see what the game is worth.

Loading interactive simulation...

Lesson

The theory — The St Petersburg Paradox

In the St Petersburg game a fair coin is tossed until it first lands heads, and if that happens on toss k the player wins 2k−1 ducats. Toss k contributes 2−k · 2k−1 = ½ to the expected value, so the expected value is infinite. A bank that can pay at most B ducats pays min(2k−1, B), and the game is then worth V(B) = (m + 1)/2 + B/2m+1 with m = ⌊log2 B⌋, which is 1 + m/2 when B = 2m. Under Bernoulli's logarithmic utility a player worth W pays at most the x that solves Σ 2−k ln(W − x + 2k−1) = ln W.

What each symbol means

B
the most the bank can pay, in ducats
V(B)
the game's expected value against that bank
W
the player's wealth before he plays, in ducats
x
the most a player worth W pays to play, under logarithmic utility

Capped at what the bank can pay, infinity is worth 13 ducats 🖖

Press Cramer's bank. Every toss adds the same half ducat to the expectation: the first head on toss k pays 2k−1 and comes with probability 2−k. A sum of halves with no end is infinite, which is the dashed line along the top of the lower chart. No bank can pay every term, and the opponent's purse is finite here just as it is in <a href="/stat/gamblers-ruin">gambler's ruin</a>. Gabriel Cramer said so in a letter of 1728 that Daniel Bernoulli quotes: suppose nothing above 224 = 16,777,216 ducats can be won. Then the first 25 tosses add a half each, every longer game pays the cap and adds one more half, and the game is worth 13 ducats. A bank of 2m makes it worth 1 + m/2, so each doubling of the bank adds half a ducat and a bank a thousand times larger adds about five. Nicolaus Bernoulli, who posed the problem in 1713, told Daniel that any fairly reasonable man would sell his chance, with great pleasure, for twenty ducats. For the game to be worth twenty the bank must hold 238 = 274,877,906,944 ducats, and a trillion buys 20.91.

The average of many games never settles 🖖

Press No limit, 65,536 games. Each thin line is one player's running average. Where the expected value is finite, the law of large numbers pulls lines like these towards it. Here it is infinite, and the average of n games does go to infinity with probability one, but slowly: the middle of the crowd climbs just above the dotted curve, which is the game's worth against a bank as large as the number of games played. That curve gains half a ducat every time the games double and stands at 9 after 65,536; the middle player of this draw finishes at 9.29. The climb is made by rare long games. In n games the chance that one of them pays n or more is 63.2% at 1,024 games and still 63.2% at 65,536, and it tends to 1 − 1/e rather than to zero, so a single game keeps adding a ducat or more to the average however long the evening runs. The doubling system has the opposite shape: almost every evening wins one unit, and the rare evening that loses everything sets the average. Press A bank of 1,024: with a finite bank the mean is 6 ducats, and the crowd closes in on it, to an exact spread of 0.15 for one player's average.

A man worth W prices the game as if the bank held W 🖖

Press Bernoulli's 1,000 ducats. Daniel Bernoulli's answer of 1738 was that a gain matters to a man in inverse proportion to what he already owns, which values wealth by its logarithm. A man worth W should pay at most the price x at which playing leaves his expected log-wealth where it was. Worth 1,000 ducats, he pays 5.97. The game against a bank holding exactly 1,000 ducats is worth 5.98. Press A millionaire: 10.94 against 10.95. From 1,000 ducats to 1015 the two never differ by more than 0.03, and the logarithm says why. While a win g is small beside W, ln(1 + g/W) is close to g/W and the win counts at face value; once g passes W the logarithm grows so slowly that the long games add almost nothing. The cap is set by the player's own fortune. Below 1,000 the two part company: a man worth 10 pays 2.88 for a game that a bank of 10 values at 2.63. Bernoulli's own estimates, for the game given free, were about 3 ducats to a man worth 10, about 4 to a man worth 100 and 6 to a man worth 1,000, and exactly 2 to a man who owns nothing.

Problem solved in full

  1. Cramer's other answer: a square root instead of a cap 4 steps

    In the same letter of 1728, Cramer tried a second idea: no cap at all, but money valued by its square root, so that 40 million gives twice the satisfaction of 10 million. What is the game worth to him then, in ducats? Press Cramer's bank first: the page gives the value of his first answer.

    Open this problem in the tool

    1. His first answer, the capped game, from the page:

    2. Value each payout by its square root. The k-th term is 2−k√(2k−1), a geometric series with ratio 1/√2, so it converges with no cap:

    3. The equivalent is the sum of money whose square root is that expected satisfaction:

    4. For comparison, Bernoulli's logarithm, for a man who owns nothing and is given the game:

    Answer

    2.91 ducats: 1/(6 − 4√2), with no limit on the bank. Cramer called it "less than 3, truly a trifling amount, but nevertheless, I believe, closer than is 13 to the vulgar evaluation." The square root makes the long games' contributions shrink geometrically, which is what the cap did by force; Bernoulli's logarithm, for a man with nothing, gives 2.

Learning path

Fair games that ruin you

References (2)