# Expected number of couples having same number

I have $n_1$ red balls in a box $A$. These balls are numbered from $1, \cdots n_1$. Let make a copy version of box $A$, called box $D$ (It means that the box $D$ will contain $n_1$ red balls from $1, \cdots n_1$).

Throw these balls to a box $B$ with loss probability $p$. Now, we change the color of these balls in the box B to green color.

Throw these balls from box $D$ and $B$ to a box $C$. The loss probability of balls in each box is also $p$. How many balls in box C will have the same number? Thank you so much

The below figure shows a toy example of the question. The balls (4,7) has same number, so the ans. is 2 for the example

The probability that the ball with e.g. number $1$ in box A will reach box B (to get the color green) is $1-p$. On condition that it indeed reaches box B it has a chance of $1-p$ to reach box C (as a green ball). Then the unconditional probability that a green ball with number $1$ will be present in box C is $(1-p)^2$.
The probability that the ball with number $1$ in box D will reach box C (as a red ball) is $1-p$. On base of independence we conclude that the probability that box C will eventually contain a red and a green ball with number $1$ is $(1-p)^3$.
Then we end up with expectation $n_1(1-p)^3$ for the number of pairs of balls in box C that have an equal number.
• Thank you for your answer. if I want to count how many balls that have the unique number in the box C. It will be $n_1(1-p)+n_1(1-p)^2-n_1(1-p)^3$. Is it right? Jun 28, 2016 at 12:23
• Almost. Note that will give outcome $n_1$ if $p=0$, while in that case the outcome must be $0$ (no unique numbers). You must not subtract $n_1(1-p)^3$ but $2n_1(1-p)^3$. This because $n_1(1-p)^3$ is the expectation of couples. Jun 28, 2016 at 12:46
• So, the answer of how many balls that have the unique number in the box C is $n_1(1-p)+n_1(1-p)^2-2n_1(1-p)^3$? Jun 28, 2016 at 13:54
• How about $p=0$? Do you agree that then number of unique numbers must be $0$ (every number comes in twice because no ball gets lost)? Substituting $p=0$ gives indeed $n_1(1-p)+n_1(1-p)^2-2n_1(1-p)^3=0$ but it gives $n_1(1-p)+n_1(1-p)^2-n_1(1-p)^3=n_1\neq0$. Jun 28, 2016 at 14:44