• Home
  • Readings
  • Github
  • MIES
  • TmVal
  • About
Gene Dan's Blog

No. 63: St. Petersburg Paradox

26 June, 2012 1:32 AM / Leave a Comment / Gene Dan

Hey everyone,

Work has kept me busy, as I’ve spent the last three weeks catching up on the tasks I pushed back while studying for my exam. I didn’t have any time to work on anything creative, so I decided to pull up an old project I had done a year ago on the St. Petersburg Paradox. The St. Petersburg Paradox is a famous problem in mathematics, proposed in 1713 by Nicolas Bernoulli in a letter to fellow mathematician Pierre Raymond de Montmort. The problem consists of a game where the player continuously flips a fair coin until it lands tails. The payout is equal to 2 raised to the number of consecutive heads obtained. For example, if the player gets 1 head, he receives a payout of 2. If he gets 2 heads in a row, he receives a payout of 4. If he gets 3 heads in a row, he receives a payout of 8, and so on and so forth. More formally, we can express the expected payout as:

$latex displaystyle mathrm{E}[mbox{payout}] = sum_{i=1}^infty (mbox{payout for }imbox{ consecutive heads})timesmathrm{Pr}(imbox{ consecutive heads}) $

$latex displaystyle mathrm{E}[mbox{payout}] = sum_i^infty 2^i (.5)^i $

$latex displaystyle = 2timesfrac{1}{2} + 4timesfrac{1}{4} + 8timesfrac{1}{8}cdots $

$latex displaystyle mathrm{E}[mbox{payout}] = 1+1+1cdots = infty$

As you can see, the expected payout is infinite. So, how much would the typical person pay to play this game? It turns out that you might be able to get a person to pay $1 or $5 to play, but once the fee gets into the double-digits, people start getting reluctant. Why is this so? Shouldn’t a rational person be willing to put down any finite amount of money to play the game? That’s why the problem is called the St. Petersburg Paradox. Even though the expected payout is infinite, most people aren’t willing to gamble a large sum of money to play the game.

Intuitively, this makes sense. If you’ve ever tried flipping a penny over and over again, you’ll notice that getting just 5 heads in a row is a rare event. Even then, the payout is just 32. The odds of getting a payout of 1024 is just under one out of a thousand. So, unless you have something better to do than to flip coins all day (and flip them really fast), you’re better off flipping burgers if you want to make a living wage (keep in mind you have to pay each time you play).

I wrote a couple of VBA subroutines to simulate the problem and posted a video of the execution on YouTube, a little more than a year ago (I believe I used a payout of 2^(i-1) instead of 2^i for this simulation):

[youtube=http://www.youtube.com/watch?v=QAizn9gqhO8]

Here, I allow the user to set some values for the simulation, like the game price, starting balance, and number of games. In addition, I added a progress bar, data bars, and sparklines to test out some new features in Excel 2010. The subroutine runs much faster without these features (like a thousand times faster), since the computer gets interrupted each time it has to update the progress bar and spreadsheet features. The columns to the right compare the theoretical distribution to the empirical distribution obtained through the simulation. As you can see, large payouts are very rare, and the player spends most of the time with a negative balance. The important lesson to glean out of this is that it would take a ridiculously large number of games to get a large payout, and relying on expected payouts alone would be a foolish choice to make in a business situation (especially in insurance).

Posted in: Logs, Mathematics / Tagged: st. petersburg paradox, st. petersburg paradox simulation, youtube st. petersburg paradox

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Post Navigation

← Previous Post
Next Post →

Archives

  • September 2023
  • February 2023
  • January 2023
  • October 2022
  • March 2022
  • February 2022
  • December 2021
  • July 2020
  • June 2020
  • May 2020
  • May 2019
  • April 2019
  • November 2018
  • September 2018
  • August 2018
  • December 2017
  • July 2017
  • March 2017
  • November 2016
  • December 2014
  • November 2014
  • October 2014
  • August 2014
  • July 2014
  • June 2014
  • February 2014
  • December 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • March 2013
  • January 2013
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • January 2011
  • December 2010
  • October 2010
  • September 2010
  • August 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • September 2009
  • August 2009
  • May 2009
  • December 2008

Categories

  • Actuarial
  • Cycling
  • Logs
  • Mathematics
  • MIES
  • Music
  • Uncategorized

Links

Cyclingnews
Jason Lee
Knitted Together
Megan Turley
Shama Cycles
Shama Cycles Blog
South Central Collegiate Cycling Conference
Texas Bicycle Racing Association
Texbiker.net
Tiffany Chan
USA Cycling
VeloNews

Texas Cycling

Cameron Lindsay
Jacob Dodson
Ken Day
Texas Cycling
Texas Cycling Blog
Whitney Schultz
© Copyright 2025 - Gene Dan's Blog
Infinity Theme by DesignCoral / WordPress