PDA

View Full Version : PBR caps


DrVanNostrin
02-08-2006, 02:07 AM
According to a friend of mine there is a value and suit of a playing card under each cap of PBR (52 different ones total). He asked on average how many bottles would one have to drink to get all 52 cards. It's assumed the probability of getting each card is the same.

He posted this on another forum. The replies said that it would be possible to figure this out using a computer simulation. But because I know nothing about computer programming I decided to see if I could do the problem by hand.

The first thing I determined was the probability of getting all 52 in your first 52 beers. This was pretty easy.

52/52*51/52*50/52...1/52 = 52!/(52^52) [I'll refer to this number is 'K' from now on.]

Then I attempted to used a series of and/or logic to determine the probability of getting all 52 on exactly your 53rd bottle. The solution was K*G [G is the probablility of getting exactly one duplicate]. (What I'm saying here is that in order to get all 52 on exactly your 53rd bottle you need to get all 52 and get exactly one duplicate). I thought that G = 0/52+1/52+2/52...51/52. See any flaws so far?

The probablility of getting all 52 on exactly the 54th bottle would then be K*G*G.

This formula is clearly wrong because the according to it the probability of getting all 52 on exactly the nth bottle is K*G^(n-52) [n must be an interger greater than 51]. G is greater than 1 so according to the formula the probability of getting all 52 caps increases forever. This is wrong. But I can't seem to find the flaw in my logic here.

What am I doing wrong here? And is it even possible to do this without a computer simulation?

Please help me determine if collecting PBR caps is an econonical alternative to buying a deck of cards.

/images/graemlins/laugh.gif

Edit: I think I just realized where I was going wrong. The formula I gave is for determining the probabily of having all 52 by the nth bottle not getting the completing the collection on exactly the nth bottle.

pzhon
02-08-2006, 12:18 PM
This is the coupon-collecting problem. See the section under coupon.s in the probability section of the rec.puzzles (http://www.cs.uu.nl/wais/html/na-dir/puzzles/archive/probability.html) archive.

After you have accumulated k distinct cards, the expected number of cards you have to collect until you get the k+1st is 52/(52-k), so the expected total waiting time is 52/52 + 52/51 + ... + 52/1 = 52 (1/1 + 1/2 + 1/3 + ... + 1/52) ~ 52 (ln 52 + gamma), where gamma is Euler's gamma constant (http://mathworld.wolfram.com/Euler-MascheroniConstant.html), about 0.577. The sum is 235.98. The approximation is 235.48.

DrVanNostrin
02-10-2006, 02:01 AM
Thanks a lot for the reply. The answer made sense. I followed the link but couldn't understand the math behind the approximation. I guess that's a minor detail of the problem.

The way did it got the wrong answer, but I still can't figure out why.

Anyway, I appreciate the response.