Interquartile Range
Statistics & ProbabilityThe interquartile range (IQR) is the difference between the third and first quartiles, measuring the spread of the middle 50% of a dataset.
Formula
\text{IQR} = Q_3 - Q_1
Definition
The interquartile range (IQR) measures the spread of the middle half of a dataset. It is the distance between the 25th percentile and the 75th percentile.
Example
Test scores ordered: $60$, $65$, $70$, $75$, $80$, $85$, $90$, $95$. $Q_1 = 67.5$, $Q_3 = 87.5$. $\text{IQR} = 87.5 - 67.5 = 20$. The middle $50\%$ of scores span $20$ points.
Key Insight
The IQR is like the range but ignores the extremes. It only measures the spread of the middle half, so outliers do not affect it.
Definition
The $\text{IQR} = Q_3 - Q_1$ is the range of the central $50\%$ of data. It is a robust measure of variability, unaffected by outliers. The IQR is used in box plots and the standard outlier detection rule: values below $Q_1 - 1.5 \cdot \text{IQR}$ or above $Q_3 + 1.5 \cdot \text{IQR}$ are flagged as outliers.
Example
Housing prices (thousands): $Q_1 = \$180K$, $Q_3 = \$340K$. $\text{IQR} = \$160K$. Outlier fences: lower $= 180-240 = -\$60K$ (no lower outlier possible), upper $= 340+240 = \$580K$. Any home above $\$580K$ is an outlier.
Key Insight
The IQR is to the range what the median is to the mean: both are robust alternatives that resist distortion by extreme values.
Definition
The $\text{IQR} = F^{-1}(0.75) - F^{-1}(0.25)$, where $F^{-1}$ is the quantile function. For a normal distribution, $\text{IQR} = 2(0.6745)\sigma$, approximately $1.35\sigma$. This relationship allows estimation of $\sigma$ from the IQR: $\hat{\sigma} = \text{IQR}/1.35$, the basis of the robust scale estimator.
Example
The normalized IQR ($NIQR = \text{IQR}/1.35$) is a robust estimator of $\sigma$ that has $15\%$ asymptotic efficiency relative to $s$ for normal data but outperforms $s$ for heavy-tailed distributions. The MAD (median absolute deviation) is an even more robust alternative.
Key Insight
Rousseeuw and Croux (1993) proposed $S_n = 1.1926 \cdot \text{median}_i(\text{median}_j(|x_i-x_j|))$ as a highly robust scale estimator with $58\%$ efficiency for normal data, extending the IQR's robustness properties while improving efficiency.