I came across this problem from a probability practice book. Could someone give me a hint?
Suppose you have N balls and M of them are red(others aren't red). You keep picking one ball out and NOT putting it back until you get one red ball. Find the expectation of a number of balls you need to pick out.
My approach is to use recursion. Let $X_k$ denote the distribution of number of balls I need to pick to get a red ball with k balls in the pool. Then,
$E(X_k)=\frac{M}{k} + \frac{k-M}{k}(1+E(X_{k-1}))$ , with $E(X_M) = 1$
as with M ball left in the pool, it should be immediate to pick a red ball. But then I end up an equation that I couldn't solve.
$E(X_N) = 1+\frac{N-M}{N}(1+\frac{N-1-M}{N-1}(1+...(1+\frac{1}{M+1}(1+1))))$
can anyone give me a hint or guide me please?
Let $\tau$ be the number of balls drawn until the first red ball is drawn. Then for $1\leqslant n\leqslant N-M+1$ we have $$ \mathbb P(\tau = n) = \frac M{N-(n-1)}\prod_{i=1}^{n-1}\frac{N-M-(i-1)}{N-(i-1)} $$ So the expected number of balls drawn is $$ \mathbb E[\tau] = \sum_{n=1}^{M-n+1} n\cdot\mathbb P(\tau = n) = \sum_{n=1}^{N-M+1}\frac M{N-(n-1)}\prod_{i=1}^{n-1}\frac{N-M-(i-1)}{N-(i-1)}. $$ It turns out this expression has the closed form $$ 1 + \frac{N}{M+1}, $$ as explained in this answer: Expected Value Of Number of Removals From Urn