# Probability of drawing the unfair die

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?

• Is this homework? If yes, please add the self-study tag. You can use Bayes' theorem to solve this. – COOLSerdash Jan 30 at 10:00
• Thanks, I have updated the question. – dokondr Jan 30 at 10:10
• You are interested in $P(A|B)$, the probability that you have drawn the unfair die (event $A$), given that you have observed five 3s in a row (event $B$). You have correctly expressed $P(A|B)$ using Bayes' Theorem. Now you just need to plug in the four different probabilities on the right hand side. Can you derive them? – Stephan Kolassa Jan 30 at 10:25

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$$.

• Thanks! Yet the question is: Find the probability that you have drawn the unfair dice. – dokondr Jan 30 at 10:54
• @dokondr I updated the answer. – COOLSerdash Jan 30 at 10:57
• Many thanks! I think I have the answer (see below) – dokondr Jan 30 at 12:59

According to Bayes’ theorem:

P(A | B) = ( P(A) * P(B | A)  )  /  (  P(A) * P(B | A) + P(not A) * P(B | not  A)  )

P(A) = P(unfair) = 1 / 10
P(not A) = P(fair) = 9 / 10

P(B | A) = P(5 threes | unfair) = 1
P(B | not A) = P(5 threes | fair) = 1 / (6^5)

P(A | B) = ( 1 / 10  * 1 ) / (  1 / 10  * 1  + 9 /10 * (1 / (6**5) ) )
P(A | B)  = 0.9988439306358382

P(B) = P(5 threes) =  P(A) * P(B | A) + P(not A) * P(B | not  A)
P(B) = 0.10011574074074074