Variability and the box plot: how much the data differ
lesson~12 minflashcardsgamequizup to 50 pts
Same mean, different story
Two classes have a mean travel time to school of 20 minutes and a median of 20 minutes too. In class A everybody travels 17 to 23 minutes, in class B 5 to 35 minutes. The mean does not tell them apart; variability does.
| Measure | Calculation | What it tells you | Sensitive to extremes? |
|---|---|---|---|
| range | max − min | the whole span of the data | very |
| interquartile range (IQR) | Q3 − Q1 | the span of the middle half | no |
| variance | sum of squared deviations / (n − 1) | mean squared deviation | yes |
| standard deviation | square root of the variance | typical deviation from the mean, in the units of the data | yes |
| coefficient of variation | sd / mean | variability relative to the mean | yes |
We divide the variance by because we use the sample to estimate the variability of the whole population. Pandas std() and var() do this
by default, numpy.std divides by .