[Math] Conditional probability – choosing marbles

bayes-theoremprobability

Box I contains 4 red and 8 blue marbles while box II contains 5 red and 3 blue marbles. An unfair coin in tossed, whose probability of turning up heads is 40%. If the coin comes up heads box I is chosen and a random marble is chosen, otherwise if it is tails the marble is chosen from box II.

(a) Find the probability a red marble is chosen.

(b) If a red marble is chosen, what is the probability it came from box I?

(c) If a blue marble is chosen, what is the probability it came from box I?

Suppose after the first marble is chosen, the experiment is repeated. Assume the first marble is NOT put back into its box. The coin is flipped again and another marble is chosen from either box I or box II.

(d) What is the probability that the second marble has the same color as the first marble?


My work so far:

(a) P(choosing red) = $(0.4)(\frac4{12}) + (0.6)(\frac58) = \frac{61}{120}$

(b) P(choosing from box I | choosing red) = $\frac{P(choosing red | choosing from box I) P(choosing from box I)}{P(choosing red)}$

P(choosing red | choosing from box I) = $(0.4)(\frac4{12}) = \frac2{15}$

P(choosing from box I) = 0.4

P(choosing red) = $\frac{61}{120}$

P(choosing from box I | choosing red) = $\frac{(\frac2{15})(0.4)}{\frac{61}{120}}= \frac{32}{305}$

(c) Just like (a),

P(choosing blue) = $(0.4)(\frac8{12}) + (0.6)(\frac38) = \frac{59}{120}$

(d) I haven't attempted this one yet. I assume I can simply consider all of the outcomes and add them together, but is there a quicker way?

Best Answer

Bayes's theorem isn't needed for (b) and (c), and in your workings was actually applied incorrectly. The law of total probability is more appropriate.

For (b), $0.4×\frac4{12}$ is $P(\text{red}\cap\text{box I})$, not $P(\text{red}|\text{box I})$. Thus $P(\text{box I}|\text{red})=\frac{0.4×4/12}{0.4×4/12+0.6×5/8}=\frac{16}{61}$. Similarly for (c), $P(\text{blue}\cap\text{box I})=0.4×\frac8{12}$, so $P(\text{box I}|\text{blue})=\frac{0.4×8/12}{0.4×8/12+0.6×3/8}=\frac{32}{59}$.

For (d) there isn't any faster way than just summing the outcomes, but there are only four: $$P(\text{2nd red}|\text{1st red box I})=0.4×\frac4{12}×\left(0.4×\frac3{11}+0.6×\frac58\right)=\frac{71}{1100}$$ $$P(\text{2nd red}|\text{1st red box II})=0.6×\frac58×\left(0.4×\frac4{12}+0.6×\frac47\right)=\frac5{28}$$ $$P(\text{2nd blue}|\text{1st blue box I})=0.4×\frac8{12}×\left(0.4×\frac7{11}+0.6×\frac38\right)=\frac{211}{1650}$$ $$P(\text{2nd blue}|\text{1st blue box II})=0.6×\frac38×\left(0.4×\frac8{12}+0.6×\frac27\right)=\frac{69}{700}$$ $$P(\text{both marbles same colour})=\frac{71}{1100}+\frac5{28}+\frac{211}{1650}+\frac{69}{700}=\frac{10847}{23100}=0.469567\dots$$