Thursday, June 21, 2012

Homecourt and rest time advantage

In a previous post, I looked at the true impact of homecourt advantage in the NBA, for the league in general and for each individual team. The model was simple, only considering whether the game was at home or away.

The main take-away was that playing at home bumped your probability of winning by almost 20 percentage points, from 40% to 60%. Quite a significant jump, although not every team observed the same jump.

I did however feel that the model was a little over-simplistic in ignoring another phenomenon which could impact a team's performance: rest time between games. Especially over the 2011-2012 condensed season with certain teams playing back-to-back-to-back games, one can definitely wonder how rest days come into play. If a team is playing on the road, can the fact that they have had three days of rest as opposed to their opponents back-to-back games mitigate the opponent's home court advantage?

The data and methodology are almost identical to the post I mentioned earlier: I looked at all 2009-201 and 2010-2011 games, and for each match-up looked at which team played at home and how many days of rest each team had.

Since we are now looking at multiple variables instead of just the homecourt impact, I will only provide the breakdown of results for the league in general, providing them for each team would just take up too much space.


Impact of rest days

The following table provides the victory probability based on where the game is played and the number of rest days for both teams.

Team A at home Rest days (Team A) Rest days (Team B) Win probability
Yes 1 1 59.1%
No 1 1 40.9%
Yes 2 1 65.2%
No 2 1 47.4%
Yes 3+ 1 62.6%
No 3+ 1 44.6%
Yes 1 2 52.6%
No 1 2 34.8%
Yes 2 2 59.1%
No 2 2 40.9%
Yes 3+ 2 56.4%
No 3+ 2 38.3%
Yes 1 3+ 55.4%
No 1 3+ 37.4%
Yes 2 3+ 61.7%
No 2 3+ 43.6%
Yes 3+ 3+ 59.1%
No 3+ 3+ 40.9%


Some interesting highlights are that:
  • independently of the number of rest days each team has had the difference homecourt advantage is always around 17-18%
  • the homecourt effect is much more predominant than the number of rest days: even in the best case scenario, the win probability on the road is 47.4%, so essentially a +7% percentage uplift due to rest days, as opposed to the +20% we saw in the previous post for the homecourt advantage impact.
  • it turns out that resting 2 days improves probability of victory compared to one day only, and three or more days is also more beneficial than one day only, two days is actually preferable to 3 or more days. This is also a debate that comes around often especially during playoff time, where one team comes out of a game 7 to meet a team that finished a sweep over a week before. Is too much rest a bad thing? From this data it does appear that 2 days provides the optimal balance between hitting your stride while you're hot and resting your sore legs.

Team's optimal rest days

What is true for the league isn't necessarily true for individual teams. I wanted to check if all teams preferred to rest 2 days instead of 1 or 3+ days. Were younger teams eager to have back-to-back games? Were older teams dreadful of tight schedules?

Team Significant Optimal rest days
NBA Yes 2
ATL Yes 2
BOS No 3
CHA Yes 2
CHI Yes 2
CLE No 2
DAL No 3
DEN Yes 3
DET Yes 3
GSW Yes 1
HOU No 2
IND Yes 2
LAC Yes 2
LAL Yes 1
MEM Yes 2
MIA No 2
MIL Yes 1
MIN Yes 1
NJN Yes 2
NOH Yes 3
NYK No 3
OKC No 3
ORL No 2
PHI No 2
PHO Yes 3
POR Yes 1
SAC No 1
SAS No 2
TOR Yes 3
UTA No 3
WAS Yes 3


Upon close inspection there does not seem to be any strong correlation between the team's age and the preferred number of rest days. Sure Boston is an old team preferring over three days and Golden State is one of the youngest team performing best on back-to-back games, but the Lakers are an old team also preferring back-to-back teams and the Wizards are a young team with best odds after 3+ days of rest.

To conclude, while rest days do influence performance in different ways for different teams, homecourt advantage remains the most impactful variable for outcome prediction of a game.



Monday, June 11, 2012

Thunder VS Heat: Stormy match-up

Now that the final two final contenders, it's time for the final predictions of the 2012 NBA season!

On Sekou Smith's Hang Time Blog the experts favor Oklahoma City 5 votes to 1, but what do the stats say?

The same model that was used to correctly predict the Thunder in 5 against the Lakers, and had slightly favored the Spurs in 7 over the Thunder in 6, gives a small advantage to OKC given its track record and homecourt advantage, but the margin is extremely close:

Winner Num games Probability
OKC 4 6.4%
MIA 4 6.0%
OKC 5 13.8%
MIA 5 11.3%
OKC 6 15.0%
MIA 6 16.3%
OKC 7 17.0%
MIA 7 14.4%

So if I had to put my money down, it would be for the Thunder in 7 as 3 NBA.com experts claimed.
But be careful, Miami in 6 is a very close possibility!

Saturday, June 9, 2012

Is Dexter getting better?

My latest entries have mostly been basketball-focused but the highly anticipated playoff matchups are to be blamed for that!

So after my post on the Johnny Depp - Tim Burton collaboration, I would like to take a stab at tracking the evolution of TV series. I think there are a broad type of questions that can be considered, such as:

How does the rating of individual episodes evolve throughout the course of TV series lifetime? Are there really "good" and "bad" seasons? Do TV series get cancel when the ratings go down by too much? Is there a common threshold? Do all seasons have high-rated cliffhangers at the end of the season?

Data

Similarly to the Johnny Depp analysis, I will be extracting my data from IMDB. To start off, I will focus on one particular TV series (and personal favorites): Dexter.

Plot

Let us plot the evolution of the individual episode ratings by "time":
Two main insights stand out:
  • there appears to be a "seasonal" pattern within each season:
    - the ratings either stay flat or go down in the first few episodes
    - the ratings then shoot upwards during the second half of the season
  • after 5 seasons of overall similar quality, it appears that the last season has not performed as well. For the first time in over 5 years ratings dropped before 8.0, and even the strong season finale was the lowest-rated finales.
If we compare the distribution of season 6's ratings with those of all prior seasons, the difference jumps out:
The best season 6 episode has a rating barely greater than the median rating of all past seasons!

I will start looking at other TV series and see if an overall low-rated season is the beginning of the end (hopefully not!). Do networks quickly panic and cancel shows as soon as they start dropping in overall quality?


Wednesday, May 30, 2012

Home-court advantage in the NBA

We have heard the concept countless times and almost take it for granted.

Home-court advantage. "They should win the next since they're playing at home." "They managed to steal one on the road."

But doesn't it all come down to Team A versus Team B? If A is a better team it should win no matter the location. The court has the same dimensions, the baskets are identical, the shots have the same likelihood of falling in. It's not like being server or receiver in a tennis game.

Or is it? There has actually been quite some studies around home-court advantage in an attempt to tease out the external factors that could cause it. Many potential causes have been brought forward: the home crowd of course, cheering when the hometeam gains momentum. The fact that the players in the home team can sleep at home instead of being in a hotel. Familiarity with the locker rooms, the facilities in general. Mostly psychological explanations difficult to accurately measure.

Or just consider the distractions when shooting free-throws:


I don't have a degree in psychology so I will tackle from the data point of view, and try to see how playing at home can impact the game's outcome.


Data

I looked at all NBA games (regular season only) for the past two years. I didn't go further back as other factors could have come into play such as the differences in team composition.


Methodology

For each team, and for the league in general, I computed the empirical probabilities of winning at home and on the road. The values can be directly computed form the creation of a two-by-two table win/loss VS home/away. I choose to approach the problem via a logistic model which provides exactly the same point estimates but in addition provides confidence intervals which in turn allow me to determine whether the homecourt advantage is significant or not.


Results

If an NBA team plays against another NBA team, how does the probability of victory change depending on where the game is played?

With a simple model where the only variable is where the geme is played I obtained that for the NBA in general, playing at home offers a +19.8% winning probability (59.9% VS 40.1%). This was a very significant uplift. There we have it, homecourt advantage is very present in the NBA.

Does this +20% hold for all NBA teams?

Here the variability is much greater, ranging from +37.8% for the Denver Nuggets (81.7% at home vs 43.9% away) to only 2.4% for the Dallas Mavericks (69.5% at home VS 67.1% away).
Full team-by-team table is at the end of the post.

Does any team player better away than at home?

No, all teams play better at home, even if by only a little such as the Dallas Mavericks where the uplift is only 2.4%.

Is homecourt advantage statistically significant for all teams?

Homecourt advantage was significant for all teams except 8: Dallas Mavericks (+2.4%), Miami Heat (+3.7%), Boston Celtics (+9.8%), Philadelphia 76ers (+9.8%), Oklahoma City Thunder (+11.0%), Sacramento Kings (+11.0%), Houston Rockets (+13.4%), New York Knicks (+13.4%). These are not necessarily all good or bad teams, just teams that are just as good (or bad) away as at home.


Closing thoughts

Going back to Denver and its overwhelming homecourt advantage (+37.8%) compared to the second-best advantage +32.9% for the Los Angeles Clippers, what might wonder if the altitude isn't the Nuggets biggest fan...


In a later post I will explore how the model can be tweaked to take rest time between games into account. Does more rest improve your winning probability?


Appendix: Full table

Team Home win % Away win % Delta % Significance
DAL 69.5% 67.1% 2.4% No
MIA 65.9% 62.2% 3.7% No
BOS 69.5% 59.8% 9.8% No
PHI 46.3% 36.6% 9.8% No
OKC 69.5% 58.5% 11.0% No
SAC 35.4% 24.4% 11.0% No
HOU 58.5% 45.1% 13.4% No
NYK 50.0% 36.6% 13.4% No
MIN 26.8% 12.2% 14.6% Yes
CLE 57.3% 40.2% 17.1% Yes
LAL 78.0% 61.0% 17.1% Yes
POR 68.3% 51.2% 17.1% Yes
UTA 64.6% 47.6% 17.1% Yes
ORL 76.8% 58.5% 18.3% Yes
PHO 67.1% 47.6% 19.5% Yes
NBA 59.9% 40.1% 19.8% Yes
CHI 73.2% 52.4% 20.7% Yes
NJN 32.9% 11.0% 22.0% Yes
ATL 70.7% 47.6% 23.2% Yes
DET 46.3% 23.2% 23.2% Yes
MIL 61.0% 37.8% 23.2% Yes
SAS 79.3% 56.1% 23.2% Yes
MEM 64.6% 40.2% 24.4% Yes
TOR 50.0% 25.6% 24.4% Yes
NOH 63.4% 37.8% 25.6% Yes
WAS 42.7% 17.1% 25.6% Yes
IND 57.3% 26.8% 30.5% Yes
CHA 63.4% 31.7% 31.7% Yes
GSW 53.7% 22.0% 31.7% Yes
LAC 53.7% 20.7% 32.9% Yes
DEN 81.7% 43.9% 37.8% Yes



Wednesday, May 23, 2012

NBA: Spurs VS Thunder

Time for a playoff update now that the two contenders for the Western Finals are known.

Everybody wants to see Spurs VS Heat, but before then comes the Thunder hurdle, and despite the Spurs impressive performance up til now, this is definitely going to be a tough challenge.

The method is exactly the same from my previous post (which correctly identified Thunder beating the Lakers in 5 as the most likely scenario!). Entering the last numbers in the model, here's what came out:

Probability of Spurs winning the series: 55.6%

Series breakout:

Winner Number of games Probability
Spurs 4 6.6%
Thunder 4 5.3%
Spurs 5 15.8%
Thunder 5 9.5%
Spurs 6 14.3%
Thunder 6 16.9%
Spurs 7 19.0%
Thunder 7 12.7%

The three most likely scenarios are:
Spurs in 7 (19.0%), Thunder in 6 (16.9%) and Spurs in 5 (15.8%).

For the overall playoffs, the latest numbers suggests the West as championship favorites for now:

NBA team Champion Probability
SAS 34.4%
OKC 25.7%
MIA 21%
BOS 12%
IND 4.6%
PHI 2.4%

Verdict in the upcoming weeks!

Thursday, May 17, 2012

Lakers - Thunder Series

This post is actually an expanded comment to Sekou Smith's Hang Time Blog on nba.com concerning the Lakers - Thunder series.

This series is one everybody has been waiting for since the start of the season.

Experience VS youth.
Kobe VS Kevin.


VS



A blowout in game 1.
An incredible comeback in game 2.

What's in store for the next 2 + X games?

5 nba.com's experts on Sekou's blog give their predictions after 2 games: one says 4, two say 5, and 2 say 6.

But what do the stats say?

I recently updated my model from the last two posts (here and here) in two ways: homecourt advantage is now incorporated (another post soon on this topic, namely how we can quantify it, whether all teams have a significantly higher probability of winning at home than on the road, and which teams have the greatest delta in home ganes vs away games), and by providing more details on each series with not only the probability of one team winning it but also the breakout in how many games the series will play out.

Which is exactly what I did here for the Lakers - Thunder series.

And now for the results:

Winner Number of games Probability
Thunder4 22.2%
Thunder 5 30.4%
Lakers 6 5.8%
Thunder 6 17.2%
Lakers 7 9.5%
Thunder 7 14.9%

So Thunder in 5 is actually the most likely scenario, followed by Thunder in 4 and in 6. Overall, if you're a Laker fan you should feel depressed with Lakers having only a 15.3% probability of facing the Spurs. But I have to admit that I haven't factored Kobe-back-against-the-wall variable in my models :-)

Let me know your thoughts!

Tuesday, May 15, 2012

2012 NBA Playoffs: Updated forecasts


What a first round this has been!

Things were rather quickly expedited in the East, including the surprising elimination of the #1 team Chicago Bulls, surprising until we saw the following video at least:




Meanwhile, the West was really the wild wild west and gave us some thrilling comebacks and two stressful game sevens.

Chicago was the favorite to win the Championship after the first two games of the playoffs with an estimated probability of victory of 17.9%. Its elimination has freed up some room but for whom?

Oklahoma City, San Antonio and Miami were the runner ups, and while the names of the next three teams hasn't changed, their order has:

NBA teamChampion Probability
MIA21.5%
OKC21.2%
SAS19.3%
BOS10.2%
LAC7.9%
IND7.3%
PHI6.6%
LAL6%


However the results are slightly biased as of now in the sense that Miami and Oklahoma won their round 2 opener whereas San Antonio still hasn't played Game 1 against the Clippers. If it were to win, it would jump right back to the first spot with a probability of 24.6% of clinching the Larry O'Brien trophy, more than 3 percentage points ahead of Miami and Oklahoma City.

More updates at the end of round 2!