What Is the Interquartile Range (IQR)?
We already know how to find the mean of data. But sometimes, the mean alone isn't enough to describe the data. Imagine two groups of friends with the same average age, but when you look closer, the age spread within each group is very different.
This is where the Interquartile Range (IQR) comes in handy! The IQR is a measure of data spread that focuses on the middle 50% of the data after it has been sorted.
Why focus on the middle? Sometimes data has values at the extremes (too small or too large, called outliers) that can make other spread measures (like the Range) less accurate. The IQR is more "resistant" to these extreme values.
The IQR formula is super simple:
- is the Upper Quartile (the value marking the bottom 75% of the data).
- is the Lower Quartile (the value marking the bottom 25% of the data).
So, the IQR is the difference between the upper and lower quartiles.
Comparing Age Spreads
To make it clearer, let's look at an example.
There are two groups, each with 12 people. Let's look at their age data in the table below:
Data Point # | Group One | Group Two |
---|---|---|
1 | 13 | 1 |
2 | 14 | 3 |
3 | 15 | 4 |
4 | 15 | 5 |
5 | 16 | 7 |
6 | 16 | 8 |
7 | 17 | 12 |
8 | 17 | 27 |
9 | 17 | 28 |
10 | 17 | 29 |
11 | 17 | 32 |
12 | 18 | 36 |
Let's calculate some statistics for these two groups.
Calculating Mean, Q1, and Q3
-
Mean (Average):
If you calculate the average age for both groups, the result is exactly the same, 16 years old.
Group 1:
Group 2:
-
Quartiles ( and ):
After sorting the data (as in the table above), we find the positions of the quartiles.
Group One (): The position of is at data point . This means is between the 3rd (15) and 4th (15) data points. Since both values are the same, then
The position of is at data point . This means is between the 9th (17) and 10th (17) data points. Since both values are the same, then
Group Two (): The position of is at data point 3.25. This means is between the 3rd (4) and 4th (5) data points. In this case, we can take the average of these two data points:
The position of is at data point 9.75. This means is between the 9th (28) and 10th (29) data points. Similarly, we take their average:
Calculating Range and IQR
Now let's calculate the measures of spread.
-
Range:
Range = Maximum Value - Minimum Value
-
Range Group One = 18 - 13 = 5
-
Range Group Two = 36 - 1 = 35
Wow, the ranges are very different! Group Two's data is much more spread out when looking at the extreme values.
-
-
Interquartile Range (IQR):
IQR =
-
IQR Group One = 17 - 15 = 2
-
IQR Group Two = 28.5 - 4.5 = 24
The IQRs are also very different!
-
Interpreting the Results
Let's summarize in a table for easy comparison:
Group | Mean | Range | Interquartile Range (IQR) | ||
---|---|---|---|---|---|
One | 16 | 15 | 17 | 5 | 2 |
Two | 16 | 4.5 | 28.5 | 35 | 24 |
- Both groups have the same Mean (average) age, which is 16.
- But their Range and IQR are very different.
- Group One has a small Range (5) and a very small IQR (2). This means the ages of people in Group One are very close together, especially the middle 50%, whose ages only differ by 2 years (). The data is clustered around the mean.
- Group Two has a large Range (35) and a large IQR (24). This means the ages of people in Group Two are much more spread out. Even the middle 50% spans 24 years (). The data is not as clustered as Group One.
Even if the average is the same, the spread of the data can be very different. IQR helps us see how spread out the middle part of the data is, giving a better picture of data variation than just looking at the mean or range, especially when there are extreme values.