# Math Help - Lottery, matching 5 out of 6 numbers correctly.

1. ## Lottery, matching 5 out of 6 numbers correctly.

Sorry for asking another lottery question, I did a search and there seem to have been a lot, but none answer my question.

I'm trying to work out the probability of getting 5 out of 6 numbers correct in the British National Lottery, actually I know the probability - I'm trying to work out how to work it out (so to speak).

Here's how the lottery works:

1) 6 unique numbers between 1 and 49 are selected by each player on their ticket.
2) There are 49 balls with the integers 1 through to 49 on them.
3) 6 'Winning' balls are chosen during the lottery draw and a further 'Bonus Ball' is drawn at the end, making 7 balls drawn in total.

There are lots of winning tickets but the large cash prizes are for:

a) Matching all 6 winning numbers.
b) Matching 5 of the 6 winning numbers and matching the 'Bonus Ball' number.
c) Matching 5 of the 6 winning numbers.

a) is pretty easy to work out:

Either:

(49 * 48 * 47 * 46 * 45 * 44) / 720 = 13,983,816
Divided by 720 because there are 720 ways that the 6 balls can be drawn and the order in which the numbers are drawn does not matter.
6 * 5 * 4 * 3 * 2 = 720

Or you can work it out like this:

1 / ( (6/49) * (5/48) * (4/47) * (3/46) * (2/45) * (1/44) ) = 13,983,816

Now is where I am going wrong, trying to calculate c) - matching 5 of the 6 winning numbers and with the number that is not matched also not matching the 'Bonus Ball' number.

1 / ( (6/49) * (5/48) * (4/47) * (3/46) * (2/45) * (42/44) ) = 332,948
I got the 42/44 because there are 44 remaining balls, one of them is the 6th winning number and one of them is the 'Bonus Ball' number, so only 42 of the 44 remaining numbers is a 'not matched number'.

However the advertised odds of matching 5 of the 6 winning numbers (and also not matching the bonus ball) is 55,492. That's quite a long way from the 332,948 that I calculated.

Can someone please explain to me where I am going wrong and how I should have calculated it?

Many thanks.

PS. I guess I should have written "13,983,816 to 1", etc., since for easy readability I chose not the express the probability as a value between 0 and 1.

2. The problem may be in the number of bonus balls there are. You did not mention how many there are to choose from. 1 is chosen from n number of bonus balls.

In the US there is a similar lottery called Megamillions.

There are 5 balls chosen from 56 and 1 bonus from 46.

Let's say in this mega game we want the prob. of choosing 4 out of 5 numbers and no mega ball. That is like yours only you have 5 out of 6.

We choose 4 of the 5 good balls and 1 from the remaining 51 loser balls. We are also choosing 1 of the 45 loser mega balls. I believe this may be your problem.

$\frac{C(5,4)C(51,1)C(45,1)}{C(56,5)C(46,1)}\approx \frac{1}{15313}$

Check to see how many bonus balls there are in your game. You are not matching it, so you want to choose C(n-1,1). Where n is the number of loser bonus balls.

3. Many thanks for your repy galactus.

Originally Posted by galactus
The problem may be in the number of bonus balls there are. You did not mention how many there are to choose from. 1 is chosen from n number of bonus balls.
Sorry if I wasn't clear. I have looked it up to be certain - the way the bonus ball is chosen is like this:

There are 49 balls numbered 1 to 49. 7 balls are drawn, one at a time, the first 6 are the 'winning balls', the 7th is the 'bonus ball'.

This is what I did to calculate the probability of matching 5 of the 6 winning balls correctly, while also not matching one of the winning numbers nor matching the bonus ball's number.

$\frac{1}{ \frac{6}{49} * \frac{5}{48} * \frac{4}{47} * \frac{3}{46} * \frac{2}{45} * \frac{42}{44}} = 332948$

That is wrong because I didn't divide by how many ways there are of matching 5 numbers out of 6. Of course there are 6 ways of matching 5 out of 6 numbers so all I needed to do was to divide by 6.

$\frac{332948}{6} = 55491.33$

It is actually advertised as being 55492, but I guess they are just rounding it up.

Originally Posted by galactus
$\frac{C(5,4)C(51,1)C(45,1)}{C(56,5)C(46,1)}\approx \frac{1}{15313}$
I see the logic of your notation above but would I be trying your patience to ask how the 'C' notation works with reference to your example.

Many thanks and regards,

matt

4. Originally Posted by mattstan
Sorry for asking another lottery question, I did a search and there seem to have been a lot, but none answer my question.

I'm trying to work out the probability of getting 5 out of 6 numbers correct in the British National Lottery, actually I know the probability - I'm trying to work out how to work it out (so to speak).

Here's how the lottery works:

1) 6 unique numbers between 1 and 49 are selected by each player on their ticket.
2) There are 49 balls with the integers 1 through to 49 on them.
3) 6 'Winning' balls are chosen during the lottery draw and a further 'Bonus Ball' is drawn at the end, making 7 balls drawn in total.

There are lots of winning tickets but the large cash prizes are for:

a) Matching all 6 winning numbers.
b) Matching 5 of the 6 winning numbers and matching the 'Bonus Ball' number.
c) Matching 5 of the 6 winning numbers.

a) is pretty easy to work out:

Either:

(49 * 48 * 47 * 46 * 45 * 44) / 720 = 13,983,816
Divided by 720 because there are 720 ways that the 6 balls can be drawn and the order in which the numbers are drawn does not matter.
6 * 5 * 4 * 3 * 2 = 720

Or you can work it out like this:

1 / ( (6/49) * (5/48) * (4/47) * (3/46) * (2/45) * (1/44) ) = 13,983,816

Now is where I am going wrong, trying to calculate c) - matching 5 of the 6 winning numbers and with the number that is not matched also not matching the 'Bonus Ball' number.

1 / ( (6/49) * (5/48) * (4/47) * (3/46) * (2/45) * (42/44) ) = 332,948
I got the 42/44 because there are 44 remaining balls, one of them is the 6th winning number and one of them is the 'Bonus Ball' number, so only 42 of the 44 remaining numbers is a 'not matched number'.

However the advertised odds of matching 5 of the 6 winning numbers (and also not matching the bonus ball) is 55,492. That's quite a long way from the 332,948 that I calculated.

Can someone please explain to me where I am going wrong and how I should have calculated it?

Many thanks.

PS. I guess I should have written "13,983,816 to 1", etc., since for easy readability I chose not the express the probability as a value between 0 and 1.
c) Suppose the bonus ball is drawn first, followed by the other 6 balls. The total number of ways this can be done is $49 \cdot \binom{48}{6}$. We assume all the ways are equally likely.

How many of these arrangements meet the requirement that the bonus ball does not match any of our 6 choices and 5 of our choices match numbers in the set of 6? There are 43 ways to select the bonus ball. Then there are $\binom{6}{5}$ ways to select 5 numbers out of our set of 6. The final number in the set of 6 cannot be the bonus ball, nor can it be any of our chosen 6, so there are 42 possibilities. So the total number of admissible arrangements is $43 \cdot \binom{6}{5} \cdot 42$.

So the probability of matching 5 numbers but not the bonus ball is
$p = \frac{43 \cdot \binom{6}{5} \cdot 42}{49 \cdot \binom{48}{6}} = 1.80208 \times 10^{-5}$, and $1/p = 55,491.3$, approximately.

5. That's just combinations. The number of ways of choosing 4 out of 5 and so forth.

6. Thanks a lot again galactus. I appreciate your help. Regards, matt.

7. Look into combinations. $C(n,k)=\frac{n!}{k!(n-k)!}$

I assume you know what n! means?. That is a factorial.

Permuatations (when order matters) is $P(n,k)=\frac{n!}{(n-k)!}$

In the lottery, order does not matter. Just as long as the numbers are matched. If order mattered, it would never get hit. What I mean is, suppose the winning numbers were 1,5,10,23,37,43. A permutation means they have to be in that order. A combination are those numbers but in any order.

You're welcome.

8. Originally Posted by galactus
Look into combinations. $C(n,k)=\frac{n!}{k!(n-k)!}$

I assume you know what n! means?. That is a factorial.

Permuatations (when order matters) is $P(n,k)=\frac{n!}{(n-k)!}$
That's what I needed, the formulas for how C(n,k) and P(n,k) can be worked out numerically. Using C(n,k)'s formula I got the correct result for your Megamillions example (I know hardly a major achievement but it's nice when it all works out because you now understand it).

Yesterday morning I also worked out the probability of getting 4 of the balls correct and not the bonus ball in the British National Lottery (my own original problem but 4 right and not 5).

Of course not knowing how to multiply out C(6,4) meant I had to manually work out how many ways you can have 4 correct out of 6 with order not mattering. Very tedious if you have to do it manually like this:

111100
111010
111001
110110
110101
110011
101110
101101
101011
100111
011110
011101
011011
010111
001111

15 different ways.

This is a lot easier:

C(6,4) = 6! / 4! * 2!
C(6,4) = 720 / (24 * 2) = 15

Many thanks indeed for helping me with this - I now understand it and, that's the all important thing. I really appreciate it, thanks so much.

PS. And yes I knew what a factorial is.