Probability of picking items from a list when each item has a probability that indicates “try the next item instead”

probability

In a computer game, there is a list of items and each item has an associated probability [0, 1] for being chosen. The game looks at the first item, rolls a PRNG [0, 1) and if above or equal to the associated probability, the item is selected (the rest ignored). If below, the game looks at the second item and repeats the process.

How can I calculate the overall probability for each item of the list given this selection process?

I know, for the first item, it's always the associated probability ($p_1$). For the second, I suppose, it is $(1 – p_1) * p_2$, i.e., probability the first item was not chosen times the probability the second item is chosen. But then, what would be the third (and subsequent) item's formula(s)?

Best Answer

Keep going like you started. The probability that neither the first nor the second item is chosen is $(1-p_1)(1-p_2)$, so the probability that the third item is chosen is $(1-p_1)(1-p_2)p_3$, and so on.

Related Question