Saturday, March 18, 2006

What's the deal with St. Petersburg?

While studying for a statistics test the other day, I came across an interesting statistical paradox (not of my own invention of course). The problem goes as follows. There's a game of chance that you have to pay a fixed amount to play. After paying your fixed amount, the person running the game, let's just call this the casino, flips a coin until the coin lands on tails (or heads, it doesn't really matter). When the coin lands on tails, the total number of coin tosses is used to determine your winnings of $2^n. E.g. if the coin was flipped the first time and it was heads, then heads on the second and third, but tails on the fourth toss then your winnings would be $2^4=$16.

All sounds good so far? Well here's where the funky part comes in. The probability of you winning $2^n is 1/(2^n). This means that when you calculate the expected value of the game, where the expected value tells you how much you are likely to win on average, the expected value is infinity!?! This can be seen as follows
# tosses (n)WinningsProbabilityExpected Payoff
1$21/2$1
2$41/4$1
3$81/8$1
4$161/16$1
5$321/32$1
............
n$2^n1/(2^n)$1

Now, if you consider that you could be lucky enough, or not, that the coin would keep coming up heads indefinitely you could win an indefinitely large sum of money. This means that to calculate the expected value of the game, we must sum the expected payoff from each possible outcome, namely sum(2^n * 1/(2^n)) where n=1,2,3,... As can be seen from the table this is sum(1) n=1,2,3,... which is infinity. This means that whatever fixed amount of money one has to pay to get in on this game, you should always do it.

Of course this isn't right, we know this intuitively as the odds on getting 5 heads in a row is pretty remote. There is a great website that simulates this game
http://www.mathematik.com/Petersburg/Petersburg.html

A few people have proposed solutions to the paradox. The first was Bernoulli who proposed that the value of money decreases logarithmically with how much you have. That the difference to between having one billion and two billion is realistically less than the difference between one billion and one million. This doesn't solve the problem however as the winnings can be altered to increase to cancel the logarithmic decrease in the value of money. The other proposed "solution" is that no casino has an infinite amount of money to give you, the game has a maximum winnings. Capping the winnings does fix the problem, but you almost get the sense that this is somehow cheating a little.

Here are some great links for a much more in depth (and prettier) analysis of the paradox:

http://plato.stanford.edu/entries/paradox-stpetersburg/

http://en.wikipedia.org/wiki/St._Petersburg_paradox