A quartile is a positional statistic that divides an ordered distribution into four equal-probability sections. The first quartile, or Q1, is the 25th percentile; the third quartile, or Q3, is the 75th percentile. section 2.5.3
Quartiles help read a boxplot alongside related measures:
- The median marks the middle value. section 2.5.3
- The interquartile range spans Q1 through Q3 and forms the box; calculate it as Q3 minus Q1. section 2.5.3
- Boxplot whiskers use Q1 − 1.5 × IQR and Q3 + 1.5 × IQR; points beyond them appear as outliers. section 2.5.3
NBA career win shares
For NBA first-round selections, R reports a first quartile of 4.05 win shares and a third quartile of 43.85, placing the middle half between those values. 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)
Compare quartiles visually across college attendance and birthplace with a ggplot2 boxplot. section 2.5.3



