Duplicate Lottery Picks
Probability puzzles require you to weigh all the possibilities and pick the most likely outcome.
In the Massachusetts Megabucks lottery, six different numbers from 1 to 42 (inclusive) are selected. When you buy a ticket, you can ask for a "quick pick" in which the computer chooses the numbers for you, and you can purchase up to five games on a single ticket. We'll assume that the computer's random number generator is fair, giving each possible combination an equal probability of being chosen.
1. If I "quick pick" for two games, what are the chances that the two games have the same combination of numbers?
2. If I "quick pick" for five games (one fivegame ticket), what are the chances that there are two games on that ticket with the same combination?
3 (The toughie). How many fivegame quickpick tickets would I have to buy in order to have a greater than 50% chance of having at least one ticket with two games on it that match exactly?
Hint#1 is the same as the chance of a singlegame ticket winning the lottery.
Hide
Answer
1. 1/5245786. The first game on the ticket will be some combination. Then you just calculate the chances that the second game on the ticket will match it. This number of combinations is (42 choose 6) or
42! / 6! (426)! = 5245786
So the chances that they match is 1 over this number.
2. For this sort of problem, where you are asking what are the chances of something happening at least once out of several opportunities to happen, you first calculate the opposite  the chances of it NOT happening in all the tries  and subtract from 1. So, what are the chances that the 5 games on the ticket are all different?
We know that there are 5245786 possibilities for any one game. In the first game, we choose one of them. The second game now has a 5245785 / 5245786 chance of being different from that first one. Now the third game has a 5245784 / 5245786 chance of being different from either of the first two; and the fourth has a 5245783 / 5245786 chance of being a new selection. When you have the chances of individual events occurring, and you want to know the chance of them ALL occurring, you just multiply. We multiply the chances of all these events occurring (that is, each choice being different) to get:
(5245785 * 5245784 * 5245783 * 5245782) / 5245786 ^ 4
This equals
0.99999809370925005714289758986902
Remember, this is the chance of all of the games on a fivegame ticket being different. So the chance of at least two of them being the same is 1 minus this number, or
0.0000019062907499428571024101309848736
which is a really tiny number.
3. We take a similar approach with this calculation that we took before: figure out the chance of it not happening for N tickets, and subtract that value from 1. Then we set that chance to 0.5 and solve for N.
We already know the chance of it happening in one try: the tiny number above, which, for now, we'll call p. So the chance of it NOT happening in one try is (1p). The chance of it NOT happening in n tries is (1p)^n, so the chance of it happening at least once in n tries is [1  (1p)^n]. We set this formula to 0.5 and solve for n.
Of course, solving for n is tricky, unless you are comfortable with logarithms. I start with the equation
0.5 = [1  (1p)^n]
Simplify
0.5 = (1p)^n
Take natural logarithm of both sides
ln(0.5) = ln( (1p)^n)
Use logarithm magic
ln(0.5) = n * ln(1p)
Divide both sides by ln(1p)
n = ln(0.5) / ln(1p)
Plug in the number (which we already know) for p and let the calculator do what it's good at
n = 363610.07359999192796640483226154
which is how many tickets we would have to buy to have a 50% chance of seeing one ticket with a match. Since we can't buy fractional tickets, we round up, to make sure we have a greater than 50% chance.
So we need to buy 363611 fivegame tickets to have a better than 50% chance of having at least one ticket on which two games match exactly.
Whew!
Hide
Comments
Paladin
Apr 23, 2009
 Probabilities always make me stop and think. I haven't had any probability courses, but I can usually muddle through with the math I do know and get a decent shot at it. This was fun but very challenging. Well done! 
Shadows
Apr 23, 2009
 Well . . . I think I'll just look on the bright side. I got the first one!
I see you put quite some work into this. It's a nice teaser. When I saw it in proofreading, I rated it fun and hard.
Good job! 
bradon182001
Apr 30, 2009
 Waaaaay over my head.Excellent teaser. Thanks for posting. 
gooberbaby1
Jun 11, 2010
 I would have just put down an answer,NOT an answer & a HUGE explanation 
racoonieboy
Jul 25, 2010
 Actually, the explanation... well, explained a lot and I like it! 
Zag24
Aug 04, 2010
 I'm betting, goober, that you wouldn't have put the answer at all, since I bet you couldn't have come up with it. 
(user deleted)
Jul 21, 2011
 THe answer was well explained. Good job! 
ali_p
Sep 13, 2012
 I don't think this is right...what accounts for the fact that you're more likely to match 2 games when you have 5 games per ticket instead of just having to match one game to another? I think you're using the wrong "P"...otherwise, what would account for it being less likely to match 3 out of 5 versus just 2 out of 5?? 
Zag24
Feb 15, 2013
 all_p, sorry I didn't see your question until just now.
In the explanation, step 2, there are four fractions we are multiplying:
(5245785 * 5245784 * 5245783 * 5245782) / 5245786 ^ 4
That is, we are confirming that all 5 combos on the ticket are different. If we had only, say, three combos on one ticket, that step would only be
(5245785 * 5245784) / 5245786 ^ 2
and if there were only 2 combos on one ticket, it would be the same as the first step,
5245785 / 5245786
Remember that these are the chances that all the combos are different. The chances that there are two the same is 1 minus this. 
masutra95
May 27, 2015
 Problem reads like 6 numbers are drawn in order without replacement out of the 42 possible, but in the solution instead it seems to be assumed that 6 numbers are drawn with replacement and the order does not mater... 
Zag24
Jun 13, 2015
 masutra95: Sorry, but you're mistaken. The number of combinations if it were 6 numbers with replacement where order does matter, the number of combinations would be simply 42 to the 6th power.
If it were 6 choices without replacement, but order does matter, it would be
42 * 41 * 40 * 39 * 38 * 37 = 42! / (426)!
Think of drawing the balls in order. There are 42 from which to choose for the first one, then there are 41 from which to choose the second one, and so on down to 37 from which to choose the last one.
Now, if we want to make it such that order does not matter, we divide by number of ways you can arrange 6 different numbers. This is 6 * 5 * 4 * 3 * 2 or 6!
[42! / (426)! ] / 6! = 42! / 6! (426)! which is the formula I used above, also known as (42 choose 6).
This is, by the way, exactly how the (n choose m) formula was originally derived. 
Back to Top
 

Follow Braingle!