Expectation of number of runs until all events have happened?

77 Views Asked by At

I have a set of devices, $N$ of each, where each device $d_1,d_2,...$ has an associated probability $p_1,p_2,...$ of firing.

I test all devices in one run, and remove those that fire. I then repeat the process, removing at each run any devices that fired.

How can I calculate the expected number of runs to have seen all devices having fired?

For example, say I have 3 each of devices $a,b,c,d$, where respective probabilities of any one firing during a run are $.1, .2, .3, .4$

I do a run, and 2 of the $a$ fire, 1 of the $b$, and all of the $c, d$ fire, leaving me with 1 $a$ and 2 $b$, so I do a new run with just those, and so on until I've seen all of them fire.

I've done a simulation for this, but I'm wondering if there's a clean and direct mathematical way to get the answer.