Expected number of White balls followed by a Black ball? An urn has n white and m black balls that are removed one at a time in a randomly chosen order. Find the expected number of instances in which a white ball is immediately followed by a black one.
How do I approach such questions? I am clueless about where to even begin!
 A: For $k=1,\ldots,m+n-1$ let $X_k$ be $1$ if the $k$-th ball is white and the $(k+1)$-st ball is black, and $0$ otherwise. There are $\binom{m+n}m$ possible sequences of white and black balls, all of which are equally likely. If we specify that the $k$-th and $(k+1)$-st balls are white and black, respectively, there are $\binom{m+n-2}{m-1}$ possibilities for the remainder of the sequence; why? This means that
$$\Bbb E[X_k]=\frac{\binom{m+n-2}{m-1}}{\binom{m+n}m}=\frac{(m+n-2)!\,m!\,n!}{(m+n)!\,(m-1)!\,(n-1)!}=\frac{mn}{(m+n)(m+n-1)}$$
for $k=1,\ldots,m+n-1$. Now express the number of white balls that are immediately followed by a black ball in terms of the random variables $X_k$, and use linearity of expectation to get the desired result.
A: Label the white balls $w_1$ to $w_n$. Let random variable $X_i$ be equal to $1$ if white ball $w_i$ is immediately followed by a black ball, and $0$ otherwise. Then the number $Y$ of instances in which a white is immediately followed by a black is given by $Y=X_1+\cdots+X_n$. 
By the linearity of expectation we have $E(Y)=\sum_1^n E(X_i)=nE(X_1)$.
To find $E(X_1)$, we find $\Pr(X_1=1)$. We have $X_1=1$ if white ball $w_1$ is not chosen last, and is followed by a black. The probability it is not last is $\frac{m+n-1}{m+n}$. Given that it is not last, the probability it is followed by a black is $\frac{m}{m+n-1}$. It follows that $\Pr(X_1=1)=\frac{m}{m+n}$. 
Thus $E(X_1)=\frac{m}{m+n}$ and $E(Y)=\frac{mn}{m+n}$. 
