Bayesian Die Identification

Probability · Easy · Free problem

You have two fair dice on the table: a 4-sided die with faces 1-4, and a 6-sided die with faces 1-6. One die is selected uniformly at random (each equally likely), and a single roll produces the result 2.

What is the probability that the selected die was the 4-sided die?

Think through this using Bayes' theorem and explain why the observation of a 2 shifts your belief away from the 50/50 prior.

Hints

  1. Rolling a 2 is more likely under the 4-sided die (probability 1/4) than the 6-sided die (probability 1/6) -- so the observation should push the posterior above 50%.
  2. With equal priors, the posterior odds equal the likelihood ratio: $(1/4):(1/6) = 3:2$, giving a posterior of $3/5$ directly from the odds.
  3. Use the law of total probability to compute $P(\text{roll}=2)$, then apply Bayes' theorem: $P(D_4 \mid R=2) = P(R=2 \mid D_4)P(D_4) / P(R=2)$.

Worked Solution

How to Think About It: Before calculating anything, ask: does seeing a 2 make the 4-sided die more or less likely? The 4-sided die has a 1/4 chance of rolling a 2; the 6-sided die has a 1/6 chance. So a 2 is more likely to come from the 4-sided die. The posterior should be above 50%. The question is by how much.

Quick Estimate: The likelihoods are 1/4 vs. 1/6, a ratio of 3:2 in favor of the 4-sided die. With equal priors, the posterior odds are also 3:2, giving $P(\text{4-sided} \mid 2) = 3/5 = 60\%$. You can do this in your head without writing Bayes' formula explicitly.

Approach: Formal Bayes' theorem to verify the estimate.

Formal Solution:

Define: - $D_4$: event the 4-sided die was selected - $D_6$: event the 6-sided die was selected - $R = 2$: observed roll

Priors: $P(D_4) = P(D_6) = 1/2$

Likelihoods: $$P(R=2 \mid D_4) = \frac{1}{4}, \quad P(R=2 \mid D_6) = \frac{1}{6}$$

Marginal probability of rolling a 2 (law of total probability): $$P(R=2) = P(R=2 \mid D_4)P(D_4) + P(R=2 \mid D_6)P(D_6) = \frac{1}{4}\cdot\frac{1}{2} + \frac{1}{6}\cdot\frac{1}{2} = \frac{1}{8} + \frac{1}{12} = \frac{5}{24}$$

Bayes' theorem: $$P(D_4 \mid R=2) = \frac{P(R=2 \mid D_4)\,P(D_4)}{P(R=2)} = \frac{\frac{1}{4}\cdot\frac{1}{2}}{\frac{5}{24}} = \frac{\frac{1}{8}}{\frac{5}{24}} = \frac{1}{8}\cdot\frac{24}{5} = \frac{3}{5}$$

Answer: $P(\text{4-sided die} \mid \text{rolled 2}) = \dfrac{3}{5} = 0.60$.

Intuition

The key move in any Bayesian die/urn problem is to compare likelihoods before doing any computation. If the 4-sided die is three times as likely to produce a given outcome as the 6-sided die, and you start with equal priors, the 4-sided die should be three times as probable in the posterior -- full stop. The formal calculation just makes this precise.

This setup is the simplest version of a model selection problem: given data, which hypothesis generated it? In practice, quants do this constantly -- inferring which regime the market is in, whether a strategy's edge has decayed, or whether a data feed has a systematic bias. The mechanics (likelihood ratio times prior odds equals posterior odds) are identical regardless of context. Internalizing the ratio shortcut -- posterior odds = likelihood ratio times prior odds -- is much faster than grinding through Bayes' formula, and it is exactly how you should think at a whiteboard.

Open the full interactive solver →