[Math] Expected number of trials until n-th success urn problem without replacement

probability

I have a close relative of the urn problem, but with a slight twist.

Given an urn containing $r$ red balls and $b$ blue balls, how many balls should I expect to pull out of the urn before I have pulled $d \leq b$ blue balls out of the urn?

In the standard version of this problem you are only interested in the number of balls one has to pull out before the FIRST success (and there are a number of places where one can look for that piece of information), but I am instead interested the expected number of balls one has to pull out of the urn before the $n$-th success.

Best Answer

This can be done with indicator variables. Label the red balls and let $I_i$ indicate the event that red ball $i$ is drawn before the $d^\text{th}$ blue ball. The number $X$ of balls drawn before the $d^\text{th}$ blue ball is then $d-1+\sum_{i=1}^r I_i$, so $EX = d-1+rEI_1$.

Respectively label the red and blue balls as $s_i$ and $c_j$. Assuming you are drawing without replacement, $EI_1 = P\{s_1 \text{ is in at most the $d^\text{th}$ position amongst }s_1,c_1,\ldots, c_b\}=d/(b+1)$.

Final answer: $d-1+rd/(b+1)$ (modulo my errors!).