Rest is the number of days off before an NBA regular-season game. Comparing rest between opponents helps answer whether recovery is associated with winning. section 9.0
NBA schedules create unequal rest because teams follow an 82-game schedule shaped by opponents, venues, travel, television, and blackout dates. Analysis therefore compares home and away teams with equal, greater, or fewer prior days off. section 9.0
Grouping games by relative rest produces clear win-rate comparisons:
- Equal rest: home teams won 57.7% of games, close to the overall 58.7% home winning percentage. section 9.5.3
- Home-team advantage in rest: home teams won 74% of games when they had at least one additional day off. section 9.5.3
- Away-team advantage in rest: away teams won 58% of games when they had at least one additional day off. section 9.5.3
Because wins and losses are categorical outcomes, the relationship is tested with a chi-square test for independence. Cramer's V complements it by measuring effect size; the null hypothesis assumes no meaningful relationship. section 9.0
finaldf %>%
filter(teamDayOff == opptDayOff) %>%
group_by(teamLoc) %>%
summarize(wins = sum(n))
## # A tibble: 2 × 2
## teamLoc wins
## <fct> <int>
## 1 Away 1432
## 2 Home 1955
sqldf("select SUM(n) FROM finaldf WHERE teamLoc ='Home' and
teamDayOff = opptDayOff")
## SUM(n)
## 1 1955
sqldf("select SUM(n) FROM finaldf WHERE teamLoc ='Away'
and teamDayOff = opptDayOff")
## SUM(n)
## 1 1432
Filter equal-rest games, group by location, and sum wins with dplyr; equivalent sqldf queries provide the same counts. section 9.5.3
