If you have ever come into contact with information about machine learning, you have probably already asked if AI can win a lottery by predicting winning numbers.
In our blog, we have already talked many times about AI being extremely good at predicting things thanks to the achievements of data science. Provided you give your system enough data, it can draw a business development forecast, recommend you useful content and connections, anticipate and interpret human behavior in a various social setting like shopping, or even help you bet on the right team or outcome in eSports competition.
Having this knowledge, a very logical question comes to mind: if all you need for a good prediction is a lot of data, why don’t we use machine learning to train artificial intelligence in guessing the lottery numbers? There are myriads of data sets from all sorts of drawings held around the world. Why lotteries are still a thing even?
To answer these questions, SOLVVE experts in machine learning will explain to you step-by-step if AI can help win a lottery and be useful when dealing with predictions of the winning numbers.
Step 1. How random are the winning numbers?
The first step is to figure out how random are the winning numbers. To assess their randomness machine learning experts run primarily statistical analysis. The goal is to see if the numbers meet the criteria of uniform distribution, meaning that each and every number has the same odds to be drawn.
There are several criteria to measure this uniform randomness: extreme points criteria, Foster-Stuart criteria, and Spearman’s rank correlation coefficient. They help to understand if there are any features of the time series pointing out to patterns in what numbers win more often.
Step 2. Are winning numbers equally distributed?
The second step in trying to understand if AI can win a lottery is to identify distribution. This is yet another way of looking at what numbers tend to win more often and what numbers are less common in the winning sequences. There are three ways to identify distribution: by histogram, by skew and kurtosis, and by probability grid. All of them help to visualize the data and locate anomalies. Let us take a look at some samples.
Here is a histogram graph of a sample distribution. If the distribution is uniform, there will be no drastic spikes or lows. If there are significant fluctuations, the distribution is not uniform.
The example above shows that numbers are randomly drawn in each winning set.
Now let us take a look at the probability plot. They help to assess if the real distribution (shown as blue dots) meets the assumed distribution (shown as a red line). In the previous step, we have assumed that numbers should fall out randomly. If that is true, the blue dots will be very close to or overlapping with the red line.
As you can see from the example above, our suggestion about the uniform distribution received one more confirmation.
Step 3. Trying to predict the winning numbers
After performing the above-mentioned manipulations, we try to see if there are any number pairs or sequences showing up in combinations more often. We build heat maps for the cross-presence matrix. Depending on the suggested numbers we try to model the next combination of numbers to show up, what is basically the goal of this whole exercise – to see if we can predict the winning numbers.
For the uniform distributions, your predictions will probably be somewhere around the average. If your number span is from 0 to 9, your suggested numbers will be 4, 5, and 6. If the distribution is not uniform, as you may already guess, you will get suggestions that might gravitate towards the extremes of the span, like 2 or 9, or any other number whatsoever.
So, can AI win a lottery?
The procedure that we have just described has probably confused a lot of readers a great deal. To make it simple, here is a short answer: no, AI cannot help you win a lottery. What it can do is show you how fair the lottery is.
Fairness of a lottery presumes that any number has the same opportunity to become a winning one. When numbers are not equally distributed it signals that numbers are not random. Subsequently, it means that the process is consciously or by some unknown pitfall is rigged to draw certain numbers more often than the others. Thus, the lottery is not fair.
As you have seen, machine learning is good not only in predicting something but also in proving that sometimes an ability to predict somethings signals problems in the system. SOLVVE experts can run ML-powered assessments for your business as well. If you have any questions or ideas about using ML and AI to assess the fairness of a drawing, do not hesitate to contact us. Let us make it happen!