The St. Petersburg Paradox was discovered by Swiss mathematician Daniel Bernoulli and published in 1738. Here is how it works: Flip a fair coin until you get a head. When you flip the first head, you get paid \$2 for every flip. So, if you flipped a tail, then a head, you get paid \$4. If you flip 19 tails then a head, you get paid \$220 or \$1,048,576. Sounds like a game you'd like to play, doesn't it. Would you be willing to pay \$1,000,000 to play the game?

Let's take a look at average expected winnings. If you get a head the first time (which will happen 1/2 of the time), you get \$2. 1/2 times \$2 is \$1, which are your expected winnings. The table below shows the expected winnings for the first few scenarios.

TotalProbability
Numberof WinningExpected
of Flipsin n FlipsPrize \$Winnings
11/2\$21/2 * \$2 = \$1
21/4\$41/4 * \$4 = \$1
31/8\$81/8 * \$8 = \$1
41/16\$161/16 * \$16 = \$1
51/32\$32\$1
61/64\$64\$1
71/128\$128\$1
81/256\$256\$1
91/512\$512\$1
101/1024\$1024\$1
111/2048\$2048\$1
121/4096\$4096\$1
131/8192\$8192\$1
141/16384\$16384\$1
151/32768\$32768\$1
161/65536\$65536\$1
171/131072\$131072\$1
181/262144\$262144\$1
191/524288\$524288\$1
201/1048576\$1048576\$1

The expected winnings of the entire scenario are equal to the sum of the expected winnings for each case. So the expected winnings are

\$1 + \$1 + \$1 + … = ∞

Sounds like a real winner!

Now let's see how long it will take you on average to win your first million dollars. Let's assume two seconds per coin flip. If the first coin flip is a heads, you win \$2. For the sake of argument, let's assume you always get a heads. Then in only

( \$1,000,000 / \$2 ) * 2 Sec = 1,000,000 seconds,

you would reach \$1 million. Let's see …

1,000,000 seconds / 60 seconds per minute = 16,667 minutes (rounded to the nearest whole minute).

16,667 minutes / 60 minutes per hour = 278 hours (rounding again).

278 hours / 24 hours per day = a rounded 12 days.

Would you stay awake for 12 days to win \$1,000,000? Could you stay awake 12 days to win \$1,000,000?

Now let's add time to the results. I've added the expected time to winnings to the table:

TotalProbabilityExpected
Numberof WinningExpectedExpectedWinnings
of Flipsin n FlipsPrize \$WinningsTimePer Second
11/2\$21/2 * \$2 = \$11/2 * 2 sec = 1 sec\$1 / sec
21/4\$41/4 * \$4 = \$11/4 * 4 sec = 1 sec\$1 / sec
31/8\$81/8 * \$8 = \$11/8 * 8 sec = 1 sec\$1 / sec
41/16\$161/16 * \$16 = \$11 sec\$1 / sec
51/32\$32\$11 sec\$1 / sec
61/64\$64\$11 sec\$1 / sec
71/128\$128\$11 sec\$1 / sec
81/256\$256\$11 sec\$1 / sec
91/512\$512\$11 sec\$1 / sec
101/1024\$1024\$11 sec\$1 / sec
111/2048\$2048\$11 sec\$1 / sec
121/4096\$4096\$11 sec\$1 / sec
131/8192\$8192\$11 sec\$1 / sec
141/16384\$16384\$11 sec\$1 / sec
151/32768\$32768\$11 sec\$1 / sec
161/65536\$65536\$11 sec\$1 / sec
171/131072\$131072\$11 sec\$1 / sec
181/262144\$262144\$11 sec\$1 / sec
191/524288\$524288\$11 sec\$1 / sec
101/1048576\$1048576\$11 sec\$1 / sec

The expected time to win is the sum of all the times, or

1 sec + 1 sec + 1 sec + … = ∞

This means that while the expectations of winning is infinite, the expectation of how long it takes to win is also infinite! Let's put this into real terms.

Would you pay \$1 million to play this game where the expected winnings are infinite? What is the probability of at least breaking even? That chance is 1 minus the sum of the chances of not breaking even, or

1 - ∑(1/2)n, n = 1 .. 19.

Expressed algebraically, this is

1 - (1/2 + 1/4 + 1/8 + 1/16 + 1/32 + 1/64 + 1/128 + 1/256 + 1/512 + 1/1024 + 1/2048 + 1/4096 + 1/8192 + 1/16384 + 1/32768 + 1/65536 + 1/131072 + 1/262144 + 1/524288 = 1 - 524287/524288 ≈ 1 - 0.9999980926513671875 = 0.0000019073486328125.

Although your expectations are infinite, 99.9998 percent of the time you would not achieve your goal of \$1,000,000.