When analyzing statistical data, mastering the calculation of quartiles is essential to better understand data distribution, dispersion, and outliers. The article below will delve into a detailed explanation of the interquartile range for grouped data, along with practical exercises to apply immediately. Mastering this topic will help you effectively develop data analysis skills.
What are Quartiles?
Quartiles are values used to divide a dataset into four equal parts, with each part representing 25% of the total observations. Quartiles include:

- Q1 (First Quartile): The value that separates the lowest 25% of the data from the remaining 75%.
- Q2 (Second Quartile): The median, which divides the data into two equal halves.
- Q3 (Third Quartile): The value that separates the lowest 75% of the data from the top 25%.
The difference between Q3 and Q1, known as the interquartile range, helps assess the spread of the data. When analyzing the interquartile range for grouped data, the steps involve sorting the data in ascending order and determining Q1, Q2, and Q3 based on their corresponding percentile positions.
Example: If the dataset is [5, 10, 15, 20, 25], then:
- Q1 = 10.
- Q2 = 15 (median).
- Q3 = 20.
In this case, the interquartile range is Q3−Q1=20−10=10.
Formula for Determining Quartiles in Grouped Data
Assume p is the first group where the cumulative frequency equals or exceeds n/4. For grouped data, the first quartile (Q1) can be calculated using the following formula.

Where:
- s: Lower boundary of the class containing Q1.
- n: Total frequency.
- cfp-1: Cumulative frequency before the class containing Q1.
- np: Frequency of the class containing Q1.
- h: Width of the class containing Q1.

This formula helps determine the value of Q1 and highlights the role of the interquartile range in assessing data dispersion for grouped data. The second quartile (Q2) in grouped data is essentially the median of the dataset.
Assume q is the first class where the cumulative frequency equals or exceeds 3n/4. In this case, the third quartile (Q3) for grouped data is calculated using a specific formula.

Where:
- t: Lower boundary of the class containing Q3.
- n: Total frequency.
- cfq-1: Cumulative frequency before the class containing Q3.
- nq: Frequency of the class containing Q3.
- l: Width of the class containing Q3.
These formulas help determine the interquartile range for grouped data, providing insights into the spread and dispersion of the dataset.
Significance of Quartiles in Grouped Data
Quartiles are not just computational tools but also have practical applications in data analysis:

- Assessing Data Dispersion: The interquartile range (IQR), calculated as the difference between Q3 and Q1, helps determine the spread of the data. A large IQR indicates wide dispersion, while a small IQR suggests data is more concentrated.
- Identifying Outliers: Detecting outliers provides deeper insights into variations within the dataset and helps eliminate anomalies that could skew analysis results.
- Comparing Data Groups: Quartiles allow for comparing the spread of different data groups, aiding in making informed decisions, especially when distinguishing differences between groups.
- Practical Applications in Data Analysis: Quartiles for grouped data are often used to analyze skewed datasets or those with numerous outliers.
Example Exercises on Quartiles
To help you solidify your understanding, here are specific examples and exercises on quartiles for practical application.

Example 1: Calculating the First Quartile (Q1)
Grouped Data Table:
|
Khoảng lớp |
Tần số (f) |
Tần số tích lũy (CF) |
|
10 - 20 |
5 |
5 |
|
20 - 30 |
8 |
13 |
|
30 - 40 |
12 |
25 |
|
40 - 50 |
10 |
35 |
|
50 - 60 |
5 |
40 |
Solution:
- Calculate n/4, where n=4. We have: n/4=40/4=10
- Identify the class containing Q1: The first class with CF≥10 is 20 - 30.
- Determine the values:
- Lower boundary of the class (s): 20
- Cumulative frequency before the class (cfp-1): 5
- Frequency of the class (np): 8
- Width of the class (h): 10
- Apply the formula:

Substituting the values, we get:

Result: Q1=26.25
Example 2: Calculating the Third Quartile (Q3)
Grouped Data Table:
|
Khoảng lớp |
Tần số (f) |
Tần số tích lũy (CF) |
|
5 - 15 |
6 |
6 |
|
15 - 25 |
9 |
15 |
|
25 - 35 |
12 |
27 |
|
35 - 45 |
8 |
35 |
|
45 - 55 |
5 |
40 |
Solution:
- Calculate 3n/4, where n=40. We have: 3n/4=(3*40)/4=30
- Identify the class containing Q3: The first class with CF≥30 is 35 - 45.
- Determine the values:
Lower boundary of the class (t): 35
Cumulative frequency before the class (cfq-1): 27
Frequency of the class (nq): 8
Width of the class (l): 10
- Apply the formula:

Substituting the values, we get:

Result: Q3=38.75
Through these quartile exercises, you can gain a deeper understanding of how to calculate them and their significance in data analysis. Mastering this knowledge, especially the calculation of the interquartile range for grouped data, will enable you to apply it effectively in real-world scenarios. This will help you assess data dispersion, identify outliers, and accurately compare different data groups.
