Ismael Khan

Modelling a fair game: A night at the Palais-Royal

It's late 18th-century Paris, and the gambling houses have been shut down. So now the games have moved to unmarked rooms above the arcades, where people will bet on just about anything... even the toss of a single coin.

The coin-flipping game

Picture yourself in late 18th century France. You are a traveler, stopping in Paris for a few days on your way south, with your evenings to yourself. Having asked the locals what places to visit during your time here, virtually all suggested that the Palais-Royal is the place to see. So, after dark, you go.

The Palais-Royal

The gardens of the Palais-Royal.

Attribution: Musée Carnavalet

You see the hustle and bustle of Paris first-hand. Collections of cafes, bookshops, restaurants line the palace, and the gardens are filled with congregations of people just having a good time. The upper floors of the palace appear a bit more secretive and not as visibly open, but you can hear the sounds of yelling and laughter, and streams of light escaping from the gaps of the curtains of the windows… Something is definitely happening up there.

So you climb the stairs to one of these closed off rooms and cautiously open the door, the commotion now at full volume as you see a busy gaming room, filled with people from all different social classes. Somehow the sound level of this smaller room rivaled the sound of the entire palace. It’s a lot to take in at once, lots of french terms you’ve never heard before, and card games played in ways you’ve never seen before.

A glint catches the corner of your eye, it’s the shine from a coin flipping in mid-air at a table in the corner of the room. At this table, there is no spread of cards, no painted layout, just a staff member flipping a coin in the air. It’s evidently not a very popular table, with only one player sitting opposite the staff member running the game. His eyes trace the path of a coin flipping in the air and land in the staff members hand. “TAILS!” says the staff member, as the player begrudgingly slides a single coin across the table. The staff member again flips a coin into the air, and it lands back in their hand. “HEADS!” calls the staff member, as they slide a single coin back to the player.

The rules of this game seemed much simpler than the intricate card games you saw before, so you decide to approach the table and sit next to the player to continue watching.

88100112round 0
Wealth: 100 coins. Flip to begin.

As you watch coins get passed back and forth, you begin to wonder whether its worth spending any time here… Your intuition tells you that because each flip is independent, and heads or tails is equally likely, you’d expect on average that all your wins will be met with losses, balancing to no change. (that is, assuming the coin is fair… which it is in this scenario)

A model of the coin-flipping game and the player’s wealth

To analyse the behaviour of this game, let us construct a model representing the game.

Suppose that MnM_{n} represents the amount of coins the player has at round nn. For example, before they started playing, it was round “0”, and they had 100 coins in their wallet, so we’d write M0=100M_{0} = 100.

Then, they play the first round, and it lands on a heads! So the players gets a coin, and their wealth goes up by 11, therefore M1=M0+1=101M_{1} = M_{0} + 1 = 101. They play round 2, and it lands on a tails… they give a coin to the staff member, so their wealth goes down by 11, so M2=M1−1=100M_{2} = M_{1} - 1 = 100.

So the pattern emerges: in each round (let’s call it the nn’th round), your current wealth (MnM_{n}) only changes by 1 from what you had the previous round (Mn−1M_{n-1}), either going up, or going down.

Now, as the outcome on whether it goes up or down depends on a coin, the odds are 50/50 for heads or tails (we have assumed its a fair and unweighted coin).

Let’s now start thinking about what we might expect the player’s wallet to look like at any arbitrary round nn. Well, we started at 100 coins at round 0, and , a coin is flipped, and it either went up (+1+1) or down (−1-1), and both outcomes are equally likely. So on average1, if we were to play this game, starting from 100 coins, and going up to nn rounds, many times, we’d see a pattern that flips cancel each other out2.

… So on average, the player walks away with exactly what he sat down with. But you can tell he doesn’t find that comforting.

A more lucrative game…?

You spot another coin-flipping game going on nearby, but this table is much more popular.

It’s popularity became clear when you started hearing players at the table making specific bets. All of a sudden, instead of the slow up and down of 1 dollar, so a player can finally “win big” with their own wager amount.

The player you are sitting next to leans over and mutters:

“The regulars at the busier table swear by this system: whenever you lose, double your next bet, and the first win wins back everything you lost plus a coin. They call it la martingale.”

88100112round 0
Wealth: 100 coins. Flip to begin.

In a follow-up post, we will sit down at the busier table and work out what the player is really expecting, and whether it is possible for them to come up with a strategy to systematically beat a fair coin.

Footnotes

  1. The term “on average” holds a lot of information, but I’m trying to refer to the “expectation”. And for me, trying to understand and explain “expectation” in probability has always been a challenge, so take it with a grain of salt. ↩

  2. Apologies, explaining “expectation” in words is sometimes challenging because it can be a misleading value and hard to assign intuition to what that value means when going from the mathematics to the physical object. But on the bright side, revealing this gap is one of the reasons for writing these posts. ↩