Standard deviation measures how far numeric observations typically spread from their mean. A low value indicates clustered data; a high value indicates greater dispersion. section 2.5.1 section 11.3
Compute standard deviation by following the same sequence used to obtain variance:
- Find the mean, then subtract it from every observation. section 11.3
- Square the deviations, add them, and divide by n − 1 to obtain the variance. section 11.3
- Take the square root of the variance, or call base R’s sd() function. section 11.3 section 18.4.2
NBA player and team examples
For draft data, sd(draft$G) returns 319.6035 games, sd(draft$MP) returns 7.826054 minutes per game, and sd(draft$WS) returns 33.64374 win shares. For regular-season wins, grouping records by season reveals changing competitive balance: a standard deviation of about eight wins around a 41-win mean implies roughly two-thirds of teams won between 33 and 49 games. section 2.5.1 section 18.4.2
sd(draft$G) ## [1] 319.6035 sd(draft$MP) ## [1] 7.826054 sd(draft$WS) ## [1] 33.64374
Inspect executable base R calls for standard deviations of games, minutes, and win shares. section 2.5.1
records %>% group_by(Season) %>% summarize(sd_wins = sd(W)) -> sd_records head(sd_records, n = 3) ## # A tibble: 3 × 2 ## Season sd_wins ## <chr> <dbl> ## 1 1970-71 12.0 ## 2 1971-72 15.3 ## 3 1972-73 16.2 tail(sd_records, n = 3) ## # A tibble: 3 × 2 ## Season sd_wins ## <chr> <dbl> ## 1 1995-96 14.0 ## 2 1996-97 15.7 ## 3 1997-98 15.5
Inspect grouped R code that computes year-over-year standard deviation in regular-season wins. section 18.4.2














