In the study of probability there’s a concept called expected value. If you’re measuring some random process, the expected value is the average over a very large number of trials. For instance, if you roll one dice you can expect to come up with a value of 3.5. Now obviously no individual roll can give you a 3.5, that’s just the average you’ll get over a large number of trials.

The expected value is calculated in the following way. Take the probability of one of the outcomes, multiply by the value of that outcome, repeat for all possible outcomes, and add them all up. For dice, the probability of each of the 6 outcomes is of course 1/6. So we have 1*(1/6) + 2*(1/6) + … + 6(1/6) = 3.5 for the expected value of a dice roll.

If someone offered you the opportunity to roll a dice and give you dollars equal to the value of your roll, over the long run you could expect to win $3.50 per roll. If you were paying to play the game as a gamble, you’d lose money in the long run if the game cost more than $3.50 to play. Casinos do this exact kind of expected value calculation in great detail for all their games. They want to make sure they charge more than the expected value for each game so they don’t go broke. Indeed, there’s a lot of mathematicians who make good money doing this very thing.

Now here’s a sort of tricky scenario which explores the limits of the expected value concept. A casino offers you a coin flipping game with the following rules:

1. Flip a fair coin. (We may assume it’s perfectly fair.)

2. If heads, the game ends and you win $N, where initially N = 1.

3. If tails, double N and repeat step 2.

Eventually you’ll come up tails and win some amount of money. If you flip tails many times it may in fact be a pretty huge amount, since the prize has doubled so many times before you come up heads.

Using the expected value concept, how much money can you pay for this game and still come out ahead? How much would you actually be willing to pay, if it were personally offered you?

Savvy readers may ask how much money the casino has. Start off assuming infinite wealth, and then, if you’d like, repeat for a casino of large but finite wealth. Go!