Probability of collecting all 5 different items at random with different weights

538 Views Asked by At

There are 5 different items in a set, each with a weighted chance of being rolled randomly [A-E]. The weights add up to 100%. $$A=5\%, B=10\%, C=15\%, D=30\%, E=40\%$$

You get 1 item every roll no matter what. How many times do you need to roll to collect all 5 items where the probability is < 0.1?

$(5X4^n)/5^n$ will only work if it is equal weights not when each item has a different weight. $n=18$ in this case.

Similar question posted here Probability of collecting all 4 different items while picking 1 random item from the set

This being different, how would you calculate based on weighting?

2

There are 2 best solutions below

1
On

The expected number of rounds until you find an $A$ is $\frac1{0.05}=20$, but that doesn't mean you have found $A$ within $20$ rounds. After $45$ rounds, the probability of failure to collect $A$ is $(1-0.05)^{45}\approx 0.0994<0.1$. The probability that you fail to have collected a $B$ by then is $(1-0.1)^{45}\approx 0.087$. For $C$ it is $\approx 0.00067$, for $D$ it is $\approx 10^{-7}$ and for $E$ it is $\approx 10^{-10}$. Admittedly, the events are not independent. But we see that at least the influence of $C,D,E$ is negligible and the influence of $B$ is almost negligible. Try to find explicitly (though pobably by trial and error starting at $n=45$) the value of $n$ where the probybility to have collected both $A$ and $B$ is $>0.9$; with two instead of five items it is at least not too complicated to write things down.

2
On

Here is yet another way to do it. Set up a Markov chain.

The initial state is 00000, representing no observations of any of the 5 types of items. Final state is 11111, representing all 5 items having been observed at least once. So, for example, the state 10101 is the case where you have not seen items 2 or 4, but have seen items 1,3,5, at least once each. There are 32 states and the absorbing state is 11111.

After you set up the transition matrix (most entries are zero, and each row has at most five nonzero entries), you need to take successive powers of it until the last entry in the first row goes above 0.9 in value. If you set up the states in binary order, the matrix will be upper right triangular.

The Markov chain method gives a result that 47 rolls has a probability of 0.9032 of reaching the final state. This is in agreement with a simulation of 7500 realizations, which produces a 90th percentile (using order statistics) of 47 rolls.