Using Data Analytics to Create a High-Probability Sports Betting Dashboard

Matthew Courtney
6 min readJul 28, 2023

--

Sports betting dashboard made by Matthew Courtney

Introduction

You know how people often view sports betting as more of an intuition-based game rather than a scientific process? Well, with the rise of big data and advanced analytics, we are able to bring in a more methodical approach. I took this idea and ran with it, leveraging my data analysis skills to create a savvy sports betting dashboard. It does not just randomly choose bets. Instead, it meticulously analyzes betting odd lines to find the bet with the highest probability of winning.

In this post, I am excited to share with you this unique project. We will dive into how I took the traditional world of sports betting, usually driven by gut feelings, and transformed it into a data-driven machine. It has been quite a journey, and I believe you will find the process intriguing. Let’s get started!

My Thought Process

In the initial stages of this project, I contemplated incorporating various data points such as individual player performance, match-ups, home versus away statistics, and other factors influencing the player’s daily performance variations. The aim was to synthesize all this information to predict future outcomes. However, upon reflection, I realized this could prove somewhat counterproductive.

Major sports books invest millions of dollars annually in cutting-edge analytics. Attempting to emulate their exhaustive analysis with a smaller scale project would be akin to reinventing the wheel, and likely less effective. That is when a novel idea struck me: why not leverage the considerable analytical work already done by these sports books?

Instead of duplicating their efforts, I decided to focus on comparing the data from various sports books. By identifying discrepancies and inconsistencies across their predictions, I could potentially uncover a unique edge. This approach involves capitalizing on the divergences in their analyses to find the highest probability bets. By standing on the shoulders of these sports betting giants, we can discern valuable insights that may have been overlooked or discounted in their projections.

The Data

For this project, I utilized Python’s robust capabilities to web scrape data from leading sports books. Specifically, I crafted scripts to systematically extract data from PrizePicks, DraftKings, and Pinnacle. These scripts were designed to run at five-minute intervals, ensuring the collection of the most current and up-to-date odds lines each time. This frequent data gathering provided a continuously refreshed perspective on the evolving betting landscape, critical for the accuracy and relevance of my analysis.

Data Preprocessing

Cleaning and preprocessing the data were my next steps. This included dealing with missing values, correcting data inconsistencies, and converting data into formats suitable for analysis.

Exploratory Data Analysis

With the data prepared, I embarked on an exploratory data analysis (EDA) journey to uncover underlying patterns and trends. This comprehensive examination required extensive back-testing over several weeks of historical data. I diligently cross-referenced player performances against the sports books’ predictions to evaluate their accuracy. The process entailed an in-depth investigation of how often the sports books’ predictions were on the mark, which provided valuable insights into their predictive reliability and established a benchmark for my project.

The Math

In this project, we’re using PrizePicks as our sports book. Unlike traditional platforms, PrizePicks uses a fixed payout structure for all bets. After evaluating this structure, we found the ‘5 pick flex’ offers the best long-term return on investment. However, to stay profitable, our individual bets need to hit a 54% success rate. This is the critical threshold when placing bets.

PrizePicks Payouts

With a clear baseline established, we’ll strategically place bets only when they exhibit greater than 54% fair odds as per the dashboard’s analysis. But before we dive into that, let’s dissect what we mean by ‘fair odds’ and how we calculate them.

‘Fair odds’ are the hypothetical odds we’d see if sports books didn’t build in their profit margins. They reflect the actual probabilities of outcomes, without the bookmaker’s added cut. Understanding ‘fair odds’ is vital for our data-driven betting approach and overall betting analytics.

example using American odds:

  • Team A: -110
  • Team B: -110

Converting these to probabilities gives:

  • Team A: 110 / (110 + 100) = 52.38%
  • Team B: 110 / (110 + 100) = 52.38%

Adding these together gives a total probability of 104.76%. The extra 4.76% is the bookmaker’s margin. That would be known as the ‘vig’.

To find the ‘fair odds’, we need to normalize these probabilities so they add up to 100%. We do this by dividing each probability by the total market probability (104.76% in this case), like so:

  • Fair odds for Team A: 52.38% / 104.76% = 50%
  • Fair odds for Team B: 52.38% / 104.76% = 50%

So, while the bookmaker’s odds suggest each team has a slightly better than 50% chance of winning (which is impossible), the ‘fair odds’ recognize that each team has an equal chance of winning.

Creating the Dashboard

I wanted this dashboard to show the most profitable betting opportunities in a very easy-to-understand format. To achieve this, I designed a workflow orchestrated by Python scripts:

  1. The first script scrapes data from various sports books, capturing the latest odds every five minutes to ensure the data remains current and relevant.
  2. Upon completion of the scraping process, a data cleaning script is triggered, refining the raw data into a more analyzable format.
  3. The cleansed data is then passed to another script, which pushes the data to a Google Sheets document. The data is automatically sorted and filtered, presenting bets with the highest odds first.

This process occurs every five minutes, ensuring users have access to the most favorable odds at any given time.

The dashboard displays a wealth of information including the player’s name, our recommended bet (over or under), the specific stat we’re betting on, PrizePicks’ lines, and corresponding lines from other sports books. It cross-references these data points, helping us identify inconsistencies and opportunities. Additionally, it presents Pinnacle odds, DraftKings odds, the average odds, and the percentage odds to hit, offering a comprehensive betting analytics tool for users.

Finished Dashboard

Results

My journey with this dashboard began in February 2023. As a new user on PrizePicks, I took advantage of their welcome offer by depositing $100, which they generously matched, giving me a starting bankroll of $200. Astonishingly, within just two months of utilizing this dashboard, I secured 52 successful entries, resulting in a total win amount of $4,591.20. This impressive return nearly marked a 50-fold increase on my initial investment.

Encouraged by this success, I decided to share the benefits of this data-driven approach with those close to me. I opened access to my Google Sheet to a select group of friends and family who expressed an interest in sports betting. It was through this shared experience that they witnessed the remarkable potential and power of data analytics in sports betting first-hand.

PrizePicks Account

Conclusion

In conclusion, this project underscores the power and potential of data analytics. It also highlights how the right skills and tools can turn something traditionally based on intuition into a science-based endeavor. My sports betting dashboard serves as a real-world example of leveraging data analytics to provide an edge in an industry historically driven by chance and luck.

Whether you’re a sports enthusiast, data scientist, or potential employer, I hope this project provides an insightful glimpse into my abilities as a data analyst. Using data science to find solutions to real-world problems is what I love, and I’m always ready for the next challenge.

As we look forward to the future, the possibilities of data analytics in various sectors, including sports betting, are limitless. I’m excited to continue utilizing my skills to push the boundaries and make a meaningful impact.

If you want to see all my code check it out HERE as well as my LinkedIn

--

--