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!

  • $\begingroup$ So what is the question? What is the probability of winning? $\endgroup$ – user2974951 Feb 7 at 11:19
  • $\begingroup$ You win if 3 different badges are drawn or at least 3? $\endgroup$ – user2974951 Feb 7 at 11:29
  • $\begingroup$ Yes, what is the probability of winning. You win if 3 different badges are drawn. $\endgroup$ – Venar303 Feb 8 at 0:04
  • $\begingroup$ Have a look at my answer then. $\endgroup$ – user2974951 Feb 11 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))

      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 \%$.

  • $\begingroup$ 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). $\endgroup$ – whuber Feb 7 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.