Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I wanna to calculate a probabilities of buying a box of lucky cards. However I am messed up with the equations.

The question: Let there is a box with 30 cards. and 6 of them are lucky cards.

Calculate the probabilities of buying cards one by one until 6 cards are all brought.

At which number would the probability that the chance is higher than 80%?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

Presumably each purchase is independent and can buy each card with equal probability $\frac{1}{30}$.

Suppose $P(n,k)$ is the probability that after $n$ purchases you are missing $k$ lucky cards. Then $$P(n+1,k)=\frac{30-k}{30}P(n,k)+\frac{k+1}{30}P(n,k+1)$$ starting at $P(0,6)=1$ and $P(0,k)=0$ for $k \not = 6$. This can easily be calculated, for example using a spreadsheet.

You are interested in the smallest $n$ such that $P(n,0) \gt 0.8$. It turns out that $P(97,0) \approx 0.79402$ while $P(98,0) \approx 0.80031$.

As a check on the calculations, the expected number of cards needed to be bought to get all the lucky cards is both $\displaystyle\sum_{n=0}^\infty (1-P(n,0)) = 73.5$ and $30\left(\frac16 + \frac15 + \frac14 + \frac13 + \frac12 + \frac11\right)=73.5$.

Added

If purchases were without replacement (meaning that at $30$ purchases you have all the cards, lucky and unlucky), the recurrence becomes

$$P(n+1,k)=\frac{30-n-k}{30-n}P(n,k)+\frac{k+1}{30-n}P(n,k+1).$$

You now find $P(29,0) = 0.8$. This is not a surprise as the probability the final card purchased is lucky is $\frac{6}{30}=0.2$.

share|improve this answer
    
Thanks for answering the question, How about if the box is fixed to 30 cards and fixed lucky cards are 6. Once the lucky card is picked and no replacement. Will the answer be different? –  Kitw Dec 18 '12 at 7:17
    
Shall the equation become, P(n+1,k)=(30−k)/(24+k) * P(n,k)+ (k+1)/(24+k) * P(n,k+1) –  Kitw Dec 18 '12 at 7:39
    
Followed above, the result turns a bit wield, am I miss something? <a href="picturepush.com/public/11714784"><img src="www1.picturepush.com/photo/a/11714784/img/11714784.png"; border="0" alt="Image Hosted by PicturePush - Photo Sharing" /></a> –  Kitw Dec 18 '12 at 7:53
    
@Kitw: Not quite, instead see my addition. The fact that your rows of probabilities do not add up to 1 should suggest an issue. –  Henry Dec 18 '12 at 7:55
    
Many thanks for solving my mess :) –  Kitw Dec 18 '12 at 8:03
add comment

If you buy cards one by one, the box of 30 doesn't matter. How many total cards are there? You have the Coupon collector's problem but need to specify the conditions better before there can be a specific solution.

share|improve this answer
    
Thanks for the answer, Had just read the Coupon collector's problem, does it replace everytime? If the box size and number of cards are fixed, will the math be the same –  Kitw Dec 18 '12 at 7:19
    
The fact is to find the expected value of how many times is the best to stop buying more. On the same condition, What is the probabilities that first 12 pick will get half cards and so on. –  Kitw Dec 18 '12 at 7:22
    
@Kitw: In the classic Coupon collector's problem, each coupon is randomly selected from the universe, so yes, it replaces every time. You can use the classic coupon collector's problem for 6 cards and multiply by 5, because $\frac 45$ of the time you don't get a lucky card and can ignore it. You want the number of draws to complete your set of 6. –  Ross Millikan Dec 18 '12 at 14:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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