How a data scientist beat a bookmaker

How a data scientist beat a bookmaker Books written by Uri J. Nachimson

In this piece, we explore the power of modern technology and how artificial intelligence can beat a bookmaker over the long haul.
2022-10-25, by Uri J. Nachimson , Book author

#ML || #Big Data || #AI ||

Table of contents:



Of course, the soulless machine first needed the skill of human hands, but the final result amazed even seasoned bookmakers. A success story based on brains, not pure luck.

Betting unites

Betting on sports has long been part of human culture. We are all equally susceptible to gambling - whether you are a factory worker or an analyst company worker. Our hero Bradley Grantham, back in 2018, was finishing his degree in computer modelling and wondered a common question - can you beat a bookmaker?

First and foremost, Bradley was interested in doing the experience as a learning experience, but not without hope of making money - he ended up killing two birds with one stone. How? Let's find out together!

Project idea

Grantham was quite good at the intricacies of betting and had previously managed to create his own model of expected goals in football. The algorithms did work in some moments, but there was one glitch - it didn't take into account the line-ups of the playing teams. If a star missed a game, of course, the goal expectations were lowered, but it was impossible to take this into account in the programming language. In addition, the approach was not a breakthrough - our hero was about five years late with the idea.

The thirst to create something that had no analogues and was effective led to a new idea. Is it possible to create a neural network that will start solving football problems successfully? The project seemed feasible, but a starting point for the data set was needed. A non-trivial solution was found, the ratings of players in FIFA games by EA Sports. See details here: The legality of betting sites in India

Filling the database

Downloading statistics from the game was not the hardest task. It was necessary to find a solution to train the artificial intelligence in its language. For example, clubs' formations change every now and then.

Zeros are needed so that the computer can understand the gaps in the lines. After all, they do not only play a 4-4-2 or 5-2-3 formation, but also a fairly vertical one, such as 3-1-2-2-1-1. An 18-dimensional vector proved ideal, and for two teams per match it became a 36-dimensional vector. The neural network began to learn from the APL seasons played from 2013 to 2016, for example:

  • If there are six defenders, it's a 'bus' - you have to factor that into your assessments;
  • The first 18 cells are statistically slightly more successful - so the computer began to flag up the home arena factor.

Over the course of the tests, Bradley refined the algorithms and corrected errors. In the end, the AI was ready for betting for the 2017/18 APL season, and the results surprised even the developer. The return on each bet (ROI) was 11% - a top level even among professional bettors.

Testing the 2017/18 APL season

Grantham didn't use any clever strategy. He simply looked at the percentage deviation of the bookmaker's closing line from the neural network estimates and bet using Kelly's criterion. At the same time, our advanced trader did not take odds higher than 3.20 or the superiority of his system with an estimate of less than 2% for liquidity. The results of the simulation were as follows:

  • 50% winning bets;
  • Average odds - 2.37;
  • Average predicted probability - 2.01;
  • Average bet amount from bank - 7.23%;
  • Maximum bet amount per bank - 21.3%.

The rather high betting percentages from the bankroll indicate that the computer was finding quite fat boulders. Bradley subsequently retrained the 'iron' several times, but it came up with the same result each time - playing on the plus side.

Test of the 2018/19 APL season

The analyst was pleased with the successes and the purse strings, but decided not to stop there. For the next Premier League Championship, Grantham tried to predict the standings rather than specific matches! With this came a number of new difficulties:  

  • Squads can change significantly as the season progresses;
  • Player ratings are unstable;
  • The transfer windows can make a big difference.

In order to compensate for these statistical anomalies, we have had to run a simulation for 1,000,000 seasons! A huge job, which even on a powerful laptop took about eight minutes. In the end, the neural network did not make a mistake with Manchester City's success and accurately predicted Cardiff City's departure from Huddersfield. On the other hand, Fulham were overestimated and Liverpool performed better than expected.

Regardless, our hero was satisfied with the job done. Surely he was betting the waggle on the Citizens and also his model correlated with artificial interference. Without De Gea, Man United averaged three points less and Chelsea lost four points from the table without Azar.

We live in the twenty-first century and it has been a long time since we filled out betting cards at betting shops. The digital world is winning and only the dinosaurs of betting are capable of making money with their knowledge. Younger generations of bettors have long been hooked on auxiliary 'hardware'. There is nothing wrong with that - we are evolving, and even the most expensive scanner on the planet won't help a headless popan. An important piece of introspection will remain in betting forever.

Charlie Cory

Charlie Cory contributor to books-bestsellers.com
Site owner