# Variance/standard deviation versus interquartile range (IQR)

Variance and interquartile range (IQR) are both measures of variability.

But IQR is robust to outliers, whereas variance can be hugely affected by a single observation.

Since variance (or standard deviation) is a more complicated measure to understand, what should I tell my students is the advantage that variance has over IQR?

• I don't think thinking about advantages will help here; they serve mosstly different purposes. Oct 7, 2016 at 17:03
• One candidate for advantages of variance is that every data point is used. Oct 7, 2016 at 17:06
• Variance isn't of much direct use for visualizing spread (it's in squared units, for starters -- the standard deviation is more interpretable, since it's in the original units -- it's a particular kind of generalized average distance from the mean), but variance is very important when you want to work with sums or averages (it has a very nice property that relates variances of sums to sums of variances plus sums of covariances, so standard deviation inherits a slightly more complex version of that. IQR doesn't share that property at all; nor mean deviation or any number of other measures) Oct 8, 2016 at 2:51

The main use of variance is in inferential statistics.

So, variance and standard deviation are integral to understanding z-scores, t-scores and F-tests.

This means that when your data are normally distributed, the standard deviation is going to have specific properties and interpretations. When your data are not normal (skewed, multi-modal, fat-tailed,...), the standard deviation cannot be used for classicial inference like confidence intervals, prediction intervals, t-tests, etc., and cannot be interpreted as a distance from the mean.

You can say things like "any observation that's 1.96 standard deviations away from the mean is in the 97.5th percentile." if your data are normally distributed.

A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while a high standard deviation indicates that the values are spread out over a wider range1. The standard deviation and mean are often used for symmetric distributions, and for normally distributed variables about 70% of observations will be within one standard deviation of the mean and about 95% will be within two standard deviations(68–95–99.7 rule). For non-normally distributed variables it follows the three-sigma rule.

As shown below we can find that the boxplot is weak in describing symmetric observations.

Generated by this snippet of R code(borrowed from this answer):

set.seed(1)
normal <- rnorm(10000)
a_vector <- c(-3, -2.65, rep((-2:2)*.674, 5), 2.65, 3)
boxplot(normal, a_vector)


We can see that the IQR is the same for the two populations 1 and 2 but we can see the difference of the two by their means and standard deviations.

mean(normal); var(normal); mean(a_vector); var(a_vector)

-0.00653703946166382
1.02486558733286
-3.0626842058625e-17
1.95567142857143


We can see from the above case that what median and IQR cannot reflect can be obviously conveyed by the mean and variance.

References:
1. https://en.wikipedia.org/wiki/Standard_deviation

• This post is flawed. First, the standard deviation does not represent a typical deviation of observations from the mean. That would be the mean absolute deviation, $\frac{1}{n}\sum\big\vert x_i-\bar{x}\big\vert$. Second, what you're saying about 70% of the points being within one standard deviation and 95% of the points being within two standard deviations of the mean applies to normal distributions but can fail miserably for other distributions. Chebyshev's inequality bounds how many points can be $k$ standard deviations from the mean, and it is weaker than the 68-95-99.7 rule for normality.
– Dave
May 21, 2020 at 17:25
• Finally, the IQR is doing exactly what it advertises itself as doing. Your plot on the right has less variability, but that's because of the lower density in the tails. One (evidently weak) way to judge kurtosis differences is to take the ratio of the variance and the IQR. If you have a lot of variance for an IQR, high tail density could explain that.
– Dave
May 21, 2020 at 17:37
• Why do you say that it applies to non-normal distributions?
– Dave
May 22, 2020 at 0:03
• @Dave Sorry for the mistakes I made, and thank you for pointing out the error. I have updated the answer and will update it again after learning the kurtosis differences and Chebyshev's inequality. May 22, 2020 at 0:24
• All generalisations are dangerous (including this one). For example, distributions that are, or are close to, Poisson and exponential are always skewed, often highly, but for those mean and SD remain natural and widely used descriptors. (The SD is redundant if those forms are exact.) May 24, 2020 at 10:53