liveBook · Manning

Mean absolute deviation

As explained in Statistics Slam Dunk

Mean absolute deviation is the average of the absolute differences between observations and a chosen center, commonly the mean.

Mean absolute deviation measures spread by averaging the absolute differences between observations and their mean. It helps assess consistency, volatility, and parity rather than relying on a center alone. section 18.0 section 20.7

For each observation, subtract the group mean, take the absolute value, add those deviations, and divide by the number of observations. The method is less sensitive to outliers than variance and standard deviation. section 18.4.4 section 20.7

NBA regular-season wins

Group NBA records by season, calculate each team’s absolute distance from that season’s mean wins, then average those distances. Values ranged from 8.71 in 1970–71 to 12.6 in 1997–98. The resulting chart suggested that the salary cap did not improve intra-season parity during the examined period. section 18.4.4

records %>%
 group_by(Season) %>%
 mutate(mad_wins = abs(W - mean(W))) -> mad_records

head(mad_records, n = 3)
## # A tibble: 3 × 6
## # Groups:   Season [3]
##   Season  Lg    Team               W     L mad_wins
##   <chr>   <chr> <chr>          <int> <int>    <dbl>
## 1 1997-98 NBA   Boston Celtics    36    46        5
## 2 1996-97 NBA   Boston Celtics    15    67       26
## 3 1995-96 NBA   Boston Celtics    33    49        8

tail(mad_records, n = 3)
## # A tibble: 3 × 6
## # Groups:   Season [3]
##   Season  Lg    Team                    W     L mad_wins
##   <chr>   <chr> <chr>               <int> <int>    <dbl>
## 1 1997-98 NBA   Vancouver Grizzlies    19    63       22
## 2 1996-97 NBA   Vancouver Grizzlies    14    68       27
## 3 1995-96 NBA   Vancouver Grizzlies    15    67       26

Create a grouped R variable containing each team’s absolute deviation from its season mean. section 18.4.4

How Statistics Slam Dunk covers it

How deep it goes
Defines the measure, walks through grouped arithmetic in R, charts yearly results, and compares findings with other dispersion measures.
Examples
Uses NBA team wins grouped by season, a year-over-year line chart, and pre- versus post-salary-cap parity comparisons.
What it assumes
Assumes grouped numeric observations and a computed mean while demonstrating the deviation arithmetic from those ingredients.
What you can do after
Apply it via dplyr and ggplot2 to compute, summarize, visualize, and interpret grouped mean absolute deviations.
How it connects
Connects statistical dispersion with the mean, variance, standard deviation, range, median absolute deviation, and parity.

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.