nba_stats is a 300-observation table combining NBA team-season records with points scored, points allowed, point differential, wins, season, and playoff outcomes. It supports practical questions about scoring trends, winning, postseason qualification, and champions. section 14.2.5 section 14.3
Useful analytical views include:
- Convert playoffs into a factor whose levels distinguish missed postseason play, postseason elimination, and NBA championships. section 14.2.5
- Summarize mean points scored per game by season, revealing a low of 96.26 in 2012 and a high of 105.59 in 2017. section 14.3
- Compare points scored or allowed with standardized wins by grouping teams into four z-score categories. section 14.5.1
- Prepare champion-only regular-season and playoff records for paired comparisons of scoring and defense. section 14.7
nba_stats <- left_join(stats, nba, by = c("Team", "season"))
Build nba_stats by joining stats and nba on Team and season; the resulting table retains every unique column from both sources. section 14.2.5
Seasonal scoring overview
Group nba_stats by season, calculate rounded mean PTS values, and plot them with ggplot2. A 15-bin histogram then shows the distribution of team scoring; a Shapiro-Wilk test returns p = 0.04124. section 14.3
NBA champions
Filter playoffs == 11, retain Team, season, PTS, and O_PTS, append postseason values, and use paired boxplots to compare regular-season and playoff performance. Most champions scored and allowed fewer points per game in the postseason. section 14.7
