Struggling for Competence

Chance of winning any prize on the national lottery

A couple of week ago I worked out the chance of winning the UK national lottery. But what's the chance of winning the other prizes?

To recap. In the UK national lottery you pick 6 numbers. A special machine chooses 6 numbers, from a pot containing numbers 1 to 49. If your 6 numbers get chosen you win. Now in this type of probability problem all of the possibilities are known in advance so:

$$ Probability =\frac{Number\;of\;ways\;thing\;can\;happen}{Total\;number\;of\;possibilities}$$

For winning the lottery, the top line on the right hand side of the equation is "number of ways that your 6 numbers can be drawn", which equals 1, and the bottom line is "number of ways that any 6 numbers can be drawn from 49". To work this out the the formula you need is the number of combinations of choosing r things from n, C(n,r) = n!/r!(n-r)!. In this case we have C(49, 6) = 13,983,816 and therefore the chance of winning the lottery is roughly 1 in 14 million.

You also get a smaller prize if say, 5 out of your 6 numbers are chosen. In the probability equation, the bottom line of the equation will be the same as before, C(49,6). For the top line of the equation we need "number of ways of getting 5 of your numbers, when 6 numbers are chosen from 49". If you think about it a bit:

$$ \begin{aligned} & \begin{pmatrix} Ways\;of\;getting\;5\;of\;your\;numbers \\ when\;6\;numbers\;are\;chosen\;from\;49 \end{pmatrix} \\ &= \begin{pmatrix} Ways\;of\;choosing \\ 5\;of\;your\;6\;numbers \end{pmatrix} \times \begin{pmatrix} Ways\;of\;choosing\;1\;of \\ the\;remaining\;43\;numbers \end{pmatrix} \\ &= \, ^6C_5 \times ^{43}\!C_1 \end{aligned} $$

Now, C(6,5)xC(43,1)=258, so the probability of getting 5 numbers right is 258/13983816, which is roughly 1 in 55,000. It's easy to extend the formula to work out the chance of getting 6, 5, 4, 3, 2, 1 or 0 of your numbers:

Number CorrectNumber of WaysProbability

Now all the "number of ways" have been worked out you can do a consistency check. The number of ways of getting 0,1,2,3,4,5 or 6 numbers correct, should be equal to the number of ways of choosing any 6 balls from 49. And it is: 6096454 + 5775588 + 1851150 + 246820 + 13545 + 258 + 1 = 13983816. This gives you some confidence that I've got the formula correct, but the other way is to check with some other folks on the internet.