1

The intended use case for this question is a common scenario in many video games. Given an event that yields loot, and $N$ different types of "coupons" that are obtained with (independent) probability $p_1$, $p_2$, ... $p_n$, calculate the expected value of how many events it takes to collect all coupons.

There is a variety of literature on the coupon collector's problem with unequal probabilities: https://mat.uab.cat/matmat_antiga/PDFv2014/v2014n02.pdf
Expected number of rolling a pair of dice to generate all possible sums
https://reddit.com/r/2007scape/comments/s3bhvt/since_the_nex_rates_just_dropped_heres_how_much/hsjqwet/

but these tend to provide approximations, and/or methods that are quite complex given the nature of the problem, particularly for small values of $N$ (e.g. $N < 5$). Is there a simple, brute-force solution to calculate this for only a small number of unique "coupons" that does not involve Poisson models, Markov chains, etc - preferably in a way that's explainable to a layman?

As an example, consider an event that yields 3 rare coupons with probability $1/10$, $1/25$, and $1/50$. How do I calculate the expected number of times this event needs to happen before I collect all three coupons?

  • For small values of $N$ and probabilities that are not too small you can just run a bunch of simulations if you're okay with brute force. – Qiaochu Yuan Aug 23 '23 at 07:02
  • An exact formula is given here: https://math.stackexchange.com/questions/4051815/. The number of terms is $2^n-1$, so this quickly becomes unwieldy, but is manageable for smallish $n$. – Mike Earnest Aug 23 '23 at 17:47

1 Answers1

1

Yes, there is an exact solution which is a sum of $2^n-1$ terms. Suppose that $p_1,\dots,p_n$ are probabilities, where $p_1+\dots+p_n<1$. You have a series of draws where each draw gives you either zero or one coupons. The probability of recieving the $i^\text{th}$ coupon is $p_i$. You want to find the expected number of draws until all coupons are collected.

Let me give you the answer for the case $n=3$, and I will explain in words how it generalizes. The expected number of draws is $$ \frac1{p_1}+\frac1{p_2}+\frac1{p_3}-\frac1{p_1+p_2}-\frac1{p_1+p_3}-\frac1{p_2+p_3}+\frac1{p_1+p_2+p_3} $$ In general, you add the reciprocals of all the probabilities, then you subtract the reciprocals of the sum of all pairs of probabilities, add in the sum of reciprocals all triples, subtract the sum of reciprocals of all quadruples, and so on, ending with $\pm 1/(p_1+\dots+p_n)$.

Mike Earnest
  • 75,930