[Math] Bayes’ rule conditional probability coin toss and dice roll

bayes-theoremprobability

A fair coin is tossed. If it comes up heads, dice 1 is rolled three times. If it comes up tails, dice 2 is rolled three times. Dice 1 contains $2$ blue sides and $4$ green sides. Dice 2 contains $3$ blue sides and $3$ green sides. If it is not known which die was used, and the first and second throw showed green, find the probability the third throw will be green.

Attempt:

Using Bayes' rule:

$P(A = \mbox{green on third}|B =\mbox{green on first and second})$,

\begin{equation}
P(A|B) = \frac{P(B|A)P(A)}{P(B)},
\end{equation}
where $P(B|A)$, $P(A)$, $P(B)$ need to be calculated for both dice.
\begin{equation}
P(B|A) = \left(0.5\times \frac{4}{6}\times \frac{4}{6}\right) + \left(0.5\times \frac{3}{6}\times \frac{3}{6} \right)
\end{equation}
\begin{equation}
P(A) = (0.5\times \frac{4}{6}) + (0.5\times \frac{3}{6})
\end{equation}
\begin{equation}
P(B) = \left(0.5\times \frac{4}{6}\times \frac{4}{6}\right) + \left( 0.5\times \frac{3}{6}\times \frac{3}{6}\right)
\end{equation}

By this thinking, $P(B)$ = $P(B|A)$. Is this correct?

Best Answer

Your $P(A)$ and $P(B)$ are correct, but your $P(B|A)$ is not (if it were, then independence would be given, and the opposite is the case here).

Just use the definition $P(B|A)=\frac{P(A\cap B)}{P(A)}$ and use total probability on the numerator to obtain $$P(A\cap B)=\left(0.5\times \frac{4}{6}\times \frac{4}{6}\times\frac{4}{6}\right) + \left(0.5\times \frac{3}{6}\times \frac{3}{6}\times \frac{3}{6} \right)$$ and so $$P(B|A)=\frac{13}{36}.$$


Actually, Bayes is not needed here. Just calculating $P(A|B)=\frac{P(A\cap B)}{P(B)}=\frac{91}{150}$ should be enough.