What if I created a site that would project the win probabilities of the home team based on the Log5 and Pythagorean Wins Expectation? For Log5 calculations all I need is the winning percentage of each time. For Pythagorean Wins I just need the points for and points against for each team and apply a little math.
Take 1
The site allows you to plug in the values you have and calculate the win probabilities for the home team. The cool thing about this first attempt is that it works on all major sports by just choosing the home field advantage factor for whatever sport you want.
The winners site is good for quick one off matchup projections, however I realized pretty quick that projecting multiple games was tedious. The data for the calculations is readily available on several websites so I took the logical next step.
Projecting Winners
First I wanted to project the weekly NFL games using Log5 and Pythagorean Wins. I used Python to go out and grab all the data. Sample below
Team Stats Sample |
Schedule data Sample |
I wrote a couple stored procs to do the projection math and came up with the following result set.
Log5 and Pythagorean Win Projects for NFL Matchups Week 11 |
Those last 6 columns is the good stuff. The calculated probabilities of the home team winning based on Log5 and Pythagorean Wins on both a neutral field and using home field advantage. So now all I needed was a website to show the week matchups and probabilities.
Watch Factor
Small spoiler on that last screenshot. Since I now had the win probabilities for all the week's matchups, why not create a WatchFactor metric that will predict how watchable a NFL game will be. The WatchFactor is broken up into the following categories.
Category | Logic | Notes |
---|---|---|
Barn Burner | If Visitor Team Wins > Losses AND Home Team Wins > Losses AND the Pythagorean Wins Home Field Advantage Probability Projection is between 40% and 65% | Barn Burners should show you the matchups between two teams with winning records where the win probablility for the home team in somewhere near 50%. This would indicate that the teams are pretty well matched and they are both winning teams. Should be a good game |
Stink Town | Case 1: If Visitor Team Wins < Losses And Home Team Wins < Losses. Case 2: If Home Team Win Probability < 30% and if the matchup is not a dumpster fire | Stink town games are uninteresting games. Games between 2 losing teams or games where the home team has less than a 30% chance of winning. |
Dumpster Fire | If home team win probablitiy is <= 20% OR home team win probablity is >= 85%. | This game is projected to be a blow out. It is going to get ugly quick. |
Keep an Eye on It | If home team wins = visitor team wins and its not a barn burner or stink town | This was an attempt to show those games that could be good games base soley on the fact that the teams have similar records. |
Take it Or Leave it | If the game does not fall into any other category than it’s a take it or leave it | Catch all for games that don't fit in a category. |
Judging the Projections
So how accurate are the Log5 and Pythagorean Win Projections at picking the winner? I added the green check mark to the teams that are projected to win using the Pythagorean Wins with Home Field Advantage probability. I wrote a final part to the main python script to update the results table with the winning team and stats about the win (winner points, loser points, etc.). Once I have some data stored up I can start showing how accurate the Log5 and Pythagorean Wins projects can be at picking the matchups.
All the NULLS will be updated when the update scripts runs Tuesday morning after the games are finished up. The pPythwinner column shows the projected winner based on the calculated win probabilities.
Finally I thought it would be cool and trendy to post the weekly matchup numbers to Twitter with a link back to this article explaining the method to the madness. Using the Twitter Library for Python it was pretty simple.
#NFL Week 11 games:
DumpsterFire-2
StinkTown-4
BarnBurner-4
KeepEye-1
TakeitLeaveit-3
Explained Here: http://t.co/EQb4krwTQq
— thejoestory (@thejoestory) November 13, 2014
0 comments:
Post a Comment