liveBook · Manning

Whisker

As explained in Statistics Slam Dunk

A whisker is a line extending from a boxplot box toward the non-outlying lower or upper observations.

A whisker is the line extending below or above a boxplot’s interquartile-range box. It reaches the lower or upper boundary for non-outlying observations; points beyond it are outliers. section 14.5.1 section 2.5.3

Read a whisker alongside the other parts of a boxplot:

  • The box covers the interquartile range, from the 25th to the 75th percentile. section 14.5.1
  • The whiskers extend from the box toward the lower and upper non-outlying values. section 14.5.1
  • Dots beyond the whisker limits represent outliers, using limits based on 1.5 times the IQR. section 2.5.3
  • The horizontal line inside the box marks the median; the mean may be added separately. section 14.5.1 section 2.5.3
p3 <- ggplot(nba_stats, aes(x = o_pts_cat, y = z_wins, fill = o_pts_cat)) +
 geom_boxplot(notch = TRUE, alpha = 0.5) +
 labs(title = "Points Allowed vs. Wins", 
      subtitle = "2008-17",
      x = "Standardized Points Allowed Category", 
      y = "Standardized Regular Season Wins") +
 stat_summary(fun = mean, geom = "point", 
              shape = 20, size = 8, color = "white", fill = "white") + 
 theme(legend.position = "bottom") +
 scale_fill_discrete(name = "Points\nAllowed\nZ-Score", 
                     labels = c("< -1", "-1 to 0", "0 to 1","> 1")) +
 theme(plot.title = element_text(face = "bold"))

Use the NBA boxplot code to see whiskers compare standardized regular-season wins across standardized points-allowed categories; notches and mean points add context. section 14.5.1

NBA win shares

Boxplots of NBA first-round selections compare career win shares by birthplace, college attendance, and draft year. Their whiskers show the spread of non-outlying careers, while dots identify unusually high or low outcomes. section 2.5.3

How Statistics Slam Dunk covers it

How deep it goes
Defines whiskers, relates them to quartiles and the IQR, and distinguishes outliers, without deriving the plotting algorithm.
Examples
Illustrates whiskers with NBA wins, points scored, points allowed, career win shares, birthplace, college attendance, and draft year.
What it assumes
Teaches boxplot components, quartiles, the IQR, and outlier limits before applying them to sports data.
What you can do after
Apply whiskers via ggplot2 to interpret distribution, spread, medians, means, and outliers in grouped NBA data.
How it connects
Connects whiskers to boxplots, interquartile range, quartiles, median, mean, and outliers.

Also explained in

Compare how 2 books explain whisker →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.