Saturday, August 14, 2010

Patterns in the Lottery

Back in 2009, Derren Brown once again shocked the world with his witch-craft, as he predicted the lottery, live on TV.

Later that week he explained how he did it - wisdom of the crowds. Which is complete and utter bullshit. But it was a magic trick, so what do you expect? If anything, the whole incident was probably an ingenious marketing ploy for "The Events" series of which it was a part. But I digress.

The idea of Wisdom of the Crowd is that if you get a group of people to make a guess at a quantity (say, the number of coffee beans in a jar), then take the average, the average will be surprisingly accurate. It's just an application of the law of large numbers.

But this doesn't work in the case of the lottery, because the lottery is completely random, and taking the average of all the previous numbers would give approximately the same six numbers for every week. Which doesn't happen.

But are there any patterns in lottery numbers?

The answer is, in fact, yes!


NB/ The explanation on this one is going to be sparse because I did all this a while back and didn't have the sense to keep clear notes on what exactly I was doing.


Statistical Analysis

Thanks to the internet, I managed to get hold of all the winning numbers (for the standard UK lottery), which at the time, totaled 1432 sets of numbers.

Plotting the occurrences of each number, you get something like this:

So you've got some obvious peaks and troughs there - the biggest peak being 38. So you'd think your best chance would be picking the six highest peaks, or lowest troughs if you subscribe to the "they're due to come up" theory.

But, obviously, by the law of large numbers, that line should eventually flatten out.

[Incidentally, the one time I did play the lottery after doing all this, I pick 38 as one of the numbers and it came up. Just saying.]

I then put the numbers in numerical order and got the following sets:

Mean - 7, 15, 22, 29, 36, 43
Mode - 1, 9, 23, 31, 38, 49
Median - 6, 14, 22, 29, 37, 45

And if you can draw anything from at, it's that the 'average' set of numbers tend to be relatively evenly spaced. I did some measures of spread, standard deviation, etc., and the results seemed to agree. But that wasn't that interesting.

But what is slightly interesting is what you get when you plot the numbers against what position they appear in, in the ordered sequence:

[The second one is odds of number, x, being in the i-th position in the ordered sequence.]

So the pattern there isn't obvious, but the is a definite pattern.

Based on the first plot, I tried fitting the numbers to Gaussian curves, and got something like this:

Which all together looks like this

Which is a decent fit. But the truth was, there was a much simpler, more fundamental approach to fitting the curves.


Combinatorics

The way you work out your odds of winning the lottery is relatively straight-forward - explained here. Have a quick read of that. Can't be bothered to explain myself.

Now, again, I can't remember how I derived this, but the probability of the i-th ball being x (when the balls are put in numerical order) is given by:

And using that, we see what the plots above should actually look like:

Which is the exact same shape, only smoother (as you'd expect).


Problem

So say you want to know the probability of a certain (ordered) sequence, you just take the product,

But that's where a problem arises.

The first (smallest) number is most likely to be 1, the last (largest) is most likely to be 49, etc.

Which does make sense. Say the smallest number is 1, then the other five numbers can be anything (except 1). If, on the other hand, the smallest number is 44, then the other numbers can only be {45, 46, 47, 48, 49}. So obviously, a sequence starting with 1 is massively more likely than a sequence starting with 44.

But that then seems to imply that there is a most likely sequence {1, 11, 20, 30, 39, 49}. And running the numbers, you find that that sequence is much more likely than {1, 2, 3, 4, 5, 6}.

It's been a favourite of the mathematicians that all sequences of lottery numbers are equally likely (supported by calculation) - that {1, 2, 3, 4, 5, 6} is just as likely as, say,  {4, 12, 23, 33, 39, 48}.

So here's my challenge to you - spot the hole in my ordered probability calculation.

Or is there a hole? What is actually going on here?


Oatzy.

6 comments:

Katy Saccomanno said...

I don't understand most of this math because I am not a mathematician, but from what I do understand of it (you've explained it beautifully) I am completely fascinated by this subject and it's larger implications and applications. I'd really like to understand more about it. Seeing "patterns" in numbers has plagued me for years and everyone has told me I'm crazy to think such a thing because everything is random and I'm imagining it. It almost drove me to the edge of insanity wondering how these trends existed, was it a message from a mystical source, what did it mean and why was I seeing this? Despite all the naysayers, I persisted in my theory that there were identifiable trends in seemingly random numbers. I couldn't shake it and just disregard what I observed, but I wrote it off as my own personal delusion or something unfathomable or even mystical as an explanation. Clearly, as your math shows, there is nothing mystical about it, which is relief. If your theories are correct, than what else might they be applied to? Are we really just mad? Anyway, I have a whole lot more to discuss and I'd really like to talk to you about this.

If you ever get this, email me at katyhortonct@gmail.com.

Christopher Wong said...

check out http://www.lotteryaxiom.com

Unknown said...

I've derived the exact same curves and others that fit polynomial plots from lotto number analysis. I then took everything I learnt and made an algorithm that surprisingly is on average correct 20% of the time for each number. I think that's pretty good given that you have essentially a one in x (x being the number of remaining balls) chance of picking the number.
Anyhow, even being able to improve the odds as I had the big difficulty is being able to match the right numbers need at the right time, I have modeled this many times for many lottery game and can get 3 numbers with an occasional 4th, a random 5 from 6 and have also managed 6/6 on a number of games.
To do this however becomes a game of stacking numbers in you favor, by this I mean playing more than 6 numbers and often up to 18 number's at a time. Given the cost of playing that many numbers over time vs the reward you never come out ahead.
So lately I've taken a different approach and added in another analysis layer that gives another pattern approach to the playing.
I have again been tremendously surprised in my initial models. So far if I had used this most del I could win in front of the play costs. But sadly to do so you need an initial investment of up to 250k, so very frustrating as I know from modeling on different games that it works.
Not magic involved, just a different way to look at the things that did not happen vs the thing that did in the results of games. You also need to account for time, certain events do repeat but not according to a simple time scale measure.
A big clue here is that there are time cycles within each numbers results. Ask yourself how long ago did say number 8 come up? Plot a time scale for it. Random, or is it? Yes it's random, but then start thinking about the law of averages, count the weeks between the hits and plot them, you will see a very interesting pattern. Then when you plot a curve of best fit you will find that a polynomial is a good fit.
Still it is not an exact fit but this is what you want, it's the deviation from the norm that you are looking for.
In my case I choose the time between hits that is under or below average. In my way of thinking it needs to catch up.
I then compared all these values across all the numbers and derived an algorithm to represent what I refer to as the Number Cycle Intensity.
And guess what?
You've spent all this time reading this only to find out it does not work.
Chasing lotto number outcomes has been a journey down Alice's rabbit hole.
I can if I have sufficient initial investment win using some of what I described above in conjunction with a lot of other refining.
But there is NO one approach, no one system, no one methods that will improve your results. Some may improve your odds very slightly, some may give the allusion of chance, some may outright lie to you.
Historical numbers played will not give you the numbers for future plays, I have run every model on that as well. No 2 number outcomes or their patterns match. Your best approach here is to never play number combinations that match prior number patterns. Avoidance will improve your odds here.
So, to all my fellow lotto tragics, don't got throwing hard earned money at books and methods. Use a consistent approach and avoid duplication of past events. This above anything will improve your chances to win.

Unknown said...

you can get the latest KBC Winner list 2017, KBC Winner List 2017 list, Kaun Banega Crorepati head office number, here. Contact to get WhatsApp helpline head office number of KBC

BrendaPalmeri said...

Awesome article, I am a big fan of this website, keep on posting that great content, and I'll be a regular visitor for a long time...looking for the next one....keep it up! song thủ lô khung 2 ngày mới nhất 188loto.com

calvinewers said...

A debt of gratitude is in order for your data, it was truly exceptionally helpful.It's truly a nice and useful piece of information. I'm satisfied that you just shared this useful information with us.Please stay us up to date like this. Thank you for sharing.When you are setting up an outline, dàn đề nuôi trong tuần dễ trúng cực kỳ for playing and the certain drawings you will engage in.