# 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.

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?

• Don't we have a probability of 1 that we choose from one of the bags? In other words, are you sure the last multiplication by $\frac{1}{2}$ is necessary? Also, I think your probability should be $\frac{3}{5}$ for bag A. – smingerson Feb 29 '16 at 1:07
• I don't know. Is it? I would assume that choosing a bag also has a 1/2 chance. In this case, Bag A. Since there are 2 bags. – Aaron Feb 29 '16 at 1:10
• Is that not what you are multiplying each one by $\frac{1}{2}$ for in the first place? Also, I just realized you are calculating the probability of getting a black ball. You want to find, given that a black ball is chosen, it came from bag A. – smingerson Feb 29 '16 at 1:12
• So what would be the correct approach? – Aaron Feb 29 '16 at 1:13

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.
• Which one?${}{}$ – Em. Feb 29 '16 at 1:24
• His name was Bayes, and notice how I started. This is key. They told me that a black ball was selected, then asked what is the probability that is came from $S_A$. In other words, it was given that the ball was black. Hence $P(S_A|B)$. In this instance, it is easier to use Bayes' rule and proceed. – Em. Feb 29 '16 at 1:28