<s>[INST] Probability assignment There are two boxes. In the first one there are, 4 black and 3 white balls, and in the second one there are 3 black and 5 white balls. We take two balls from the first box, and one from the second one and we put then in a third box. If we take out one ball from the third box, what is the probability that the ball we took out is white?
Can someone help me with this?
 [/INST] Let $A$ be the event that a white ball is taken from box 3. Also let $X_k$ be the event that $k$ white balls are in box 3. 
Using the law of total probability we get, 
$P(A) = \sum_{k=0}^3P(A|X_k)P(X_k)$.
$P(A|X_k)$ are easy to calculate. If there are NO white balls in box 3, that is $k=0$, then $P(A|X_0) = 0$. If there are 1 white balls in box 3 ($k=1$), then $P(A|X_1)=1/3$. Similar argument shows that $P(A|X_2) = 2/3$ and $P(A|X_3) = 1$.
Next we calculate $P(X_k)$.
$P(X_3)$ = $P$(2 white balls from box 1 AND 1 white ball from box 2). Since taking ball(s) from box 1 and box 2 are independent events we have
$P$(2 white balls from box 1 AND 1 white ball from box 2) = $P$(2 white balls from box 1)$P$(1 white ball from box 2)
$P$(2 white balls from box 1) =  $\frac{3\choose2}{7\choose2}$
$P$(1 white ball from box 2) = $5/8$.
Hence $P(X_3) = \frac{3\choose2}{7\choose2}\frac{5}{8} = \frac{5}{56}$
Similar arguement shows that 
$P(X_2) = \frac{3\choose2}{7\choose2}\frac{3}{8} + \frac{{3\choose1}{4\choose1}}{7\choose2}\frac{5}{8} = \frac{23}{56}$.
$P(X_1)= \frac{4\choose2}{7\choose2}\frac{5}{8} + \frac{{3\choose1}{4\choose1}}{7\choose2}\frac{3}{8} = \frac{22}{56}$.
We do not have to calculate $P(X_0)$ since it will be cancelled out by $P(A|X_0)$ which equals $0$.
Finally, putting it all together,
$P(A) = 0 + \frac{1}{3}\frac{22}{56} + \frac{2}{3}\frac{23}{56} + \frac{5}{56}$
which is approximately $0.49404$       
</s>