# probability question balls?

We have 5 white balls and 3 black balls in a box,we have 4 white balls and 2 black balls in another box,and we have 3 white balls and 6 black balls in another box.Find the probability : a) That if we take a ball it will be black b) The ball taken is from the second box,known that it was a white one ( this one is solved using probability condition P(A/ H i)

I assume that we choose each box with probability $\frac{1}{3}$. If we choose the first, our probability of black is $\frac{3}{8}$. If we choose the second, the probability of black is $\frac{2}{6}$. If we choose the third, the probability is $\frac{6}{9}$. So the overall probability of black is $$\frac{1}{3}\cdot \frac{3}{8}+\frac{1}{3}\cdot \frac{2}{6}+\frac{1}{3}\cdot\frac{6}{9}.$$
For the conditional probability, let $W$ be the event we end up with white, and $S$ be the event the ball came from the second box. We want $\Pr(S|W)$. By the defining formula for conditional probabilities, we have $$\Pr(S|W)=\frac{\Pr(S\cap W)}{\Pr(W)}.$$
We almost know $\Pr(W)$, since in the first part we calculated the probability of black.
For $\Pr(S\cap W)$, note this is $\frac{1}{3}\cdot \frac{4}{6}$.
Let $B$ stand for the event "black ball", $W$ for "white ball" and $S$ for "second box". I assume the ball is picked by first uniformly randomly selecting a box and then drawing (again uniformly randomly and of course independantly) a ball from that box. Then a ball picked that way will be black with $$P(B)=\frac13 \frac 38+\frac13\frac26+\frac13\frac69=\frac{11}{24}$$ (Note that this differs from the $\frac{11}{23}$ we'd have when putting all these balls in on big urn). We have $$P(S,W)=P(S|W)\cdot P(W)$$ and with $P(W)=1-P(B)=\frac{13}{24}$ and $P(S,W)=P(W|S)\cdot P(S)=\frac46\frac13=\frac{2}{9}$ we obtain $P(S|W)=\frac{16}{39}$.