Drexel dragonThe Math ForumDonate to the Math Forum

Ask Dr. Math - Questions and Answers from our Archives
_____________________________________________
Associated Topics || Dr. Math Home || Search Dr. Math
_____________________________________________

Online Lottery


Date: 02/01/2002 at 05:44:27
From: Ashok Dang
Subject: Lotteries

Sir,

These days many sites offer free online lotteries. For example, a 
site asks us to choose 7 numbers from 1 to 63. Then it generates 
7 numbers from 1 to 63. If all 7 numbers match, they give $1,000,000; 
if 6 match they give $1,000, etc.

The numbers 1 2 3 4 5 6 7 match 5 3 7 2 6 1 4 because order doesn't 
matter. Moreover, we can have the same numbers selected - e.g. we 
can't have 10 23 44 51 44 11 23 because here are two 44s and 23s. We 
can choose unique numbers only.

So please tell how many chances there are that
All 7 numbers match
All 6 numbers match
All 5 numbers match .. etc.

How to calculate them? 

Please help.


Date: 02/04/2002 at 01:23:08
From: Doctor Jeremiah
Subject: Re: Lotteries

Hi Ashok,

Here are a couple of pages from the Dr. Math FAQ that may help you 
understand this problem:

   Introduction to Probability
   http://www.mathforum.org/dr.math/faq/faq.prob.intro.html   

   Permutations and Combinations
   http://www.mathforum.org/dr.math/faq/faq.comb.perm.html   

If the order doesn't matter and the numbers must be unique, then this 
is calculated with the combination formula. The way this formula is 
written uses the ! to mean "factorial," where you multiply all the 
numbers between 1 and whatever value. So 5! means 5x4x3x2x1. The 
reason this is in the equation has to do with the way selections are 
made.

The chance that your first number will match the first number drawn is 
1 in 63. After that, the chance that your second number will match the 
second number drawn is only 1 in 62, because one of the numbers is 
already gone. Then the chance that your third number will match the 
third number drawn is 1 in 61, because there are two numbers already 
gone. And so on.

When there are multiple dependent events, you must multiply the 
chances, so if order were important the chances would be 1 in 
63x62x61x60x59x58x57, which can be written with factorials as 
63!/(63-7)!

But that's with order being important. If order is not important we 
have a better chance, which means we must divide by something else to 
make the number of chances smaller. It turns out that for 7 numbers 
there are 7! ways to arrange them. The reason this is so is that there 
are 7 places to put the first number but there are only 6 places to 
put the second number because one spot is already taken, and there are 
5 ways to place the third number... and so on. 

So if order is not important (true in your case) then for 7 numbers 
out of 63 the chances are 1 in (63!/(63-7)!)/7! or 1 in 
(63x62x61x60x59x58x57)/(7x6x5x4x3x2x1), which is 1 in 553270671  
Pretty unlikely!

The chances for 1, 2, 3, 4, 5, or 6 numbers where order isn't 
important and 7 numbers are drawn can be calculated. Its just a bit 
more complicated. Take a look at this problem in the archives:

   Powerball Lottery: Odds of Winning a Prize
   http://mathforum.org/dr.math/problems/joshua.09.02.01.html   

Basically, first we need to simplify our lives. Let's make a notation 
that for r objects choosen from a set of n objects the number of 
combinations is C(n,r).

So for example, the combinations of 7 out of 63 are:

   C(n,r) = (n!/r!)/(n-r)! = (63!/(63-7)!)/7!

Now, the way to match fewer numbers is to break the 7 that are drawn 
into winners (7 of them) and losers (63-7 of them). So, for example, 
the chance of matching exactly 1 of 7 drawn from 63 is calculated like 
this:

Chance of 1 winning (matching 1 of 7 winners):  C(7,1)
Chance of 6 losing (matching 6 of 63-7 losers):  C(63-7,6)

When there are dependent multiple events you multiply the chances, so 
the total chance of 1 out of 6 drawn from 63 is:

   C(7,1) x C(63-7,6) out of C(63,7)

Or:

   (7!/(7-1)!)/1! x (56!/(56-6)!)/6! out of (63!/(63-7)!)/7!
   7 x (56x55x54x53x52x51)/(6x5x4x3x2x1) out of 553270671
   4638348 out of 553270671

So what do we know?

The odds of getting all 7 out of 63 are:
   C(7,7) x C(63-7,0) out of C(63,7)
   (7!/(7-7)!)/7! x (56!/(56-0)!)/0! out of (63!/(63-7)!)/7!
   1 x 1 out of 553270671
   1 out of 553270671

The odds of getting 6 out 7 drawn from 63 are:
   C(7,6) x C(63-7,1) out of C(63,7)

The odds of getting 5 out 7 drawn from 63 are:
   C(7,5) x C(63-7,2) out of C(63,7)

The odds of getting 4 out 7 drawn from 63 are:
   C(7,4) x C(63-7,3) out of C(63,7)

The odds of getting 3 out 7 drawn from 63 are:
   C(7,3) x C(63-7,4) out of C(63,7)

The odds of getting 2 out 7 drawn from 63 are:
   C(7,2) x C(63-7,5) out of C(63,7)

The odds of getting 1 out 7 drawn from 63 are:
   C(7,1) x C(63-7,6) out of C(63,7)
   (7!/(7-1)!)/1! x (56!/(56-6)!)/6! out of (63!/(63-7)!)/7!
   7 x (56x55x54x53x52x51)/(6x5x4x3x2x1) out of 553270671
   4638348 out of 553270671
   (which is close to 1 in 120)

When you have chances that are completely independent (not just 
separate events, but completely independent) you add them, so the 
chance of winning anything at all is:

     C(7,7) x C(63-7,0)
   + C(7,6) x C(63-7,1)
   + C(7,5) x C(63-7,2)
   + C(7,4) x C(63-7,3)
   + C(7,3) x C(63-7,4)
   + C(7,2) x C(63-7,5)
   + C(7,1) x C(63-7,6)
     out of C(63,7)

Or:

   1 + 392 + 32340 + 970200 + 12855150 + 80216136 + 227279052

   321353271 out of 553270671

Which means you win something about 58 percent of the time.

Of course they may not count matching 1 out of 7 drawn from 63 as 
winning. Most lotteries don't. So if you win if you match 3, 4, 5, 6, 
or 7 out of the 7 drawn from the 63, then that means your chances of 
winning anything at all are:

     C(7,7) x C(63-7,0)
   + C(7,6) x C(63-7,1)
   + C(7,5) x C(63-7,2)
   + C(7,4) x C(63-7,3)
   + C(7,3) x C(63-7,4)
     out of C(63,7)

Or:

   13858083 out of 553270671

Which means you win something about 2.5 percent of the time.

- Doctor Jeremiah, The Math Forum
  http://mathforum.org/dr.math/   
    
Associated Topics:
High School Probability

Search the Dr. Math Library:


Find items containing (put spaces between keywords):
 
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

_____________________________________
Math Forum Home || Math Library || Quick Reference || Math Forum Search
_____________________________________

Ask Dr. MathTM
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/