The interquartile range (IQR) for grouped data is calculated by finding the difference between the upper quartile (Q3) and the lower quartile (Q1). Here's how to do it:
1. Find the Cumulative Frequency
- Cumulative frequency is the running total of frequencies for each class interval. Start by adding the frequency of the first class interval to the frequency of the second class interval, and continue this process until you reach the last class interval.
- Example: If the frequencies of the class intervals are 5, 8, 12, and 10, then the cumulative frequencies would be 5, 13, 25, and 35.
2. Determine the Positions of Q1 and Q3
- Q1 is the value that divides the data into the lower 25% and the upper 75%. Its position is found using the formula: Position of Q1 = (n/4), where n is the total number of observations.
- Q3 is the value that divides the data into the lower 75% and the upper 25%. Its position is found using the formula: Position of Q3 = (3n/4).
- Example: If n = 40, then the position of Q1 is (40/4) = 10, and the position of Q3 is (3*40/4) = 30.
3. Locate Q1 and Q3 in the Cumulative Frequency Table
- Q1: Find the class interval whose cumulative frequency is greater than or equal to the position of Q1. This is the class interval containing Q1.
- Q3: Find the class interval whose cumulative frequency is greater than or equal to the position of Q3. This is the class interval containing Q3.
4. Calculate Q1 and Q3
- Q1: Use the formula: Q1 = L + ((n/4 - cf)/f) c*, where:
- L is the lower limit of the class interval containing Q1.
- n is the total number of observations.
- cf is the cumulative frequency of the class interval preceding the class interval containing Q1.
- f is the frequency of the class interval containing Q1.
- c is the class width.
- Q3: Use the formula: Q3 = L + ((3n/4 - cf)/f) c*, where:
- L is the lower limit of the class interval containing Q3.
- n is the total number of observations.
- cf is the cumulative frequency of the class interval preceding the class interval containing Q3.
- f is the frequency of the class interval containing Q3.
- c is the class width.
5. Calculate the Interquartile Range
- IQR = Q3 - Q1.
Example
Class Interval | Frequency | Cumulative Frequency |
---|---|---|
10-20 | 5 | 5 |
20-30 | 8 | 13 |
30-40 | 12 | 25 |
40-50 | 10 | 35 |
- n = 35
- Position of Q1 = (35/4) = 8.75
- *Position of Q3 = (335/4) = 26.25**
- Q1: Lies in the class interval 20-30.
- L = 20, cf = 5, f = 8, c = 10
- Q1 = 20 + ((8.75 - 5)/8) 10 = 24.69*
- Q3: Lies in the class interval 30-40.
- L = 30, cf = 13, f = 12, c = 10
- Q3 = 30 + ((26.25 - 13)/12) 10 = 37.71*
- IQR = Q3 - Q1 = 37.71 - 24.69 = 13.02
Therefore, the interquartile range for this grouped data is 13.02.