The St. Peterburg paradox is a hypothetical game with infinite expectation. This means: If you are offered this game: Bet everything you have.
The game is played by a bank that will throw a fair coin. The game starts by the bank putting a sum, say $1 into the pot and a player can enter the game by waging money on the game. If the coin lands Tails, the player wins the pot. If it lands Heads, the bank will double the pot. Now what is the fair price for the player.
Usually such games can be treated with simple probability theory. We compute the “average outcome” of the game.
For the first round there is a 50% chance that the bank will pay $1, so the expected value (EV) is 50cts. For the second throw the bank will pay $1 in 25% of the cases (the “other” 50% from the first throw and the 50% chance that Tails comes this round).
So as long as the game goes, the bank will pay 50cts on average. Now the problem: It can happen that Tail never comes and so the average payout for the bank will be
50cts +50cts +50cts +50cts +50cts +50cts +50cts +50cts +50cts +50cts …. = ?
This is a divergent sum, most of us have learned that this goes to “infinity” and that this is not a proper value.
So no matter how much you are asked to be allowed to play: Math says you should accept, because on average you will win an infinite amount of money. This doesn’t make sense in the real world, there is no infinite amount of money.
Lets modify the game a bit. Lets say that you can bet on the event that Tails comes only at the k-th throw. So you will win if and only if the k-th throw is Tails and all throws before where Head. What would be the fair price for such a bet: $2-k
Now we can hedge our bets to ensure we break even: We bet all possible moves, 50cts for the first throw, 25cts for the second, 12.5cts for the third, etc. All together we pay $1 for our infinite number of bets and we will win $1 all the time. Boring. Actually very boring, because it can take an infinite time until we win our Dollar. Imagine they throw once a minute and it falls 3000 times Heads in a row - you have spent two days in the casino.
We haven’t solved the paradox yet, be just eliminated the infinite winnings, but this wasn’t the problem.
To get to big winnings, we have to place the same bet for all bets, lets calculate what we have to pay the cashier if decide to pay $x for each:
$x +$x +$x +$x +$x +$x +$x +$x +$x +$x +$x +$x +$x +$x + … =
Again infinity. This makes sens as the expectation is infinite, but careful: Infinity is not a number, it makes no sens to check equality to two infinite values.
What would you say that the value of the sum above is -x/2 ? This you get from the Zeta function: The sum
1+1+1+1+1+1+1+1+1+… = ζ(0) = -1/2 ( any positive number raised to the 0th power gives 1)
Multiply this by x and you get -x/2. Lets do this for the sum of the payout and we get -25cts = ζ(0) * 50cts.
A fair bet is when the expectation matches the wager. So we have -25cts = -x/2 and hence 50cts for the wager.
OK, this is rather shaky math, but does it perhaps make sense?
So we enter the game for 50cts. If Tails fall we get $1 and we go home with the good feeling that we doubled our money. If we don’t win (50% of the time), we have a shot at even higher winnings. Sounds good? It looks like we got into this game far too cheaply.
But we can look at the game in a different way: Actually we always win, but only if Tails falls we are allowed to take our winnings. In other cases we are playing with doubled stakes the game from the beginning. This is similar to the Gambler’s ruin scenario: Instead of taking our winnings, we are waging them again. The twist here is that the game could go on forever and the loss is never realized, but neither is the win. If the bank would offer “double?” if we win it would be obvious that we would play on forever, building an infinite bankroll without ever cashing in (the same principle is used in the Who wants to be a Millionaire TV show, but this game is finite).
If we now limit the game to 10 throws and the player loses if all come out Heads, the expectation is $5, so it makes sense to enter this price, because you can win up to $512. If now the game is limited to 100 throws it, the expectation is $50 and you could get very, very rich. But also you have to survive the first 5 throws to get into the money. In any case: You lose in the majority of games you play.
The interesting fact is that if the game is unlimited, the game degenerates back to the single throw case