Probability of extracting a ball after two balls were swapped

probabilityproof-verification

We have $2$ boxes, the first one contains $10$ white balls and $11$ black balls. The second box contain $12$ white balls and $13$ black balls.
We swap two balls between the boxes then we extract a ball from the first box. What is the probability that the ball is white?

A swap consists in taking a ball from the first box and put it in the second one, then taking a ball from the second box and put it in the first one.

$$P(\text{white ball from box1})=\frac{10}{21}$$
$$P(\text{black ball from box1})=\frac{11}{21}$$
$$P(\text{white ball from box2})= \frac{12+1}{26}\frac{10}{21}+\frac{12}{26}\frac{11}{21}=\frac{13\cdot10+12\cdot11}{26\cdot 21}$$
$$P(\text{black ball from box2})= \frac{13}{26}\frac{10}{21}+\frac{13+1}{26}\frac{11}{21}=\frac{13\cdot 10+14\cdot 11}{26\cdot 21}$$

$$P(\text{white ball from box1 after swap})=\frac{10+1}{22}\cdot\frac{13\cdot10+12\cdot11}{26\cdot 21}+\frac{10}{22}\cdot\frac{13\cdot 10+14\cdot 11}{26\cdot 21}$$
$$=\frac{2882}{12012}+\frac{2840}{12012}=\frac{5722}{12012}=0.4763$$

Have I done it correctly? I don't know how to verify myself with this kind of problems.
Also, is there a trick to find the probability if there were two swaps?

Best Answer

Here’s another approach. [Added: Also, see more on this approach here]

Equivalently, we can do the following.

Reach into the first box and write “S” on one ball (the one to swap). Now choose a ball from the first box. If it is not the “S” ball, that’s your ball. The probability of this happening is $20\over21$, and the ball you choose will be white with probability $10\over21$. If you do choose the “S” ball (you do this with probability $1\over21$), discard it by throwing it into the second box and then choose a ball at random from the second box (now containing an extra ball), and that’s your ball. If you had to do this, the probability of a white result is ${12+{10\over21}\over26}$, because if we add a randomly-chosen ball from box 1 to box 2, the number of white balls in box 2 effectively increases from $12$ to $12+{10\over21}$ and the number of balls in box 2 increases to $26$. Therefore the total probability you want is

$$p = {20\over21}\cdot{10\over21}+{1\over21}\cdot{12+{10\over21}\over26}={2731\over5733}\approx 0.4763649.$$

P.S. I don’t see an easy way to adapt this approach for two swaps.

Related Question