[Math] Bag A Contains 2 white and 3 black balls, Bag B Contains 5 white and 7 black balls. Ball is selected at random and is black.

discrete mathematicsprobability

Bag A Contains 2 white and 3 black balls, Bag B Contains 5 white and 7 black balls. Ball is selected at random and is black. What is probability that the ball came from bag A?

Here's my approach
Since we know that the ball was black, the chance of drawing a black ball is $(\frac12)(\frac35) + (\frac12)(\frac7{12})$, Basically, chance of black ball from A, black ball from B and add them together.
Choosing from either Bag A or Bag B is a $\frac12$ chance, therefore the answer I came to was

$[(\frac12)(\frac25) + (\frac12)(\frac7{12})]*\frac12$

Would this be the right approach?

Best Answer

Let $S_i$ be the event that you selected bag $i$; $W,B$ that you selected a white or black ball. I assume that be 'randomly selected' they selecting either bag is equally likely. Then you are being asked \begin{align*} P(S_A|B)&= \frac{P(S_A,B)}{P(B)}\tag 1\\ &=\frac{P(B|S_A)P(S_A)}{P(S_A,B)+P(S_B,B)}\tag 2\\ &=\frac{P(B|S_A)P(S_A)}{P(B|S_A)P(S_A)+P(B|S_B)P(S_B)}\\ &=\frac{(3/5)(1/2)}{(3/5)(1/2)+(7/12)(1/2)}\\ &=\frac{36}{71}. \end{align*} where in $(1)$ I used Bayes' rule and in $(2)$ I used the product rule on the numerator, and the law of total probability on the denominator.

Related Question