Suppose that you are playing with your favorite toy vending machine which accepts only 1 dollar coins. It contains 100 unique items that you wish to collect. Currently, you possess (different) items. You want to play until you obtain a new item. The machine has, however, a few very peculiar properties.
First, the probability to obtain a new item if a coin is inserted (by which we mean an item that you currently do not have) is given as: . Second, the machine allows introducing extra coins before turning the lever, improving your chances to get a new item as: , where c denotes the extra coins inserted. Consider 2 strategies:
(I) Old school: insert one coin, turn the lever and hope for a new item. Rinse and repeat if no new item is obtained.
(II) Insert enough coins to be guaranteed to get a new item and turn the lever.
For what values of n is the strategy (II) (strictly) better than (I)?
Credit to the mini game in Danganronpa Trigger Happy Havoc for inspiring this problem.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let us start with strategy (II) as this is the easiest. To be guaranteed to obtain a new item, we need to insert c=n extra coins; that is n+1 coins in total.
Now, for strategy (II) : we continue to try our luck until a first success ( i.e. obtaining a new item) is achieved. The probability distribution therefore follows a typical Negative binomial distribution given as: P ( X = x ∣ r , p ) = ( r − 1 x − 1 ) p r ( 1 − p ) x − r with X denoting the attempt ( also called trial) at which the rth success occurs and p is the probability of success. In our case of course r=1.
We wish to know how many attempts it will take on average to get our first success. This is just the expectation value of the distribution which is: E [ X ] = x = r ∑ ∞ P ( X = x ∣ r , p ) = p r
Thus, in our case, it will take (and therefore cost): 1 0 0 − n 1 0 0 coins.
But now, the turning points of these two strategies occur whenever: n + 1 = 1 0 0 − n 1 0 0 ⇒ n = 0 o r 9 9
which is to say, it is never worth to employ strategy (II), as required.