The St. Petersburg paradox is a puzzling situation where a simple gambling game seems to promise a lot of money, but most people wouldn’t be willing to pay much to play it, even though the math suggests they should.
What Is The St. Petersburg Paradox?
A casino offers a game of chance for a single player in which a fair coin is tossed at each stage. The initial stake begins at 2 dollars and is doubled every time heads appears. The first time tails appears, the game ends and the player wins whatever is in the pot. Thus the player wins 2 dollars if tails appears on the first toss, 4 dollars if heads appears on the first toss and tails on the second, 8 dollars if heads appears on the first two tosses and tails on the third, and so on. (Source)
Simple enough. Toss a coin until tails appears for the first time, then stop. For k heads that appeared until that last toss, where tails appeared, you get \(2^k\) dollars.
For instance, one game could be: Heads - Heads - Heads - Tails. Congratulations, you just won \(2^3 = 8\) dollars. However, it could also go: Tails. Tough luck, that’s \(2^0 = 0\) dollars.
How much would you be willing to pay to enter this game? Or more generally: What would be a fair price to pay the casino for entering the game?
Interestingly, most people go with very low amounts in the single or double digits. And we’re not to blame for realistically/pessimistically estimating that a 50/50 coin toss will likely not bless us with long streaks of heads. However, the payout in this game grows with a power of 2. The latter is exactly, why we should pay any price for this game.
The Theoretical Answer
Mathematically, the player wins \(2^k\) dollars, where \(k\) is the toss at which tails shows for the first time. The multiplied chances of each side of the coin shrink symmetrically to the square power of the pay-off sum, hence the expected value of each next coin toss is 1, growing infinitely.
Purely speaking of expected values, you should be willing to pay any infinitely large sum to enter this game, because the potential of the game’s pay-off is infinite.
Did you ever hear of consecutive coin tosses revealing the same side hundreds, or millions or infinitely many times though? If the answer is no, then the problem with the St. Petersburg lottery becomes clear: Infinity is very large.
Let’s look at a simulation of a person dedicating their life to this game.
Simulating A Lifetime Of Games In The St. Petersburg Lottery
Let’s assume a 20 year old person, who has 65 more years to live. Assuming 250 working days per year, the person has 16,250 days to play the game for 8h a day (full-time job), which results in 130,000 work hours. Assuming an average of 1 game per minute (60 games per hour), this person will be able to play 7,800,000 games over their lifetime.
Simulating 7,800,000 games:
Code
#paramssimulations =1games =7800000first_tail <-matrix(ncol = simulations, nrow = games)payoffs <-matrix(ncol = simulations, nrow = games)#simulationfor (i in1:simulations){for (x in1:games){ index =0#head = 0, tail = 1while (sample(x =c(0,1), size =1, replace =TRUE) ==0){ index = index +1 }#populate matrices first_tail[x,i] = index +1 payoffs[x,i] =2^(index +1) }}
It becomes clear, that the winnings from the lottery become large and the total winnings over a lifetime do look impressive. However, if you had paid an unfathomably large sum, say 100 trillion to enter each game, these winnings wouldn’t even cover a fraction of your loss.
Code
average_winnings <- payoffsaverage_winnings <-cumsum(average_winnings)/(1:nrow(average_winnings))average_winnings %>%as_tibble() %>%mutate(game =1:nrow(.)) %>%ggplot(aes(game, payoff)) +geom_line() +labs(title ="The Expected Payoff Over A Lifetime Of Games",subtitle ="The cumulative average payoff reveals no convergence.",y ="Running Average Payoff Per Game",x ="Games") +scale_x_continuous(labels = scales::comma_format()) +scale_y_continuous(labels = scales::dollar_format()) +theme_minimal() +theme(plot.title =element_text(face ="bold", size =12),plot.subtitle =element_text(face ="italic", colour ="grey50"))
Looking at the average winnings per game to approximate an expected value per game reveals that there exists no convergence and that the mean exhibits erratic jumps, very rarely. These are outliers, large sums won, which reflect the potential for infinite wins in this lottery. However, they are still not large enough to make a difference, even over an entire lifetime. Despite all this, the possibility remains. From a frequentist perspective however, you’re most likely be dead long before seeing wins large enough to justify the infinite price.
The Catch
The St. Petersburg Paradox is the perfect example to demonstrate how large “infinity” really is. Very large numbers, for instance a lifetime of games for a young person, are not even close to large enough to even begin to exploit the exponential potential of the St. Petersburg lottery, on average. Therefore, the implication of a theoretically infinite entry price to the game does not extend to our very finite lifetime and the entry price paid in real life should realistically lie in the low double digits to avoid catastrophic amounts of debt. Then, the next problem lies in finding someone who will play this game with you for the rest of your lives.