Probability, balls with replacement in the other box Having 2 boxes, in of them there are 'n' blue balls and 'm' red balls and in the other one there are 'x' blue balls and 'y' red balls. I randomly draw a ball from the first box and place it in the second one. If I randomly select a box and pick two balls from that, what's the probability of having 2 blue balls?
I think I should solve it using conditional probability as below:
$$
P(Blue1\cap Blue2\ )=P(Blue1\cap Blue2\cap FirstBox\cap firstBallBlue)+P(Blue1\cap Blue2\cap SecondBox\cap firstBallBlue)+P(Blue1\cap Blue2\cap FirstBox\cap firstBallBlue^c\ )+P(Blue1\cap Blue2\cap SecondBox\cap firstBallBlue^c\ )
$$
$$
$$
and for example:
$$
P(Blue1\cap Blue2\cap FirstBox\cap firstBallBlue) =
$$
$$
 P(firstBallBlue)\times P\left(A|firstBallBlue\right) \times P(Blue1\left|FirstBox\cap firstBallBlue\right) \times P(Blue2|Blue1\cap FirstBox\cap firstBallBlue)
$$
and so on..
Is my solution correct? and I think there maybe a better and smaller solution. can you help me with that?
 A: Your first decomposition is correct.  Although I prefer to use Bayes' rule directly to avoid joint distribution. Below $B_1, B_2$ are the two event of drawing a blue ball, $B_{1->2}$ is the event of drawing the ball from the first urn to the second urn (we're summing on it, once it means the event of drawing a blue ball, the second of drawing a red one), and $U$ is the event of choosing a urn.
$$
P(B_1 \wedge B_2) = \sum_U P(B_1 \wedge B_2 | U) P(U) = \sum_U \sum_{B_{1\to2}} P(B_1 \wedge B_2 | U, B_{1\to2}) P(B_{1\to2}|U) P(U)
$$
Both equalities comes from Bayes' rule applied to $P(B_1 \wedge B_2)$ and $P(B_1 \wedge B_2|U)$ respectively.  Note that it is implied in you problem that choosing a urn is independent of the color of the ball drawn from the first urn to the second.  Hence $P(B_{1\to2}|U) = P(B_{1\to2})$, so you have
$$
P(B_1 \wedge B_2) = \sum_U \sum_{B_{1\to2}} P(B_1 \wedge B_2 | U, B_{1\to2}) P(B_{1\to2}) P(U)
$$
Using Bayes' rule once more, you get:
$$
P(B_1 \wedge B_2) = \sum_U \sum_{B_{1\to2}} P(B_2 | B_1, U, B_{1\to2})P(B_1 | U, B_{1\to2}) P(B_{1\to2}) P(U).
$$
This is your solution if $A = FirstBox$ in your statement, except I've added the conditional independance.
