Photo from iStock / Lacheev

You step into the casino whose dim overhead lighting is offset by the blinking machines scattered around the floor. Mahogany tables and plush scarlet couches create an atmosphere of refinement and luxury, and the freely shared alcohol invites agreeableness among the patrons of the establishment. You cough on the cigar smoke puffed from the lips of the comfortable regular guests and the gambling neophytes who want to assert their maturity, both lost in the thrill of the games.

You shrug off your coat, feeling underdressed in your jeans and basic shirt in comparison to the other casino goers in their crisp suit jackets and lacey blouses. You linger at the door, wavering now in your determination to try this casino that your fellow middle class friends raved about. Why had they not alerted you of the business formal dress code? The vendors would know for sure that you were an amateur! You didn’t bring enough money to be swindled by such opportunists.

You glance around at the intensely spinning roulette wheels, the intensely dealt playing cards, and the intensely tossed dice and at the determined expressions of the players leaning over the table to see their results and leaning back to examine their hand. Taking care to not trip over someone’s shoes and to avoid the offers of alcohol, you make your way through the room. Your eyes linger on a slot machine (any dunce could figure his way around a slot machine) before catching sight of a man in a brown coat and beige hat in the corner of the room. On the small round table in front of him – the kind that a person might set in their foyer with a vase of flowers arranged on top – is a single quarter.

“What’s the deal here?” you say.

The man tilts his hat back and looks up at you. “What’s that?”

“What’s deal here?” you say, louder so he can hear over the din.

“You pay me and I might pay you back.” The man holds up the coin. “I flip this coin until it comes up tails. If the coin is tails on the $n^{th}$ flip, then I give you $2^n$ dollars.”

2 to the n dollars? You didn’t come to a casino to contend with exponents, nor the pretentious individuals who would invoke them in this supposedly care-free setting. As you start to turn away, the man whips out a laminated sheet from the bag under his chair. You linger; a man who goes through the trouble of laminating a paper may not be entirely unworthy of your time.

The paper displays the potential payout of playing the game. If tails appeared on the first flip, you would receive $2; on the second flip,$4; on the third flip, $8; and so on. Seems simple enough. You reach for your wallet. “How much to play?” “$100.”

“$100? Do you take me for a fool?” you snap, more self-conscious of your everyman appearance and indignant to be thought so easily beguiled. The man leans back and crosses his arms over his chest. The self-confident expression of those who speak in exponents with regular people and who laminate payout sheets to prove their legitimacy with regular people spread over his face. “Don’t you see, though, that the payout is infinite?$100 is nothing, a paltry fee, compared to what you could win. Any amount you can pay is worth it.”

From a combinatorial perspective, the man’s assertion is true. This is the hinge of the St. Petersburg Paradox, so-named because Daniel Bernouilli, a prominent mathematician and physicist known for work in probability and statistics, published the first known solution for it in Commentaries of the Imperial Academy of Science of Saint Petersburg during his residence in that city. Coming to this conclusion of infinite payout requires an understanding of expected value.

Expected value in probability theory, denoted $E[X]$, is the sum of the possible outcomes in a series of trials, each multiplied by the probability of occurrence. Consider, for example, a game in which a single die is rolled and the player 1) receives $2,$4, or $6 if the die displays 2, 4, or 6, respectively, or 2) pays$1, $3, or$5 if the die displays 1, 3, or 5, respectively. Assuming that the die is balanced, the probability of each of these outcomes is $\frac{1}{6}$. The probability that you earn $2, then, is $2 \cdot \frac{1}{6} = \frac{1}{3}$. Calculating these individual probabilities and ending them gives the expected value: $E[X] = (-1) \cdot \frac{1}{6} + (2) \cdot \frac{1}{6} + (-3) \cdot \frac{1}{6} + (4) \cdot \frac{1}{6} + (-5) \cdot \frac{1}{6} + (6) \cdot \frac{1}{6} = \frac{1}{2}$ , where $X$ is the number of dollars you win. Thus, the expected value is$0.50.

Photo from Deposit Photos

For the coin-flipping problem, each trial is independent from the previous; that is, flipping one side on the first flip does not change the probability of the side options on the second. Specifically, the probability of the coin landing heads (or tails) on a single flip is $\frac{1}{2}$. For the casino man’s proposal, we are interested in the flip number on which tails first appears. The probability of it being tails on the first flip is $\frac{1}{2}$; the payout in this scenario would be $2^1 = 2$ dollars. The probability of it being tails on the second flip is $\frac{1}{2} \cdot \frac{1}{2} = \frac{1}{2^2} = \frac{1}{4}$; the payout in this scenario would be $2^2 = 4$ dollars.

In general, the probability of the coin landing on tails on the $n^{th}$ flip is $\frac{1}{2^n}$ and the payout is $2^n$ dollars.

Theoretically, you could go 100 flips before seeing tails. You could go 1,000 flips, or 1,000,000 flips. The odds are very unlikely given the Law of Large Numbers, but not outside the realm of possibility. In a pathological world, the man could flip the coin an “infinite” amount of times and you might still not see tails. Therefore, the expected value is calculated as follows:

$\displaystyle \sum_{n=1}^\infty (2^n)\frac{1}{2^n} = \sum_{n=1}^\infty 1 = 1 + 1 + 1 + \cdots = \infty$

The conclusion: The expected value of the game is an infinite number of dollars.1 Therefore, any finite cost to play would be logical, at least in our theoretical, pathological world, because the odds are in your favor to gain. The paradox is that this solution goes against common sense and basic probability. Reliance on expected value will spur you toward an irrational decision.

Thus cognizant of this paradoxical situation (or perhaps just opposed to shelling out $100 to watch a coin fly in the air), you leave the man and his laminations and dig out a$5 bill to play the slots.3

1. This is the case because the series for the expected value is divergent.
2. See this essay from Jesse Albert Garcia for a similar explanation of the paradox and attempted resolutions.
3. The morality of gambling is a different discussion. Of possible interest is this 1993 article from an MIT student opposed to gambling, this 2012 article from a Huffpost contributor not opposed to gambling, and this review of four books on the history of gambling.