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 ?

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}$.
