Understanding the Bertrand's box paradox calculator — concept and principle
This calculator works through Bertrand's box puzzle: boxes hold two gold coins, two silver coins, or one of each; you pick a box at random, draw one coin, and see its colour. What is the chance the other coin in the box is the same colour? You can change the number of each kind of box to see how the answer moves.
How it is calculated
With G gold–gold, M mixed and S silver–silver boxes, after drawing gold:
P(other coin gold) = 2G ÷ (2G + M)
P(you picked a mixed box) = M ÷ (2G + M)
Naive answer (counting boxes) = G ÷ (G + M)
Chance of drawing gold at the start = (2G + M) ÷ (2 × (G + M + S))
- For a silver draw, swap G and S.
The principle
The tempting answer is 1/2: once you see gold, only the gold–gold and mixed boxes remain. But you did not pick a box and then learn its type; you drew a coin. Every coin is equally likely to be drawn, and of the three gold coins, two sit in the gold–gold box. So the gold you saw is twice as likely to have come from that box. This is Bayes' rule: a gold–gold box produces a gold coin with probability 1, a mixed box with probability ½, and the evidence shifts the odds 2 : 1.
Worked example
Default inputs: 1 gold–gold, 1 mixed, 1 silver–silver box; you drew gold.
- Gold coins in all boxes = 2 × 1 + 1 = 3.
- Chance the other coin is gold = 2 ÷ 3 = 66.67 %.
- Chance you picked the mixed box = 1 ÷ 3 = 33.33 %.
- Naive box-counting answer = 1 ÷ (1 + 1) = 50 %.
- Chance of drawing gold at the start = 3 ÷ 6 = 50 %.
How to read the result
The gap between the true and naive answers shows how much information the draw carries. Adding more mixed boxes pulls the true answer down toward the naive one; adding more gold–gold boxes pushes both up. The same reasoning appears in medical tests, the Monty Hall problem and any situation where evidence is more likely under one explanation than another.
Common mistakes
- Counting remaining boxes instead of remaining coins.
- Thinking the silver–silver box matters after a gold draw; it is ruled out.
- Assuming that seeing gold says nothing new.
- Confusing the chance of drawing gold at the start with the conditional answer.
Frequently asked questions
Why is the answer 2/3 and not 1/2?
Because two of the three equally likely gold coins are in the gold–gold box.
Who posed the puzzle?
Joseph Bertrand, in his book Calcul des probabilités (1889).
Is this the same as the Monty Hall problem?
It is related: both are solved by counting equally likely outcomes, or by Bayes' rule, after the evidence is seen.
Sources: J. Bertrand (1889), Calcul des probabilités, Gauthier-Villars · Bayes' rule, standard probability theory