# Black and white balls probability

A bag contains $5$ white balls. The following process is repeated. A ball is drawn uniformly at random from the bag (that is each of the five balls has equal probability $\frac{1}{5}$ of being drawn in each trial). If the color of the drawn ball is white then it is colored with black and put into the bag. If the color of the drawn ball is black then it is put into the bag without changing its color. What is the expected number of times the process has to be repeated so that the bag contains only black balls?

Now, I am new to probability and I thought of random brute force methods to work out this problem, but am unable to do so. I have no good ideas on how to do this problem. Any kind of help/hint is appreciated. Thank you.

• Please show more of an effort. Anything you have thus far would be good, regardless of if you think it's right or wrong.
– Remy
Mar 16, 2018 at 7:43
• This is a slightly disguised coupon collector's problem Oct 6, 2019 at 14:34

Use linearity of expectation. For any $5$ random variables $X_1,..,X_5$ whether we have independence or not
$$E(X_1+X_2+X_3+X_4+X_5)=E(X_1)+E(X_2)+E(X_3)+E(X_4)+E(X_5)$$
• Is $E(X_i)=\frac{5-i}{i}?$ Mar 17, 2018 at 0:06
Let $X_k$ be event of drawing a new ball after $k$ balls were already drawn. The probability of the event is: $$P(X_k)=\frac{n-k}{n},$$ where $n$ is the number of balls.
By linearity of expectation we have: $$E_n=E\left(\sum_{k=0}^{n-1}X_k\right)=\sum_{k=0}^{n-1} E(X_k) =\sum_{k=0}^{n-1}\frac{1}{P(X_k)}=\sum_{k=0}^{n-1}\frac{n}{n-k}=n\sum_{k=1}^n\frac{1}{k}.$$