# Probability of drawing different items from a subset with replacement

I'm trying to generalize a game mechanic, to understand the probability that the game developers are giving us, but this went over my head.

The mechanic is:

• draw 10 items from a bag of 33 items
• each draw is independent (with replacement)
• 5 of the items are "badges"
• you win if 3 different badges are drawn

Thank you!

• So what is the question? What is the probability of winning? Feb 7, 2019 at 11:19
• You win if 3 different badges are drawn or at least 3? Feb 7, 2019 at 11:29
• Yes, what is the probability of winning. You win if 3 different badges are drawn. Feb 8, 2019 at 0:04
• Have a look at my answer then. Feb 11, 2019 at 8:23

I am going to assume that your question is "what is the probability of winning this game", that is drawing exactly 3 different badges. A simple simulation will get you your result.

> bag=c(rep(0,28),1:5)
> rez=replicate(1e5,{
>   smp=sample(bag,10,replace=T)
>   return(length(unique(smp[smp!=0])))
> })
>
> prop.table(table(rez))

rez
0       1       2       3       4       5
0.19221 0.40511 0.29756 0.09257 0.01201 0.00054


So the probability of "winning" is roughly $$9.3 \%$$.

• The exact value is $4267642480600/46411484401953\approx 9.20\%.$ A general answer is easy to arrive at by representing the draws as a Markov chain, because the transition matrix can immediately be diagonalized (since it is upper triangular).
– whuber
Feb 7, 2019 at 15:25