2023-02-08

Betting with Statistics

In this Presentation I will show you how I use data that I have personally collected to make bets on college basketball. Specifically bets on the moneyline as this lends itself best to visual analysis. The data I have collected is from a free college basketball model you can find at oddsshark.com. Being free this model is very inaccurate and will not win money on its own, but after careful analysis it can be turned into a profitable strategy, one that this year has netted me 18.85 units this college basketball season.

##   Team Predicted Margin Actual Margin Result Away Odds Home Odds
## 1 HOME              6.0             1      1       700     -1100
## 2 HOME             14.9            31      1      1600    -10000
## 3 AWAY              8.8            -2      0      -120       100
## 4 AWAY             15.4           -28      0       155      -185
## 5 AWAY              3.3            -3      0      1442     -3092
## 6 HOME              6.0            -7      0      -310       255

Moneyline Betting Basics

The most important thing to understand when trying to profit long term in sports betting is understanding the break even percentage, that is how often your bet has to hit in order to profit given the odds. Unlike with spread and total bets who tend to be largely static with odds hovering around -110 with a break even percentage of 52.4% moneyline bets have a much wider range. This graph illustrates this range and the required Break Even % necessary.

Formula If negative (Favorite) -> \(BE = odds/(odds-100)\) —— If Positive (Underdog) -> \(BE = 1 - (odds/(odds+100))\) ——- Odds do not exist between -100 and 99

Actual v. Predicted

To illustrate the need to optimize this model I plotted the predicted result, or margin of victory to the actual result, against the perfect model that is 100% accurate. As you can see the perfect model is a perfect 1 to 1 ratio with the fit line a perfect y = x The model I use, while at least pointed in the right direction is not close enough to profit on its own.

\(A = -0.4681 + 0.7601p\)

Calculating Win %

Before I place any bet I make sure that I have a mathematical edge over the book. That edge is calculated by subtracting the break even percentage from the win percentage. The win percentage being the chance based on the model you are using that the side it chooses will win the bet. For example if the odds of ASU beating Arizona are +100 with a break even percentage of 50%, then in order to place a bet on ASU the model must predict a win % higher than 50 percent, giving you an edge over the odds makers. If ASU were projected to win 51% of the time, then you would have a 1% edge.

To calculate the win percentage based on the Odds Shark model I graph the results, which is a binary variable with a 1 being a win and a 0 a loss, with the predicted margin of victory and find the regression formula between them.

Win % Chart

## 
## Call:
## lm(formula = Result ~ `Predicted Margin`, data = pvr)
## 
## Coefficients:
##        (Intercept)  `Predicted Margin`  
##            0.50774             0.01648

\(WP = 0.50774 + 0.01648p\)

Lets Gamble (theoretically)

We now have all the information to make a bet at least we have all we need to test our bets. This is only the first layer of optimization, there is one more layer that requires testing the purposed bets too see which threshold of edge yields the best results. As of today that threshold is between 0.2883% and 0.3222% for anyone who is curious. But for now lets make a test bet.

##   Away.Team..A. P.Score..A. Home.Team..H. P.Score..H. Moneyline..A.
## 1         RIDER        66.2          PROV        72.2           700
##   Mneyline..H.
## 1        -1100

In this game Rider is taking on Providence, they are projected to score 66.2 and 72.2 points respectively. Rider is a +700 underdog with Providence being a -1100 favorite.

Lets Gamble (Continued)

Lets use our formula to see who to bet on.

pm = 72.2 - 66.2 #Predicted margin of victory for providence
wp_p = 0.50774 + 0.01648*pm # projected win percentage for Providence
wp_r = 1 - wp_p # projected win percentage for Rider
be_p = -1100/(-1100-100) # Break even percentage for Providence
be_r = 1 - (700/(700+100))# Break even percentage for Rider
edge_p = wp_p - be_p # Edge for Providence over the odds
edge_r = wp_r - be_r # Edge for Providence
sprintf("Providence has and edge of %.4f%%", edge_p)
## [1] "Providence has and edge of -0.3100%"
sprintf("Rider has and edge of %.4f%%", edge_r)
## [1] "Rider has and edge of 0.2684%"
print("Bet on Rider")
## [1] "Bet on Rider"