I am trying to solve the following problem:
There are 10 dice. One die is unfair; it always gives 3. All 10 dice look identical. You draw one of the dice and roll it 5 times. The resulting number is 3 each time. Calculate the probability that you have drawn the unfair die.
If all dice were fair, no matter which you take, the probability to get 3 would be 1/6. Now we have one unfair die, which should increase this probability. How to calculate this increase? Bayes' theorem says that:
$$P(A|B) = frac{P(A) P(B|A)}{P(A) P(B|A) + P(bar A) P(B|bar A)},$$
and $P(A)$ is the probability of picking the unfair die. How do I calculate the probability of rolling five 3s?
Best Answer
The question seeks to find the probability that the die drawn is unfair given that it was thrown $5$ times and all throws were $3$s. Hence, we seek to calculate $mathrm{P}(mathrm{Unfair},|,text{5 threes})$. According to Bayes' theorem, we have: $$ mathrm{P}(mathrm{Unfair},|,text{5 threes}) = frac{mathrm{P}(text{5 threes},|,mathrm{Unfair})cdot mathrm{P}(mathrm{Unfair})}{mathrm{P}(text{5 threes},|,mathrm{Fair})cdot mathrm{P}(mathrm{Fair}) + mathrm{P}(text{5 threes},|,text{Unfair})cdot mathrm{P}(text{Unfair})} $$ Now what's the probability to get $5$ $3$s when you picked the unfair die? Well it's $1$ (100%) so $mathrm{P}(text{5 threes},|,text{Unfair}) = 1$ because it always shows a $3$. What's the probability of getting $5$ $3$s when you picked a fair die? It's $(1/6)^5$, so $mathrm{P}(text{5 threes},|,mathrm{Fair}) = (1/6)^5$.
All that's missing are the probabilities of picking a fair or an unfair die. Figure those out and put all values in the formula to get the answer. Can you take it from here?
I find it interesting to plot how the posterior probability of having picked the unfair die depends on the number of $3$s we got. Here is the plot:
So if we throw the die once and get a $3$, the posterior probability is $0.4$ that the die is unfair. After 2 throws, both being $3$s, it's already $0.8$ and after three throws, all of them being $3$s, it's $0.96$.