Author Topic: Lucky Dip numbers in the Lottery?  (Read 4557 times)

Lucky Dip numbers in the Lottery?
« on: 18 August, 2010, 10:15:33 pm »
The other day I bought a lottery ticket, and picked two lines of lucky dip numbers.

05     17     21     36     39     45 
02    17    25    27    39    45

Hmm. Something tells me the lucky dip generator isn't a 'simple' random number generator. Maybe a transformation of data like the date and time?
<i>Marmite slave</i>

Re: Lucky Dip numbers in the Lottery?
« Reply #1 on: 19 August, 2010, 12:57:10 am »
According to http://en.wikipedia.org/wiki/National_Lottery_(United_Kingdom) the chances of getting a £10 win by matching 3 numbers is 1 in 56 ish.

For those numbers to be in the same places on the numerical list must reduce the chances a bit, but not a lot, but that maths is far beyond me.

I guess the chances are better than 1 in 100 that two random lottery combinations have 3 numbers the same.

So your ticket had a 1 in 100 chance of happening, so it really wasn't that rare. It's about twice as likely as getting 3 dice to roll a 6 on the same throw.

http://en.wikipedia.org/wiki/Sally_Clark shows that a lot of people don't understand statistics nearly as well as they think they do.
Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

Re: Lucky Dip numbers in the Lottery?
« Reply #2 on: 19 August, 2010, 09:32:37 am »
I'm not sure how to calculate it, but the odds of 3 matching  (supposedly random) numbers in consecutive positions must be fairly low.

Obviously the lottery bods have to keep the algorithm for the Lucky Dip secret, but I'm pretty sure it isn't just a random number generator, and must be using some unique data such as the exact date and time to generate a number.
<i>Marmite slave</i>

Re: Lucky Dip numbers in the Lottery?
« Reply #3 on: 19 August, 2010, 10:02:18 am »
I'm not sure how to calculate it, but the odds of 3 matching  (supposedly random) numbers in consecutive positions must be fairly low.

But not 0, so don't be surprised if it happens.

Trying to derive conclusions from a sample size of 2 (of ~14 million possible tickets) is utter madness.
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Lucky Dip numbers in the Lottery?
« Reply #4 on: 19 August, 2010, 10:11:43 am »
Obviously the lottery bods have to keep the algorithm for the Lucky Dip secret, but I'm pretty sure it isn't just a random number generator, and must be using some unique data such as the exact date and time to generate a number.

I'd be surprised if it was anything but a random number generator. If they've got any sense it'll have some form of hardware providing the entropy rather than a purely software PRNG, but even with a truly random system there has to be some level of interpretation as it has to have logic to exclude already selected numbers to avoid picking lines like: "02 02 05 12 14 14"

Seeding the PRNG with a clock counter is common, but that doesn't mean you'll get the similar numbers on the same day as the resolution of the clock ticks will be down to at least the second, if not microseconds.
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Lucky Dip numbers in the Lottery?
« Reply #5 on: 19 August, 2010, 12:07:06 pm »
I'm not sure how to calculate it, but the odds of 3 matching  (supposedly random) numbers in consecutive positions must be fairly low.
Yes, about 1 in 100.

That's far better odds than getting a puncture on a particular journey. So we don't go thinking that the puncture fairy is real, do we?
Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

clarion

  • Tyke
Re: Lucky Dip numbers in the Lottery?
« Reply #6 on: 19 August, 2010, 01:06:46 pm »
... a lot of people don't understand statics ...


I don't understand statics.  Or touring caravans... ;D


Good expl, though :thumbsup:
Getting there...

Re: Lucky Dip numbers in the Lottery?
« Reply #7 on: 19 August, 2010, 01:38:24 pm »
I'm not sure how to calculate it, but the odds of 3 matching  (supposedly random) numbers in consecutive positions must be fairly low.

The exact chances depend on the numbers in question, for example your actual tickets:-

05, 17, 21, 36, 39, 45
xx, 17, xx, xx, 39, 45

The first number could take any of 16 numbers (1-16) except 05, and the 3rd and 4th numbers any between 18-38 (except for 21 or 36).

Take these numbers for the first ticket:-

xx, 03, xx, xx, 08, 09

And you've only got a very limited number of possible matches for the 1st, 3rd and 4th numbers as they appear on the ticket in order.

Going back to: xx, 17, xx, xx, 39, 45

If we take n2=18 then n3 can be any of the 17 numbers between 19 and 38 inclusive except 21 and 36
If we take n2=19 then n3 can be any of the 16 numbers between 20 and 38 inclusive except 21 and 36.
If we take n2=20 then n3 can be any of the 15 numbers between 22 and 38 inclusive except 36.

(Spotted that the numbers probably very slightly out here but I can't be arsed to fix it. It's close enough...)

17+16+15...+3+2+1 = (17*18)/2 = 153

Multiplied by the 15 possible numbers for the first number means we have 15*153 = 2295 tickets that are of the form: xx, 17, xx, xx, 39, 45 (and don't include any of 05, 21 or 36)

So that's 2295 of the 49C6 (13,983,816) possible tickets.

So about a 1 in 6093 chance that you'll get a ticket with numbers matching those constraints for another ticket (if your original ticket was xx, 17, xx, xx, 39, 45 ).

For:-

01, 03, 04, 05, 08, 09
xx, 03, xx, xx, 08, 09

Then there's only one other ticket:

02, 03, 06, 07, 08, 09

As any other of that form would have to have one of the numbers 01, 04 or 05 and match a 4th (or 5th or 6th) number from the previous line.

Only 1 ticket means we're back to a 1 in 13983816 chance of that happening.
"Yes please" said Squirrel "biscuits are our favourite things."

andygates

  • Peroxide Viking
Re: Lucky Dip numbers in the Lottery?
« Reply #8 on: 19 August, 2010, 02:00:21 pm »
You're drilling too deep there, Greenbank.  The interesting phenomenon is just "three numbers matching", not those three (any three would be interesting), or those positions (which are only interesting because they're where the matches occur).
It takes blood and guts to be this cool but I'm still just a cliché.
OpenStreetMap UK & IRL Streetmap & Topo: ravenfamily.org/andyg/maps updates weekly.

Re: Lucky Dip numbers in the Lottery?
« Reply #9 on: 19 August, 2010, 02:04:43 pm »
The interesting phenomenon is just "three numbers matching", not those three (any three would be interesting), or those positions (which are only interesting because they're where the matches occur).

The rest is left as an exercise for the reader.
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Lucky Dip numbers in the Lottery?
« Reply #10 on: 19 August, 2010, 02:08:12 pm »
The numbers weren't matched in position either when generated. They get generated one by one and are reordered into consecutive order for the print out. So there are lots of ways of getting say

2 5 15 x x x

it could have generated

x 2 x x 15 5
15 x x 5 2
5 x 2 x x 15

etc

They just get ordered the same on the print out so long as no lower numbers or intervening numbers were generated.
I think you'll find it's a bit more complicated than that.

Re: Lucky Dip numbers in the Lottery?
« Reply #11 on: 19 August, 2010, 02:18:04 pm »
I couldn't follow your logic, greenbank.

erm, is this right:

total possible combinations = 49 C 6 = 13,841,287,201


Possible combinations where 3 numbers are chosen already = 46 C 3 = 97,336

So probability of second lucky dip having 3 matching numbers with first one =
97,336 / 13,841,287,201
<i>Marmite slave</i>

Re: Lucky Dip numbers in the Lottery?
« Reply #12 on: 19 August, 2010, 02:19:14 pm »
The interesting phenomenon is just "three numbers matching", not those three (any three would be interesting), or those positions (which are only interesting because they're where the matches occur).

The rest is left as an exercise for the reader.

Bored and wondered how long a program would take to check all combinations.

Answer: hardly any time (under 1/4 of a second).

$ ./mc 5 17 21 36 39 45
Finding tickets that match 5 17 21 36 39 45
checked=13983816 got=48949

So that's 1 in 285 tickets will match just 3 numbers from 5 17 21 36 39 45 in the same positions (i.e. 1 5 17 21 36 39 matches no numbers in the same positions).
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Lucky Dip numbers in the Lottery?
« Reply #13 on: 19 August, 2010, 02:21:12 pm »
I couldn't follow your logic, greenbank.

erm, is this right:

No, 49 C 6 = 13,983,816

xCy = x! / y!
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Lucky Dip numbers in the Lottery?
« Reply #14 on: 19 August, 2010, 02:37:04 pm »
Ah, right, I get it.

so the chances of my getting two draws with three matching numbers is 1/1000
<i>Marmite slave</i>

itsbruce

  • Lavender Bike Menace
Re: Lucky Dip numbers in the Lottery?
« Reply #15 on: 19 August, 2010, 02:41:50 pm »
The other day I bought a lottery ticket, and picked two lines of lucky dip numbers.

05     17     21     36     39     45 
02    17    25    27    39    45

Hmm. Something tells me the lucky dip generator isn't a 'simple' random number generator. Maybe a transformation of data like the date and time?

You do realise that

 01 02 03 04 05 06
 01 02 03 04 05 06

is no more or less likely than the two sequences you did get?  A sample of two sequences isn't enough to make any kind of judgement about the random sequence generator.
I saw the best minds of my generation destroyed by madness, starving hysterical naked: Allen Ginsberg
The best minds of my generation are thinking about how to make people click ads: Jeff Hammerbacher

Re: Lucky Dip numbers in the Lottery?
« Reply #16 on: 19 August, 2010, 02:45:18 pm »
Ah, right, I get it.

so the chances of my getting two draws with three matching numbers is 1/1000

Your chances of getting two random draws with exactly 3 numbers that match (irrespective of position) is 1 in 56, as it will be the same odds for a single ticket matching exactly 3 numbers in the lottery proper.

You were asking about matching in the same positions, which is different, and also dependent on the numbers in question.

With the numbers you'd had for your first line (5 17 21 36 39 45) it was one in 285.

The chances for "1 2 3 4 5 6" matching exactly 3 numbers in the same positions is:-

$ ./mc 1 2 3 4 5 6
Finding tickets that match 1 2 3 4 5 6
checked=13983816 got=14190

So, 1 in 985 for those numbers.
"Yes please" said Squirrel "biscuits are our favourite things."

red marley

Re: Lucky Dip numbers in the Lottery?
« Reply #17 on: 19 August, 2010, 04:03:46 pm »
Hmm. Something tells me the lucky dip generator isn't a 'simple' random number generator. Maybe a transformation of data like the date and time?

The chances of getting some kind of distribution that might prompt the comment above are more common than the ~1:100 calculated upthread. We are naturally inclined to look for patterns even when none exists, so if the two sequences were alternating match/non-match, close to a memorable date or if they all shared the same last digit, or if they summed to the same value etc., they might have aroused suspicions. The "science" of numerology, and indeed the lottery itself is dependent on our failure to grasp the nature of randomness.

This Saturday I was behind someone in a newsagent who asked for a Lucky Dip. He then asked "Is there a 25 in it?". On being told yes, he asked for another number instead.  I struggle to work out what was going though his mind. I know "it's only a bit of fun" etc. etc., but do people really think they are so central to the workings of the universe that their own personal lucky numbers will have even the tiniest bearing on 49 balls rolling around in a TV studio somewhere?

andygates

  • Peroxide Viking
Re: Lucky Dip numbers in the Lottery?
« Reply #18 on: 19 August, 2010, 04:52:12 pm »
Luck is luck.  I've had 17 ever since my Incredible Psychic Seventeen, when the drawmaster was drawing balls and I, joking, scowled at Arthur and said "seventeen!" and lo, seventeen fell out.
It takes blood and guts to be this cool but I'm still just a cliché.
OpenStreetMap UK & IRL Streetmap & Topo: ravenfamily.org/andyg/maps updates weekly.