To find the interquartile range (IQR), follow these steps:
- Order the data from least to greatest.
- Find the median of the dataset, which divides the data into two halves.
- Find the first quartile (Q1) , which is the median of the lower half of the data (values below the overall median).
- Find the third quartile (Q3) , which is the median of the upper half of the data (values above the overall median).
- Calculate the IQR by subtracting Q1 from Q3:
IQR=Q3−Q1\text{IQR}=Q3-Q1IQR=Q3−Q1
The IQR represents the range containing the middle 50% of the data and is useful for understanding data spread and identifying outliers
Example:
Given the dataset: 2, 5, 8, 9, 12, 18, 22
- Median = 9
- Lower half = 2, 5, 8 → Q1 = 5 (median of lower half)
- Upper half = 12, 18, 22 → Q3 = 18 (median of upper half)
- IQR = 18 - 5 = 13
So, the interquartile range is 13