Choosing marbles from bags

probability

Bag A has $3$ white and $2$ black marbles. Bag B has $4$ white and $3$ black marbles.

Suppose we draw a marble at random from Bag A and put it in Bag B. After doing this, we draw a marble at random from Bag B, which turns out to be white. Given this information, what is the probability that the marble we moved from Bag A to Bag B is white?

I know that the probability a white marble is choesn from Bag A is 3/5 and then after the white marble is drawn, the proability of getting a white marble from bag B 5/8. But I don't know if I should add or multiply 5/8 and 3/5.

Best Answer

Apply Bayes' rule:

$$P \text{(A White|B White) }= \frac{ P \text{(B White|A White)P(A White)}}{P\text{(B White)}}=\frac{(5/8)(3/5)}{(5/8)(3/5)+(2/5)(4/8)}=\frac{3/8}{3/8+1/5}=15/23$$