NBA In-Game Win Probability

Home for all your discussion of basketball statistical analysis.
boooeee
Posts: 88
Joined: Sun Jan 22, 2012 5:32 am
Contact:

Re: NBA In-Game Win Probability

Post by boooeee »

DSMok1 wrote:Have you seen the work Ed Kupfer did on this way back in 2006 (before he got picked up by the Rockets)?

Here are some links to his thread:

Page 1 http://godismyjudgeok.com/DStats/APBRme ... t=586.html
Page 2 http://godismyjudgeok.com/DStats/APBRme ... rt=15.html
Page 3 http://godismyjudgeok.com/DStats/APBRme ... rt=30.html

And another thread of his with graphs: http://godismyjudgeok.com/DStats/APBRme ... t=686.html

Also, Brian Burke, of Advanced NFL Stats, set up an empirical model for NCAA basketball in 2009: http://wagesofwins.com/2009/03/05/model ... ian-burke/

And here's another thread: http://godismyjudgeok.com/DStats/APBRme ... =1701.html

Thanks for the links. I was aware of Brian Burke's attempt, but hadn't seen Ed's work from the APBR archives.
DSMok1
Posts: 1119
Joined: Thu Apr 14, 2011 11:18 pm
Location: Maine
Contact:

Re: NBA In-Game Win Probability

Post by DSMok1 »

Incidentally, here is Ed Kupfer's raw data on time/score/winprob for anyone to play with: http://web.archive.org/web/200603251513 ... ngData.txt

(That is the stacked data)

Here is the unstacked data showing all observations: http://web.archive.org/web/200603251513 ... tacked.zip
Developer of Box Plus/Minus
APBRmetrics Forum Administrator
Twitter.com/DSMok1
Mike G
Posts: 6175
Joined: Fri Apr 15, 2011 12:02 am
Location: Asheville, NC

Re: NBA In-Game Win Probability

Post by Mike G »

Since 1957, there are 200 playoff games which went into overtime, and I've used these teams' season SRS to gauge who was the 'favorite' in these games.
http://bkref.com/tiny/gEghj

By straight SRS, the favorite has won 116 of 200 playoff overtime games.
When I add a home court advantage of 2.6, the favorite has gone 105-95.
The 5 extra wins are entirely attributable to a 14-4 record by teams with more than 7.7 pts advantage in SRS + HCA.
With less than 7.7 advantage, it's 91-91.
Of those 182 games, home favorites are 65-66. Faves on the road are 26-25.
There's an uncanny preponderance of favorites at home being taken to overtime.

In 1165 overtime minutes, faves have outscored dogs by 42 points. This is 1.73 per 48 minutes.
Average SRS+HCA advantage has been 4.07

I realize SRS is often a lot different from the Vegas line. The latter would presumably include some of the factors mentioned earlier: players not feeling well, or slumping, or missing; players who missed much of the season and now are doing fine; teams on a hot or cold streak; specific team matchup factors, HCA; etc.
v-zero
Posts: 520
Joined: Sat Oct 27, 2012 12:30 pm

Re: NBA In-Game Win Probability

Post by v-zero »

What are the values excluding all but single OT games? Or, preferably if possible, what are the values for the end of all 1OT periods?
Mike G
Posts: 6175
Joined: Fri Apr 15, 2011 12:02 am
Location: Asheville, NC

Re: NBA In-Game Win Probability

Post by Mike G »

In single-overtime playoff games, faves are 79-82.
In all first overtimes, totaling 845 minutes, the faves are +11 points. That's 0.63 per 48, compared to 4.00 avg SRS+HCA advantage.

Either the HCA is not really this great (2.6 ppg) in playoffs; or teams in overtime are very evenly matched, regardless of their prior record on the year; or some of each.

There could also be a psychological factor. Especially with the 3-point option, teams may decide to "go for the win" or to "go for the tie and hope to win in overtime". The favorites have been in many more home overtime games than on the road. Maybe they just think they'll have an advantage in overtime, because they're at home. Maybe the refs sense this and won't give them any.
v-zero
Posts: 520
Joined: Sat Oct 27, 2012 12:30 pm

Re: NBA In-Game Win Probability

Post by v-zero »

That's very interesting - does it hold in the regular season? I'm wondering if playoff fatigue comes into it in a big way.
Mike G
Posts: 6175
Joined: Fri Apr 15, 2011 12:02 am
Location: Asheville, NC

Re: NBA In-Game Win Probability

Post by Mike G »

I looked at playoff games because the better refs generally work those games, and they're less likely to get swept up in home court favoritism. And no team is resting their starters or otherwise willing to take a loss for the long haul.

We wouldn't say 200 games is a small sample size, would we? Or ~1100 overtime minutes?

The better teams at any level of the playoffs should generally be less fatigued, I'd think.
But in a given game, fatigue can certainly be a factor -- If you're tired while an underdog opponent has forced you to overtime, you might still be tired in overtime.
boooeee
Posts: 88
Joined: Sun Jan 22, 2012 5:32 am
Contact:

Re: NBA In-Game Win Probability

Post by boooeee »

Sample sizes are smaller, but here are results using the Vegas point spread:

Favorites in the playoffs in overtime: 26-20 (56.5%); Link

Favorites in the regular season in overtime: 415-288 (59.0%); Link

Home teams in the playoffs in overtime: 26-21 (55.3%); Link

In regards to playoffs and home court advantage, despite the (supposedly) better referees, home court is stronger in the playoffs (even after correcting for team strength).
DSMok1
Posts: 1119
Joined: Thu Apr 14, 2011 11:18 pm
Location: Maine
Contact:

Re: NBA In-Game Win Probability

Post by DSMok1 »

Very nice.

In your blog post, you alluded to the fact that the earlier games may not have actually been as exciting because the stakes were lower. You could easily create a measure that accounts for that by multiplying excitement index time championship leverage index. ( http://www.basketballprospectus.com/unfiltered/?p=923 )
Developer of Box Plus/Minus
APBRmetrics Forum Administrator
Twitter.com/DSMok1
boooeee
Posts: 88
Joined: Sun Jan 22, 2012 5:32 am
Contact:

Re: NBA In-Game Win Probability

Post by boooeee »

I give myself a 25% success probability on this, but I am going to attempt to share the win probability graph real time for tonight's game 7.

Check back here once the game starts.
boooeee
Posts: 88
Joined: Sun Jan 22, 2012 5:32 am
Contact:

Re: NBA In-Game Win Probability

Post by boooeee »

boooeee wrote:I give myself a 25% success probability on this, but I am going to attempt to share the win probability graph real time for tonight's game 7.

Check back here once the game starts.
DSMok1 - Thanks for spreading the word on twitter (I have an account, but haven't really started using it yet). Things seemed to work pretty smoothly (I had to make a few adjustments on the fly). There was a bit of a lag and the chart would disappear when the table would get refreshed. Did you run into any issues?
v-zero
Posts: 520
Joined: Sat Oct 27, 2012 12:30 pm

Re: NBA In-Game Win Probability

Post by v-zero »

It was excellent for me, even if the result wasn't :roll:. How did you end up doing it live?
boooeee
Posts: 88
Joined: Sun Jan 22, 2012 5:32 am
Contact:

Re: NBA In-Game Win Probability

Post by boooeee »

v-zero wrote:It was excellent for me, even if the result wasn't :roll:. How did you end up doing it live?

Spit and bubblegum mostly. My data source was the CNN/SI json feed (probably not technically kosher, but I didn't think it would be a big deal for one game). I had a looping R code that would process the data, add the probabilities, and output a csv to my Google drive folder. Google drive would then automatically sync that csv file to the cloud. I was able to copy a few Google Apps scripts from various searches. One script imports that in-the-cloud csv into a Google Spreadsheet. The second imports the Google Spreadsheet into a Google Fusion Table. Google allows you to set up "triggers" for the scripts in the spreadsheet that run the script every minute. The chart itself uses the Google Fusion table as its data source.
Post Reply