Saturday, August 8, 2009

Patient, Pills, and Probability

A Patient is taking one each of 5 different types of pills every day but he don’t like having to open and close 5 different bottles, so at the beginning of each (30-day) month he put 30 of each type of pill into one big bottle. When it is time to take your pills, he draw them out of the big bottle one at a time until he have (at least) one of each type.

On the last day of the month he will draw exactly 5 pills and they will all be different (because that’s all that’s left in the bottle), but on other days he will generally have to draw more than 5 pills in order to have (at least) one of each type. So, the question is: On the first day of each month (when there are 150 pills in the bottle), how many pills, on average, must he draw from the bottle in order to have (at least) one of each?

Labels: ,

8 Comments:

Anonymous Anonymous said...

42 pills!

August 8, 2009 8:55 PM  
Anonymous Adam said...

11 pills, on average.

August 9, 2009 12:54 PM  
Blogger rick said...

15 pills

August 9, 2009 12:58 PM  
Blogger Ragknot said...

On the first day, when there are 150 pills in the bottle, he will have to get 10.95 pills on average to get one of each.

And it really does not improve much as the bottle gets emptier.

At 20 days, the average reaches about 10, and even at 29 days, the average reaches 6.9

August 9, 2009 8:19 PM  
Blogger pramsay13 said...

On the first day he would need to take out 121 pills to be sure of having 1 of each kind.

August 10, 2009 4:02 AM  
Anonymous Adam said...

The question was not how many he would have to pull to ensure one of each, it asked on average how many he would have to pull to have one of each. Which is 11 (you can't pull 10.95 pills Ragknot, but I like your completeness)

August 11, 2009 5:55 AM  
Blogger Ragknot said...

Thanks Adam, true you can't pull out 10.95, but I did mathamatical model and 10.95 was the average out of almost a million months.

An interesting result I found was that he has only a 4% chance of getting the 5 he needs out of the first five. This precentage does go up slightly and of course reaches 100% on day 30.

The only way this works out as a time saver is that if he has a hard time opening the bottle.
He can open one bottle and get about 10 pills in his hand, then select the five he needs about half the time. If he gets 3 of the five from the first hand full then a second hand full will usually find the other two.

This will not work very well if you usually drop a few pills with your hand full.

August 11, 2009 4:38 PM  
Anonymous Moh said...

Would you explain how you reached the solution please? Thanks.

August 12, 2009 10:56 AM  

Post a Comment

Links to this post:

Create a Link

<< Home