1. ## Probability - balls in baskets

Suppose we have n white balls and n black balls and we place them randomly into two baskets such that each basket has n balls. Suppose now we randomly pick one ball from each basket and swap them. What is the probability that we originally had i white balls in the first basket and now have j white balls in the first basket?

2. ## Probability

Hello alakazam
Originally Posted by alakazam
Suppose we have n white balls and n black balls and we place them randomly into two baskets such that each basket has n balls. Suppose now we randomly pick one ball from each basket and swap them. What is the probability that we originally had i white balls in the first basket and now have j white balls in the first basket?
The number of ways of selecting the n balls to go in the first basket is $\displaystyle \binom{2n}{n}$.

The number of ways of selecting $\displaystyle i$ white balls from $\displaystyle n$, and $\displaystyle (n-i)$ black balls from $\displaystyle n$ to go in the first basket is $\displaystyle \binom{n}{i} \times \binom{n}{n-i}=\binom{n}{i}^2$.

So the probability that there are initially $\displaystyle i$ white balls in the first basket is

$\displaystyle \frac{\binom{n}{i}^2}{\binom{2n}{n}}$

At the commencement of the second stage, there are $\displaystyle i$ white and $\displaystyle (n-i)$ black balls in the first basket, and $\displaystyle (n-i)$ white and $\displaystyle i$ black in the second. Then there are three possibilities:

$\displaystyle j = i+1$, where a black ball is removed from the first basket, and a white from the second. The probability of this is

$\displaystyle \frac{n-i}{n}\times\frac{n-i}{n}= \frac{(n-i)^2}{n^2}$

$\displaystyle j = i$, where either a black is removed from the first and a white from the second, or the other way round. The probability of this is

$\displaystyle \frac{n-i}{n}\times\frac{i}{n} + \frac{i}{n}\times\frac{n-i}{n}= \frac{2i(n-i)}{n^2}$

$\displaystyle j = i -1$, where a white is removed from the first and a black from the second. The probability of this is

$\displaystyle \frac{i}{n}\times\frac{i}{n}= \frac{i^2}{n^2}$

The overall probabilities therefore are:

$\displaystyle j = i+1: \frac{\binom{n}{i}^2}{\binom{2n}{n}}\times \frac{(n-i)^2}{n^2}$

$\displaystyle j = i:\frac{\binom{n}{i}^2}{\binom{2n}{n}}\times \frac{2i(n-i)}{n^2}$

$\displaystyle j = i-1:\frac{\binom{n}{i}^2}{\binom{2n}{n}}\times \frac{i^2}{n^2}$