# n balls are chosen randomly and without replacement from an urn containing N white balls and M black balls. Give the probability mass function of the random variable X which counts the number of white balls chosen. Show that the expectation of X is (Nn)/(M+N)

Probability problem involving hyper-geometric distribution
n balls are chosen randomly and without replacement from an urn containing N white balls and M black balls. Give the probability mass function of the random variable X which counts the number of white balls chosen. Show that the expectation of X is $\frac{Nn}{\left(M+N\right)}$.
Hint: Do not use the hypergeometric distribution. Instead, write $X={X}_{1}+{X}_{2}+...+{X}_{N}$ where ${X}_{i}$ equals 1 if the ith white ball was chosen.
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Step 1
which, when simplified gives:
$P\left({X}_{i}=0\right)=\frac{N+M-n}{N+M}$
The way to think about this is the following. ${X}_{i}=0$ denotes the fact of not picking the ith white ball. So, in the n draws, we're allowed to pick any other ball. Therefore, during the first draw, we can pick $N+M-1$ balls (as we don't want to pick the ith white ball), and the probability to do so is $p=\frac{N+M-1}{N+M}$.
When we do the second draw we are allowed to pick $N+M-2$ balls (as we can't pick the ith white ball AND since there's only $N-M-1$ balls in the urn after the first draw),and the probability to do so is $p=\frac{N+M-2}{N+M-1}$
Applying the same logic to the n draws we come to the conclusion that $P\left({X}_{i}=0\right)=\frac{N+M-n}{N+M}$
Step 2
Now, we have $P\left({X}_{i}=1\right)=1-P\left({X}_{i}=0\right)\phantom{\rule{0ex}{0ex}}=\frac{n}{M+N}$.
Finally, to get the expected value of X, first we notice that $E\left({X}_{i}\right)=P\left({X}_{i}=1\right)$ (see post for more details), then from the linearity of the expected value, we have that
$E\left(X\right)=E\left({X}_{1}\right)+E\left({X}_{2}\right)+...+E\left({X}_{N}\right)\phantom{\rule{0ex}{0ex}}=\sum _{i=1}^{N}E\left({X}_{i}\right)\phantom{\rule{0ex}{0ex}}=\frac{N\cdot n}{N+M}$ which is the correct solution.