# Nakafa Framework: LLM
URL: /en/subject/high-school/10/mathematics/statistics/quartile-data-group
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/10/mathematics/statistics/quartile-data-group/en.mdx
Output docs content for large language models.
---
export const metadata = {
  title: "Quartiles for Grouped Data",
  description: "Learn quartile calculations for grouped data with interpolation methods. Master Q1, Q2, Q3 positions using cumulative frequency and class boundaries.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "04/22/2025",
  subject: "Statistics",
};
## How to Find Quartiles in Grouped Data
For single data, we just sort it and find the middle position. Now, if the data is grouped in a frequency table (like test scores grouped as 70-79, 80-89, etc.), the method is slightly different. We don't know the exact value of each data point, only how many data points are in each group (class interval).
Similar to the [median for grouped data](/subject/high-school/10/mathematics/statistics/median-mode-group-data), to find quartiles (, , ), we also use **interpolation**. Essentially, we "estimate" the quartile's position within the class interval where it falls.
We determine the position of the quartile using this formula:
- Position of  = the -th data point
- Position of  = the -th data point (or -th)
- Position of  = the -th data point
Where  is the total number of data points.
## Steps to Find the Value of Quartiles for Grouped Data
Let's assume we have shoe sales data from Store A in a grouped frequency table format.
### Create a Cumulative Frequency Table
First, we need a frequency table with a cumulative frequency column (). Cumulative frequency is the sum of frequencies from the first class up to that class. This is important to know which class the quartile falls into.
For example, here is the shoe sales table:
| Shoe Size | Frequency () | Cumulative Frequency () | Lower Boundary () | Upper Boundary () | Class Width () |
| :-------: | :---------------------------------: | :----------------------------------------------: | :----------------------------------------: | :----------------------------------------: | :-----------------------------------: |
|   37-39   |                  2                  |                        2                         |             |             |                   3                   |
|   40-42   |                 11                  |                        13                        |             |             |                   3                   |
|   43-45   |                 10                  |                        23                        |             |             |                   3                   |
|   46-48   |                  5                  |                        28                        |             |             |                   3                   |
|   49-51   |                  2                  |                        30                        |             |             |                   3                   |
| **Total** |               **30**                |                                                  |                                            |                                            |                                       |
Lower boundary = lower limit - 0.5
Upper boundary = upper limit + 0.5
Class width = Upper boundary - Lower boundary
### Determine the Quartile Class Position
First, let's find the position of the data point for the quartile.
Total data () = 30.
- **Position of :** the -th data point.
  Look at the  column. Which class contains the 7.5th data point? The first class has  (not enough). The second class has  (data points 3 through 13 are here). So, the 7.5th data point is in the **40-42** class.
- **Position of  (Median):** the -th data point.
  Look at . The 15th data point is in the **43-45** class (because the previous  was 13, and this class's  is 23).
- **Position of :** the -th data point.
  Look at . The 22.5th data point is also in the **43-45** class (because the previous  was 13, and this class's  is 23).
### Calculate the Quartile Value using the Interpolation Formula
Once we know the class, we use this formula to find the exact value:
Where:
-  = Value of the i-th Quartile (what we're looking for)
-  = Lower boundary of the i-th quartile class
-  = Total frequency
-  = Cumulative frequency **BEFORE** the i-th quartile
  class
-  = Frequency of the i-th quartile class
-  = Class width
## Finding Q1 for Shoe Sales
Let's calculate  from the table above.
1.  **Position of :** 7.5th data point.
2.  **Class of :** 40-42.
3.  **Let's gather the ingredients:**
    - Lower boundary of  class () = 39.5
    - Total data () = 30
    - Cumulative frequency before  class () = 2 (see  for class 37-39)
    - Frequency of  class () = 11
    - Class width () = 3
4.  **Plug into the formula:**
    
      
      
      
      
      
      
    
So, the value of  is 41. This means about 25% of the shoes sold are size 41 or smaller.
## Exercise
Try calculating  from the shoe sales data in the table above.
After getting the result, compare it with the method for finding quartiles for single data learned earlier. What's the difference, and why might the results be similar or different?
### Answer Key
1.  **Position of :** 22.5th data point.
2.  **Class of :** 43-45.
3.  **Gather the ingredients:**
    -  = 42.5 (lower boundary of  class)
    -  = 30 (total data)
    -  = 13 (see  for class
      40-42)
    -  = 10 (frequency of  class)
    -  = 3 (class width)
4.  **Plug into the formula:**
    
      
      
      
      
      
      
    
So, the value of  is 45.35. This means about 75% of the shoes sold are size 45.35 or smaller (or 25% are sold in sizes larger than 45.35).
**Comparison with Single Data:**
Finding quartiles for grouped data uses **interpolation** because we don't know the exact value of each data point, only its range. The result is an estimated quartile value.
For single data, we can directly point to which data point is the quartile (or the average of two data points), so the result is more precise (if the data is indeed single). Quartiles for grouped data provide a good overview for large datasets that have already been grouped.