I have a problem that can be reduced to a classic box with red and black balls.
We have a box containing $N$ red balls and $M$ black balls. Taking $K$ balls at a time (without replacement), what is the expected number of tries I need to get all $N$ red balls.
After looking similar questions I see we need to calculate the expected value of the given probability distribution, but can't figure out which one is it.
Let's take a look at an example of what we are looking at:
Assume N=3, M=8 and K=2.
- In the best case, after 2 tries I'd already found 3 red balls (i.e., 2 at the 1st and 1 at the 2nd, or viceversa).
- In the worst case, it will take 6 tries to take the red balls (i.e., I'll first find all black balls). There are actually many variations of this worst case where I find some red ball before, but the last at the end.
But, how to define this "average" expected case?
Let's take a simple example $N=3$, $M=3$, and $K=2$. The possible draws to choose all 3 red balls in this case are (If I missed any possibility, correct me please)
RR RB = 2 steps with probability $p_1$ (R = red, B = black)
RB RB RB = 3 steps with probability $p_2$
RB RR = 2 steps with probability $p_3$
RB BB RR = 3 steps with probability $p_4$
RR BB RB = 3 steps with probability $p_5$
BB RB RR = 3 steps with probability $p_6$
BB RR RB = 3 steps with probability $p_7$
You need to calculate the probability of each event above. The expected/average number of steps is calculated as in
$$\sum_ip_ix_i$$
where $p_i$ is the probability and $x_i$ is the number of steps for event $i$.