Bayes theorem problem example

bayes-theoremprobability

In an urn we have 3 fair dice and 1 unfair. The fair ones are cubic and the unfair is a tetrahedron with all 6s.
We put our hand inside the urn and pick one die at random. Assuming we can't tell from its shape if it's fair or not, with eyes blindfolded, we roll the die we picked. Find the probability we bring a 6.
Then, given we got a 6, find the probability we had picked the unfair die.
Lastly, given that we got a 6 in the previous case, find the probability we get one more 6, by re-rolling this same die.

In the first question, since the sample space is $(1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,6,6,6,6)$, the probability of getting a 6 is $\frac{7}{22}$.

In the second question, since we have 4 6s from the unfair die and 3 6s from the 3 fair dice, given that we got a 6, the probability of having picked the unfair die is $\frac{4}{7}$.

I am not sure about the last question: Clearly we must use Bayes' theorem but I am not very familiar with it.

$P(A|B) = \frac {P(B|A)(P(A))}{P(B)}$.
$A$ is the event of picking the unfair die and $B$ the event of rolling a second 6 after the first roll is a 6.
$P(B|A) = 1$,
$P(A) = \frac {1}{4}$ since the unfair die is 1 in 4.
$P(B)$
So $P(A|B) = \frac {P(B|A)(P(A))}{P(B)}$.

Can you help me finish the last question? Thanking you in advance!

Best Answer

Your first and most critical error is that the set of faces on the four dice are not equiprobable. You enumerated the outcomes as $$\{1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,6,6,6,6\}$$ but this is not representative of how likely each face is to occur, because the sampling process is not uniform on the faces, but rather, on the dice. In other words, there are two random processes at work here: the first is you pick a die uniformly and at random from the bag. The second is that you roll the die that you picked.

Because of this two-step process, it is not the case that the probability of rolling a $6$ is simply $7/22$. Instead, you must consider the fact that the tetrahedral die has a $1/4$ chance of being selected, thus the six that it will invariably roll if selected are more likely to occur than would be the case if all faces are equiprobable. The correct probability of rolling a $6$ is given as follows. Let $T$ be the event that the tetrahedral (unfair) die is selected, and $X \in \{1, 2, 3, 4, 5, 6\}$ be a random variable describing the outcome of the die roll. Then by the law of total probability,

$$\Pr[X = 6] = \Pr[X = 6 \mid T] \Pr[T] + \Pr[X = 6 \mid \bar T]\Pr[\bar T],$$

where $\bar T$ is the complementary event of selecting a cubic (fair) die. Then since $\Pr[T] = 1/4$ and $\Pr[\bar T] = 1 - 1/4 = 3/4$, we have

$$\Pr[X = 6] = 1 \cdot \frac{1}{4} + \frac{1}{6}\cdot \frac{3}{4} = \frac{3}{8}.$$

In the second part of the question, we are asked for $$\Pr[T \mid X = 6],$$ the probability of having selected the tetrahedral die given that the outcome of the roll was $6$. We simply apply Bayes' rule here:

$$\Pr[T \mid X = 6] = \frac{\Pr[X = 6 \mid T]\Pr[T]}{\Pr[X = 6]}.$$ We already have all of the quantities on the right hand side: $$\Pr[T \mid X = 6] = \frac{1 \cdot \frac{1}{4}}{\frac{3}{8}} = \frac{2}{3}.$$

For the last part, we are asked for $$\Pr[X_{\text{new}} = 6 \mid X = 6],$$ that is to say, the posterior predictive probability that the next roll is $6$ on the same die that was selected after the first roll observed was $6$. Unlike the previous calculation, we cannot blindly use Bayes' rule, since the temporal order of events is that $X$ is first observed, then $X_{\text{new}}$ is observed afterwards. Instead, we must again condition on the fairness of the die that was selected.

Think for a moment what we need. Given we rolled a $6$, the posterior probability that we had selected the unfair die is $2/3$, which is higher than the prior probability $1/4$ of selecting the unfair die. So our intuition suggests that rolling a second $6$ on the same die should also be more likely than $3/8$. In particular,

$$\Pr[X_{\text{new}} = 6 \mid X = 6] = \Pr[X_{\text{new}} = 6 \mid T]\Pr[T \mid X = 6] + \Pr[X_{\text{new}} \mid \bar T]\Pr[\bar T \mid X = 6].$$

This is again an application of the law of total probability, except we are conditioning on the fairness of the die after we observed a $6$ on the first roll. This works because once a die is selected, the outcome of the next roll does not depend on the outcome of previous rolls, only on the distribution of the face values that are on that die. This is why it is unnecessary to write on the right-hand side instead $$\Pr[X_{\text{new}} = 6 \mid T \cap (X = 6)]\Pr[T \mid X = 6] + \Pr[X_{\text{new}} \mid \bar T \cap (X = 6)]\Pr[\bar T \mid X = 6],$$ because the independence of rolls given a particular die implies $$\Pr[X_{\text{new}} = 6 \mid T \cap (X = 6)] = \Pr[X_{\text{new}} = 6 \mid T]$$ and $$\Pr[X_{\text{new}} = 6 \mid \bar T \cap (X = 6)] = \Pr[X_{\text{new}} = 6 \mid \bar T].$$ Now all that is left is to use the previous two parts to calculate the last part. We already established $\Pr[T \mid X = 6] = 2/3$, so the complementary event is $$\Pr[\bar T \mid X = 6] = 1/3,$$ i.e. given that you rolled a $6$, the probability the die selected is fair is $1/3$. So $$\Pr[X_{\text{new}} = 6 \mid X = 6] = 1 \cdot \frac{2}{3} + \frac{1}{6} \cdot \frac{1}{3} = \frac{13}{18},$$ which is greater than $3/8$ as our earlier intuition suggested.

Related Question