The St. Petersburg Paradox

The problem
flip until tails · win 2ⁿ if tails on flip nHflip 1$2Hflip 2$4Hflip 3$8Hflip 4$16how much would you pay to play?

A casino offers a game: a fair coin is flipped until it lands tails. The payout depends on which flip produced the first tails:

First tails on flip nnProbabilityPayout
112\tfrac{1}{2}\2$
214\tfrac{1}{4}\4$
318\tfrac{1}{8}\8$
nn12n\tfrac{1}{2^n}\2^n$

How much should you be willing to pay to play this game once?