Expected number of balls remaining A box contains $w$ white balls and $b$ black balls. Each time we pick a ball without replacement until there are no white balls left. What is the expected number of black balls remaining in the box ?
 A: Let $X$ be the number of black balls remaining when the last white ball is drawn. We wish to find $E[X]$.
Number the black balls; call them $B_1,B_2,\dots,B_b$. For $1\le j\le b$, let $X_j$ be the "indicator variable" which takes the value $1$if $B_j$ remains in the box when the last white ball is drawn, $0$ otherwise. Observe that $X=\sum_{j=1}^bX_j$. By linearity of expectation, $E[X]=\sum_{j=1}^bE[X_j]=bE[X_1]=bP(X_1=1)=bp$, where $p$ is the probability that $B_1$ is still in the box when the last white ball is drawn.
We have to determine the value of $p$. What is the probability that all of the white balls are drawn ahead of $B_1$? Note that the other black balls are irrelevant; we may as well throw them away. The box contains one black ball, $B_1$, and $w$ white balls. What is the probability that the black ball is drawn last? Plainly that probability is $\frac1{1+w}$, so the final answer is $E[X]=\frac b{1+w}$.
A: bof's answer is correct. I just want to add another solution here for fun.
Denote $B$ as the number of remaining black balls. Consider the picking as a permutation of all the balls.If there are $k$ black balls remaining, where $0 \le k \le b$, we know that the $(w + b - k)$th ball is white. Among the first $w+b-k -1$ balls, there are $w - 1$ white balls and $b - k$ black balls. So,
$P(B=k) = \frac{\binom{w+b-k-1}{b-k}w!b!}{(w+b)!}$.
Therefore,
$E(B) = \sum_{k=0}^{b}kP(B=k) = \frac{w!b!}{(w+b)!}\sum_{k=0}^{b}k\binom{w+b-k-1}{b-k}=\frac{b}{w+1}$.
