Table of Contents
What Is the IQR?
The Interquartile Range (IQR) is a measure of statistical dispersion that represents the range of the middle 50% of data. It is calculated as the difference between the third quartile (Q3, 75th percentile) and the first quartile (Q1, 25th percentile).
Unlike the range which uses extreme values, the IQR is resistant to outliers, making it a robust measure of spread. It is a key component of box plots and is widely used in exploratory data analysis to understand data variability.
How to Calculate
- Sort the data in ascending order.
- Find Q1 (median of lower half).
- Find Q3 (median of upper half).
- Subtract: IQR = Q3 - Q1.
Outlier Detection
Any value below the lower fence or above the upper fence is considered a potential outlier. Values beyond Q1 - 3*IQR or Q3 + 3*IQR are extreme outliers.
| Measure | Description |
|---|---|
| Q1 | 25th percentile - splits lower 25% |
| Q2 (Median) | 50th percentile - middle value |
| Q3 | 75th percentile - splits upper 25% |
| IQR | Spread of middle 50% |
Frequently Asked Questions
Why is the IQR preferred over the range?
The range is heavily influenced by extreme values (outliers), while the IQR only considers the middle 50% of data. This makes the IQR more stable and representative of typical data spread.
How is the IQR used in box plots?
In a box plot, the box spans from Q1 to Q3, with the IQR being the box height. The whiskers typically extend to 1.5 times the IQR, and points beyond the whiskers are marked as outliers.
Can the IQR be zero?
Yes, the IQR can be zero if Q1 equals Q3, meaning at least 50% of the data values are identical. This typically happens with discrete data that has many repeated values.