This report uses the 2021-2022 season (excluding playoffs) for comparing bet results vs. the markets. The win/loss models and the xG models are tuned separately as minor parameter changes will push the model toward better performance on different metrics.
Win/Loss Model performance:
## Log Loss: 0.65311
## Accuracy: 61.99%
## AUC: 0.6613
This model was trained by minimizing Log Loss divided by accuracy. Thus, improving (lowering) log loss and increasing accuracy was the best pathway for this model
NOTE Previous editions of this had a minor issue in the model code, incorrectly normalizing the prediction of tied games.
Not using market lines with vigs as percent win/loss (instead adding 0.02 to the database odds). Calculating American odds from the percents given, with rounding (toward zero) any decimal -> so if calculated american odds were +225.4, then using +225, and if -142.9 then using -142.
Presuming we place a bet if our predictions for the winner differ by 5%, the bet results from the whole season are as follows:
HomeBets | 99.00 |
AwayBets | 212.00 |
HomeBetResults | -762.00 |
AwayBetResults | 2771.00 |
HomeUnits | -7.70 |
AwayUnits | 13.07 |
TotalBets | 311.00 |
TotalResults | 2009.00 |
TotalUnits | 6.46 |
The results of betting broken down by each team we would have bet on:
BetTeam | Number_of_Bets | Total_Bet_Result |
---|---|---|
Anaheim Ducks | 7 | -456 |
Arizona Coyotes | 61 | 73 |
Boston Bruins | 14 | -38 |
Buffalo Sabres | 14 | 678 |
Carolina Hurricanes | 7 | 285 |
Chicago Blackhawks | 1 | -100 |
Colorado Avalanche | 1 | -100 |
Columbus Blue Jackets | 16 | 147 |
Dallas Stars | 8 | 180 |
Detroit Red Wings | 1 | -100 |
Edmonton Oilers | 6 | 346 |
Los Angeles Kings | 4 | 224 |
Minnesota Wild | 1 | 124 |
Montreal Canadiens | 23 | 631 |
Nashville Predators | 11 | -242 |
New Jersey Devils | 15 | 507 |
New York Islanders | 9 | -424 |
New York Rangers | 1 | 116 |
Ottawa Senators | 34 | 582 |
Philadelphia Flyers | 8 | -104 |
Pittsburgh Penguins | 12 | -158 |
San Jose Sharks | 5 | -120 |
Seattle Kraken | 14 | -894 |
St. Louis Blues | 7 | -92 |
Tampa Bay Lightning | 9 | 154 |
Vancouver Canucks | 4 | 419 |
Vegas Golden Knights | 10 | 209 |
Washington Capitals | 5 | -46 |
Winnipeg Jets | 3 | 208 |
The results of betting broken down by whether we bet on favourites or underdogs:
Check if we would make more money betting with or against the favourite (based on + 100 or < -100 we bet with favourite).
FavBet | Number_of_Bets | Total_Bet_Result |
---|---|---|
Bet Against Favourite | 282 | 2072 |
Bet Favourite | 29 | -63 |
Check if there’s a bias in win/loss by confidence level. This same info is shown in graphical form below.
BetDiffNom | Number_of_Bets | Total_Bet_Result |
---|---|---|
0.05 | 39 | -235 |
0.06 | 73 | 795 |
0.07 | 63 | -525 |
0.08 | 42 | 2216 |
0.09 | 35 | 834 |
0.10 | 21 | -1213 |
0.11 | 15 | -220 |
0.12 | 16 | 313 |
0.13 | 3 | -300 |
0.14 | 1 | -100 |
0.15 | 2 | 303 |
0.17 | 1 | 141 |
Lets take a look at a few of those biggest disagreements (model vs market):
GameID | HomeTeam | AwayTeam | HomePred | AwayPred | HomeOdds | AwayOdds | BetTeam | BetDiff |
---|---|---|---|---|---|---|---|---|
2021020270 | Arizona Coyotes | Detroit Red Wings | 0.5876 | 0.4124 | 0.4137 | 0.6263 | Arizona Coyotes | 0.1739 |
2021020667 | Detroit Red Wings | Buffalo Sabres | 0.4890 | 0.5110 | 0.6801 | 0.3599 | Buffalo Sabres | 0.1511 |
2021021287 | Dallas Stars | Arizona Coyotes | 0.6550 | 0.3450 | 0.8413 | 0.1987 | Arizona Coyotes | 0.1463 |
2021020814 | Arizona Coyotes | Los Angeles Kings | 0.4502 | 0.5498 | 0.3060 | 0.7340 | Arizona Coyotes | 0.1442 |
2021020999 | San Jose Sharks | Arizona Coyotes | 0.5375 | 0.4625 | 0.7095 | 0.3305 | Arizona Coyotes | 0.1320 |
2021021230 | Arizona Coyotes | Chicago Blackhawks | 0.5261 | 0.4739 | 0.3956 | 0.6444 | Arizona Coyotes | 0.1305 |
2021020568 | Florida Panthers | Montreal Canadiens | 0.6487 | 0.3513 | 0.8157 | 0.2243 | Montreal Canadiens | 0.1270 |
2021020908 | St. Louis Blues | Ottawa Senators | 0.6239 | 0.3761 | 0.7858 | 0.2542 | Ottawa Senators | 0.1219 |
2021020844 | Arizona Coyotes | Winnipeg Jets | 0.4558 | 0.5442 | 0.3350 | 0.7050 | Arizona Coyotes | 0.1208 |
2021020137 | Philadelphia Flyers | Arizona Coyotes | 0.5699 | 0.4301 | 0.7302 | 0.3098 | Arizona Coyotes | 0.1204 |
Plot a few things!
Total season bet results:
Bet Results by Team. The total bet results by team are listed above as well.
Check if there’s a bias in win/loss by confidence level. This same info is shown in tabular form above.
Using the model outputs from last year, run through the same code, we get the following results:
## Log Loss: 0.65173
## Accuracy: 62.96%
## AUC: 0.6627
HomeBets | 484.00 |
AwayBets | 424.00 |
HomeBetResults | -233.00 |
AwayBetResults | 1340.00 |
HomeUnits | -0.48 |
AwayUnits | 3.16 |
TotalBets | 696.00 |
TotalResults | 1107.00 |
TotalUnits | 1.22 |
Total season bet results:
This doesn’t mean as much because we’re looking for totals, but here’s the model performance for win/loss. Naturally, a xG model would be expected to have reasonable W/L performance as a byproduct of being good at predicting goal performance.
## Log Loss: 0.6576
## Accuracy: 61.08%
## AUC: 0.6478
In addition, the model performance for total xG vs. G (this is the important part):
## Test R2: 0.0139
## Test RMSE: 2.33
We trained the model using RMSE as the optimized metric.
Setting up bet results of over/under bets placed with a difference in 0.5 xG:
OverBets | 153.00 |
UnderBets | 31.00 |
OverBetResults | -1124.00 |
UnderBetResults | -122.00 |
OverUnits | -7.35 |
UnderUnits | -3.94 |
TotalBets | 184.00 |
TotalResults | -1246.00 |
TotalUnits | -6.77 |
This feels like it could be improved - very good performance to betting overs, but poor performance with unders. The betdiff of 0.5 xG was just a random number.
We’ll tune the over/under cutoffs by using the training data (2017-2018 to 2020-2021), and then use that to determine what we would have expected to get from 2021-2022
Each row in this below table show what the under bets and over bets would result in for a given betdiff value.
diffbet | underUnits | underBets | underBank | overUnits | overBets | overBank |
---|---|---|---|---|---|---|
0.01 | 6.6443228 | 1462 | 9714 | 2.3723890 | 3064 | 7269 |
0.02 | 7.4159605 | 1416 | 10501 | 2.5945587 | 3014 | 7820 |
0.03 | 7.0441070 | 1383 | 9742 | 2.5102867 | 2965 | 7443 |
0.04 | 7.0398818 | 1354 | 9532 | 2.2108330 | 2917 | 6449 |
0.05 | 7.6992366 | 1310 | 10086 | 1.6577298 | 2872 | 4761 |
0.06 | 7.1182965 | 1268 | 9026 | 1.9032144 | 2831 | 5388 |
0.07 | 7.1433198 | 1235 | 8822 | 1.5742929 | 2793 | 4397 |
0.08 | 7.4945607 | 1195 | 8956 | 1.8597893 | 2753 | 5120 |
0.09 | 6.7560137 | 1164 | 7864 | 1.7307407 | 2700 | 4673 |
0.10 | 6.8836590 | 1126 | 7751 | 1.7232278 | 2652 | 4570 |
0.11 | 6.9164371 | 1089 | 7532 | 1.4672825 | 2598 | 3812 |
0.12 | 6.7088847 | 1058 | 7098 | 1.4856919 | 2551 | 3790 |
0.13 | 6.1554252 | 1023 | 6297 | 1.6725380 | 2498 | 4178 |
0.14 | 6.4188641 | 986 | 6329 | 1.3488753 | 2445 | 3298 |
0.15 | 6.4717573 | 956 | 6187 | 1.5578374 | 2386 | 3717 |
0.16 | 8.3871320 | 917 | 7691 | 2.5968992 | 2322 | 6030 |
0.17 | 9.1542793 | 888 | 8129 | 2.2951037 | 2267 | 5203 |
0.18 | 9.9905101 | 843 | 8422 | 1.9618182 | 2200 | 4316 |
0.19 | 11.5982801 | 814 | 9441 | 1.6721006 | 2147 | 3590 |
0.20 | 11.8524173 | 786 | 9316 | 1.7723577 | 2091 | 3706 |
0.21 | 11.5592105 | 760 | 8785 | 1.9824047 | 2046 | 4056 |
0.22 | 10.6118785 | 724 | 7683 | 1.4552724 | 2001 | 2912 |
0.23 | 12.3861671 | 694 | 8596 | 0.5441860 | 1935 | 1053 |
0.24 | 13.2777778 | 666 | 8843 | 0.0883449 | 1879 | 166 |
0.25 | 12.0746501 | 643 | 7764 | 0.5016393 | 1830 | 918 |
0.26 | 12.3723577 | 615 | 7609 | 0.7542182 | 1778 | 1341 |
0.27 | 12.5244519 | 593 | 7427 | -0.1198371 | 1719 | -206 |
0.28 | 12.7996485 | 569 | 7283 | -0.9855856 | 1665 | -1641 |
0.29 | 12.8358209 | 536 | 6880 | -1.1691729 | 1596 | -1866 |
0.30 | 14.5508982 | 501 | 7290 | -1.0090909 | 1540 | -1554 |
0.31 | 15.1071429 | 476 | 7191 | -0.7018843 | 1486 | -1043 |
0.32 | 12.8933333 | 450 | 5802 | -1.1809859 | 1420 | -1677 |
0.33 | 11.3248260 | 431 | 4881 | -1.2961877 | 1364 | -1768 |
0.34 | 11.4545455 | 418 | 4788 | -0.6712225 | 1317 | -884 |
0.35 | 10.2660099 | 406 | 4168 | 0.6811709 | 1264 | 861 |
0.36 | 10.9201031 | 388 | 4237 | 1.2855967 | 1215 | 1562 |
0.37 | 11.9455041 | 367 | 4384 | 1.3425367 | 1159 | 1556 |
0.38 | 11.2991202 | 341 | 3853 | 0.9612613 | 1110 | 1067 |
0.39 | 10.8390093 | 323 | 3501 | 1.0852060 | 1068 | 1159 |
0.40 | 11.3495146 | 309 | 3507 | 2.3955513 | 1034 | 2477 |
0.41 | 12.8178694 | 291 | 3730 | 1.6365503 | 974 | 1594 |
0.42 | 9.5919118 | 272 | 2609 | 1.2915767 | 926 | 1196 |
0.43 | 8.4844961 | 258 | 2189 | 1.7044168 | 883 | 1505 |
0.44 | 9.0325203 | 246 | 2222 | 0.8104887 | 839 | 680 |
0.45 | 10.8851064 | 235 | 2558 | 1.1529709 | 791 | 912 |
0.46 | 10.1590909 | 220 | 2235 | -0.0549598 | 746 | -41 |
0.47 | 10.5523810 | 210 | 2216 | -0.3884181 | 708 | -275 |
0.48 | 11.4187192 | 203 | 2318 | -1.5422961 | 662 | -1021 |
0.49 | 9.2916667 | 192 | 1784 | -0.5680000 | 625 | -355 |
0.50 | 9.0738636 | 176 | 1597 | -0.6650000 | 600 | -399 |
0.51 | 5.4355828 | 163 | 886 | 1.1742958 | 568 | 667 |
0.52 | 7.0451613 | 155 | 1092 | 1.4280374 | 535 | 764 |
0.53 | 5.3472222 | 144 | 770 | 3.5581854 | 507 | 1804 |
0.54 | 3.4661654 | 133 | 461 | 5.1694561 | 478 | 2471 |
0.55 | 7.5078125 | 128 | 961 | 5.2653061 | 441 | 2322 |
0.56 | 8.7478992 | 119 | 1041 | 3.8547619 | 420 | 1619 |
0.57 | 10.3363636 | 110 | 1137 | 5.2989691 | 388 | 2056 |
0.58 | 9.6699029 | 103 | 996 | 6.7005495 | 364 | 2439 |
0.59 | 3.8526316 | 95 | 366 | 7.0057803 | 346 | 2424 |
0.60 | 6.4831461 | 89 | 577 | 7.8130841 | 321 | 2508 |
0.61 | 1.3580247 | 81 | 110 | 9.8561873 | 299 | 2947 |
0.62 | -1.5890411 | 73 | -116 | 10.2150538 | 279 | 2850 |
0.63 | -3.6060606 | 66 | -238 | 10.2745098 | 255 | 2620 |
0.64 | -2.2063492 | 63 | -139 | 10.0127660 | 235 | 2353 |
0.65 | 0.8245614 | 57 | 47 | 9.0810811 | 222 | 2016 |
0.66 | -0.9464286 | 56 | -53 | 4.4759615 | 208 | 931 |
0.67 | -5.0740741 | 54 | -274 | 1.7419355 | 186 | 324 |
0.68 | -1.9166667 | 48 | -92 | 3.8901734 | 173 | 673 |
0.69 | -2.5454545 | 44 | -112 | 4.7168675 | 166 | 783 |
0.70 | -0.2790698 | 43 | -12 | 5.2727273 | 154 | 812 |
0.71 | -0.3902439 | 41 | -16 | 6.4344828 | 145 | 933 |
0.72 | -1.5384615 | 39 | -60 | 6.4393939 | 132 | 850 |
0.73 | 6.6666667 | 36 | 240 | 11.9915966 | 119 | 1427 |
0.74 | 16.4545455 | 33 | 543 | 16.1000000 | 110 | 1771 |
0.75 | 16.4545455 | 33 | 543 | 12.7115385 | 104 | 1322 |
0.76 | 12.9062500 | 32 | 413 | 9.3125000 | 96 | 894 |
0.77 | 13.3666667 | 30 | 401 | 12.3647059 | 85 | 1051 |
0.78 | 21.4642857 | 28 | 601 | 16.0129870 | 77 | 1233 |
0.79 | 22.3846154 | 26 | 582 | 16.2428571 | 70 | 1137 |
0.80 | 19.2800000 | 25 | 482 | 15.0289855 | 69 | 1037 |
0.81 | 20.0869565 | 23 | 462 | 16.7301587 | 63 | 1054 |
0.82 | 16.5500000 | 20 | 331 | 25.5254237 | 59 | 1506 |
0.83 | 16.5500000 | 20 | 331 | 28.6415094 | 53 | 1518 |
0.84 | 6.3333333 | 18 | 114 | 28.8800000 | 50 | 1444 |
0.85 | 0.2352941 | 17 | 4 | 30.6458333 | 48 | 1471 |
0.86 | 7.2857143 | 14 | 102 | 31.9782609 | 46 | 1471 |
0.87 | 6.4166667 | 12 | 77 | 34.0487805 | 41 | 1396 |
0.88 | 6.4166667 | 12 | 77 | 28.6969697 | 33 | 947 |
0.89 | 7.2000000 | 10 | 72 | 30.4193548 | 31 | 943 |
0.90 | 7.2000000 | 10 | 72 | 31.1739130 | 23 | 717 |
0.91 | 7.2000000 | 10 | 72 | 22.2777778 | 18 | 401 |
0.92 | 19.1111111 | 9 | 172 | 27.2857143 | 14 | 382 |
0.93 | 23.8571429 | 7 | 167 | 27.2857143 | 14 | 382 |
0.94 | 23.8571429 | 7 | 167 | 21.1538462 | 13 | 275 |
0.95 | 23.8571429 | 7 | 167 | 42.6000000 | 10 | 426 |
0.96 | 11.1666667 | 6 | 67 | 42.6000000 | 10 | 426 |
0.97 | 11.1666667 | 6 | 67 | 58.4444444 | 9 | 526 |
0.98 | -45.2500000 | 4 | -181 | 75.1428571 | 7 | 526 |
0.99 | -45.2500000 | 4 | -181 | 75.1428571 | 7 | 526 |
1.00 | 9.5000000 | 2 | 19 | 104.3333333 | 6 | 626 |
We can see that betting under when our xG is 0.3 or more below the market xG serves us good. Similarly, betting overs when the market is 0.6 below our xG pays dividends.
Reapplying this to 2021-2022 season we get results of 10.49 units ($1112 on 106 bets) for unders, and -4.72 units ($-373 on 79 bets) for overs. Total results is $739 on 185 bets for 3.99 units.