Interquartile Range
- Summarizes the spread of the middle 50% of a dataset.
- Computed from the 25th and 75th percentiles, so it is robust to extreme values.
- Commonly used alongside mean and median to characterize a distribution.
Definition
Section titled “Definition”The interquartile range (IQR) is a measure of the dispersion of a dataset. It is calculated as the difference between the 75th and 25th percentiles of a dataset. These percentiles are also known as the first and third quartiles.
Explanation
Section titled “Explanation”To compute the IQR:
- Sort the data in ascending order.
- Find the 25th percentile (first quartile) and the 75th percentile (third quartile).
- Subtract the 25th percentile from the 75th percentile.
Because the IQR uses the central 50% of the data, it is not affected by extreme values or outliers. In contrast, the range (maximum minus minimum) is greatly affected by extreme values, making the IQR a more robust measure of dispersion than the range.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Dataset: 1, 2, 3, 4, 5, 6, 7, 8, 9
Sorted: 1, 2, 3, 4, 5, 6, 7, 8, 9
25th percentile (average of 2nd and 3rd values):
75th percentile (average of 7th and 8th values):
IQR:
In this example, the IQR is 5.
Example 2
Section titled “Example 2”Dataset: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5
Sorted: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5
25th percentile (average of 2nd and 3rd values):
75th percentile (average of 7th and 8th values):
IQR:
In this example, the IQR is 2.5. If an extreme value such as 100 is added to this dataset, the IQR remains 2.5 because the extreme value does not affect the 25th and 75th percentiles.
Use cases
Section titled “Use cases”- Used in conjunction with measures of central tendency (mean, median) to provide a more complete picture of a dataset’s distribution.
- Comparing IQRs across datasets helps assess relative dispersion.
- A large IQR combined with a low median may indicate a skewed distribution; a small IQR with a high mean may indicate a more evenly distributed dataset.
Notes or pitfalls
Section titled “Notes or pitfalls”- The IQR is not affected by extreme values or outliers because those values are outside the central 50% used in the calculation.
- The range is sensitive to extreme values; the presence of outliers can greatly change the range but not the IQR.
Related terms
Section titled “Related terms”- Percentiles
- Quartiles
- Range
- Mean
- Median
- Outliers