Suppose there are two gumball machines outside a grocery store, each initially containing gumballs. Each machine has an equal chance of being chosen by people wanting a gumball, with each machine dispensing one gumball at a time.
Now the gumball containers are such that no one can tell how many gumballs are left in a machine until someone tries to buy a gumball only to find that that machine is empty. On the first occasion that someone discovers that one of the machines is empty, the probability that there are (strictly) more than gumballs left in the other machine is
Find
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.
In general, let there initially be n gumballs in each machine. We want to find the probability that, after it is first discovered that one of the machines is empty, there are k gumballs still left in the other machine, where k can be any integer value from 0 to n . (Note that it could be the case that both machines have been emptied, so that when the next person tries to buy a gumball and comes up empty, it is in fact the case that both are empty, i.e., k can equal 0 . )
Now this "discovery" can happen in one of two ways:
(i) for the first combined 2 n − k gumballs bought from the machines, n have been bought from one machine, call it A , and n − k have been bought from the other machine, call it B . On the ( 2 n − k + 1 ) th purchase, the unfortunate shopper tries to buy a gumball from A only to come up empty;
(ii) same as (i) except the roles of machines A and B are reversed.
Both scenarios then have a probability of ( n 2 n − k ) ∗ 2 2 n − k 1 ∗ 2 1 of happening, and so the probability P ( k ) that the "other" machine has k gumballs left in it is
P ( k ) = ( n 2 n − k ) ∗ 2 2 n − k 1 .
In this case we have n = 1 0 0 and k = 6 , 7 , . . . . . , 1 0 0 . It will be easier to calculate using the complement, i.e.,
S = 1 − k = 0 ∑ 5 ( 1 0 0 2 0 0 − k ) ∗ 2 2 0 0 − k 1 = 0 . 6 6 7 5 4 6 . . . .
Thus ⌊ 1 0 0 0 0 ∗ S ⌋ = 6 6 7 5 .