The interquartile range (IQR) measures the spread of the middle half of a distribution. It runs from the first quartile (Q1, the 25th percentile) to the third quartile (Q3, the 75th percentile), so IQR = Q3 − Q1. In a boxplot, that middle 50% is the box. section 2.5.3 section 14.5.1
Read the box alongside the median line and the points beyond the whiskers. The median marks the middle value; points outside the boxplot’s displayed limits are treated as outliers. A large IQR means the central observations are more spread out, while a small IQR means they are more tightly clustered. section 2.5.3 section 14.5.1
Comparing career win shares
Boxplots compare career win shares for NBA first-round selections by college attendance and birthplace. Each box shows where the middle 50% of win-share totals falls for a group, making differences in typical spread visible without relying only on the mean. section 2.5.3
p2 <- ggplot(draft, aes(x = College2, y = WS)) +
geom_boxplot(color = "orange4", fill = "orange1") +
labs(title = "Career Win Shares Distribution of
NBA First-Round Selections",
x = "",
y = "Career Win Shares",
subtitle = "2000-09 NBA Drafts") +
stat_summary(fun = mean, geom = "point", shape = 20,
size = 8, color = "white", fill = "white") +
theme(plot.title = element_text(face = "bold")) +
facet_wrap(~Born2) +
scale_x_discrete(breaks = c(0, 1),
labels = c("No College", "College"))
print(p2)
This ggplot2 example creates grouped boxplots of career win shares, adds a mean point, and facets the comparison by birthplace. section 2.5.3
Standardized wins by scoring category
Notched boxplots plot standardized regular-season wins across standardized points-allowed or points-scored categories. The IQR box lets each category’s central win distribution be compared visually. section 14.5.1






