Using IQR and MAD to compare variability
About this video
The video compares variability in two pairs of data sets. When the median is the measure of centre, the interquartile range (IQR) is used: Shruti's IQR of 9,000 steps shows much more variability than Vera's 4,000. When the mean is used, the mean absolute deviation (MAD) is used, and Arthur's much higher MAD shows more variability than Jonas's 0.76 hours.
You'll be able to
- use the IQR to compare the variability of two data sets that use the median.
- explain how the mean absolute deviation (MAD) is calculated.
- use the MAD to compare the variability of two data sets that use the mean.
Key words
- variability
- How spread out the values in a data set are.
- interquartile range (IQR)
- The range of the middle 50% of the data, from the 25th to the 75th percentile.
- range
- The highest value minus the lowest value.
- mean absolute deviation (MAD)
- The mean of how far each data point is from the mean.
- median
- The middle value when the data are put in order.
Transcript
- [Instructor] We're told that Shruti and Vera both track their daily steps for 10 days. And let's see, we're given the median for both Shruti and Vera, and it's also plotted here on this box-and-whiskers plot. And they have the same median, they're both at 8,000 steps.
We see that right over here. But we're also given a measure of variability for each of them. We're given the interquartile range, which is the typical measure of variability when you're dealing with median. We typically deal with medians for central tendency when if we think that the distribution isn't symmetric, if it's skewed in some way, if we don't want outliers, things that are really far from either the mean or the median, far away from the central tendency to skew things, we want median, because even if the highest data point ended up being a lot higher, it does not change the median.
So that's good that they picked it for this. It looks like there might be a little bit of skew in the distribution. It's not completely symmetric. And as I said, when you use the median as your central tendency, you'll wanna use something like interquartile range, which tells you essentially the range of the middle 50% of the data.
So if we look at this data here for Shruti, her low, the lowest number of steps she had, looks like it would be 2,000 steps. The highest number of steps, it looks like it was 18,000 steps. Going from this extreme to that extreme, that's the entire range of her data.
That's not the interquartile range. The interquartile range takes us from the 25th percentile to the 75th percentile of the data. And that interquartile range just goes from 6,000 steps to 15,000 steps. That's what's measured by that 9,000. And you could see that is much larger than Vera's interquartile range, which is 4,000.
So I would argue, if we were trying to compare variability here, that Shruti has much more variability in her data than Vera does. And actually that's true whether you're using interquartile range or whether you're just using range. Although interquartile range oftentimes is better, because if you just use range, one data point can really max out your range or skew it in some way.
But we just did an example measuring variability where we used median as our measure of central tendency. We could also look at another example where we're using mean as our measure of central tendency. Jonas and Arthur both track their hours of sleep per night for 10 days.
Jonas's mean, 7.3. Arthur's mean is 7.2. And then we see MAD (laughing) in caps here, which stands for mean absolute deviation. Now, this sounds really fancy, but really what's happening is, for every data point, for example, Jonah's here, 7.3 hours is the mean.
They calculated that for us. So that's going to be right about there. And so to calculate the mean absolute deviation for Jonas, you take each of these data points and you say, "What's the absolute distance from the mean?" And you add all of them up, and then you divide by the number of data points.
So you're essentially figuring out the mean of the absolute deviations. (laughing) That's literally what the word or what the acronym is telling us. So we have a mean absolute deviation of 0.76 hours for Jonas. And for Arthur, Arthur's mean is a little bit lower.
It's a little bit lower, let me see. It's maybe right around, it's a little bit lower, maybe right over there. But they're not asking us to compare the variability in the number of our, or they're not asking us to compare the means, they're asking us to compare the variability, just like we did in the last example.
And so here we see the mean absolute deviation is much, much higher. So just looking at this gives us a pretty good signal that Arthur's data had much more variability. And you can also see that visually right over here. You have many more data points that are pretty far away from the mean than you see in Jonas's situation.
Video © Khan Academy, used under CC BY-NC-SA. Watch on Khan Academy. Puzzicle is not affiliated with Khan Academy.