The posterior probability that the red ball came from box $1$

conditional probability

There are two boxes. Box $1$ contains three red and five white balls and
box 2 contains two red and five white balls. A box is chosen at random $p(box = 1) = p(box = 2) = 0.5$ and
a ball chosen at random from this box turns out to be red. What is the posterior probability that the red
ball came from box $1$?

My solution:

Let $B_1=$Picking Box 1

Let $r=$ Picking a red ball

$P(B_1|r)=\frac{P(r|B_1)P(B_1)}{P(r)}$

We have that $P(r)=P(r|B_1)P(B_1)+P(r|B_2)P(B_2)=\frac{3}{8}\frac{1}{2}+\frac{2}{7}\frac{1}{2}=\frac{37}{112}$

$P(r|B_1)=\frac{3}{8}\frac{1}{2}=\frac{3}{16}$

So $P(B_1|r)=\frac{P(r|B_1)P(B_1)}{P(r)}=\frac{\frac{3}{16}}{\frac{37}{112}}=\frac{21}{37}$

Is this correct?

Best Answer

Correct! But simply, as the probability of choosing box A or B is the same, this can be ignored thus the result is

$$\frac{\frac{3}{8}}{\frac{3}{8}+\frac{2}{7}}=\frac{21}{37}$$

Related Question