The Three Card Problem

Maths
Author

Eliott Kalfon

Published

May 20, 2025

I have three cards:

The six cards and their colours

I pick one card at random, its first side is white. What is the probability that the other side is also white?1

Our intuition may lead us to say \(1/2\), as there are two cards with a white side: one with two white sides, the other with one black and one white side. From this observation, it would make sense to say that if the first side is white, then the probability of the other side being white is \(1/2\).

This reasoning is unfortunately flawed; the correct answer is \(2/3\).

If you do not believe me, you can run this simulation in Python and check the results:

Python code simulation
import random

trials = 100000
cards = ["white-white", "white-black", "black-black"]
white_first_count = 0
white_white_count = 0

for _ in range(trials):
    card = random.choice(cards)
    if card == "white-white":
        white_first_count += 1
        white_white_count += 1
    elif card == "white-black":
        if random.choice(["white", "black"]) == "white":
            white_first_count += 1

probability = white_white_count / white_first_count if white_first_count > 0 else 0
print(f"Probability of the other side being white: {probability}")

Thinking of parallel worlds

To nudge our intuition into the right direction, we can reframe the problem: given that the first side of the card is white, what is the probability that the other is white?

Going one step further, it is important to remember how a white side could have been drawn:

  • The white-white card could have been drawn on one of its sides
  • The white-white card could have been drawn on its other side
  • The black-white card could have been drawn on its white side

From this observation, we can see that of the situations that lead us to the first side of the card being white, 2 out of 3 were with the white-white card.

This can also be shown visually:

The six sides that can be picked at random

Each of the six sides has the same probability of being picked. There are three equally probable cases in which a white side is picked. In two out of three cases, the card is the white-white card.

The Bayes rule

This can also be verified using Bayes’ rule:

\[ P(A | B) = \frac{P(B | A)P(A)}{P(B)} \]

Where \(P(A | B)\) is the probability of event \(A\) given event \(B\).

Here, let’s note the events:

  • \(A\): the card is white on the other side (it is the white-white card)
  • \(B\): the first side of the card is white

We want to know: \(P(A | B)\), probability of \(A\) given \(B\).

Using Bayes’ rule, we get: \[ P(A | B) = \frac{P(B | A)P(A)}{P(B)} \]

Evaluating these one by one:

  • \(P(A)\), probability of getting the white-white card: there are three cards, so this probability is \(1/3\)
  • \(P(B|A)\), given that the card is white-white, what is the probability of having its first side white? That is \(1\)
  • \(P(B)\), probability of getting the first side white, trickier to evaluate:
    • Case 1: card is white-white, then this would be a probability \(1\)
    • Case 2: card is white-black, then this would be \(1/2\)
    • Case 3: card is black-black, then \(0\)

To get the total probability of \(B\), we sum all of these cases:

\[ \begin{aligned} P(B) &= P(B|\text{white-white}) \cdot P(\text{white-white}) + \\ &\quad P(B|\text{black-white}) \cdot P(\text{black-white}) + \\ &\quad P(B|\text{black-black}) \cdot P(\text{black-black}) \end{aligned} \]

\[ P(B) = 1 \cdot \frac{1}{3} + \frac{1}{2} \cdot \frac{1}{3} + 0 \cdot \frac{1}{3} = \frac{1}{3} + \frac{1}{6} = \frac{1}{2} \]

Plugging these values into Bayes’ rule, we get: \[ P(A | B) = \frac{1 \cdot \frac{1}{3}}{\frac{1}{2}} = \frac{2}{3} \]

Final Thoughts

I was introduced to this problem through David McKay’s brilliant lecture series on Information Theory and book.

It goes to show that beyond the Monty Hall problem we have learnt by heart, Bayesian inference does not come naturally to us. It is also a good reminder to keep thinking about the number of paths that could have led to an outcome.

Footnotes

  1. This problem was initially shared in an article on the nature of thinking tokens. I thought that it deserved its own article.↩︎

Like what you read? Subscribe to my newsletter to hear about my latest posts!