# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/statistics-foundations/median-mode-group-data
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/statistics-foundations/median-mode-group-data/en.mdx

Learn to find median and modal class in grouped data with formula practice. Learn frequency tables and cumulative calculations for statistics.

---

## Modal Class for Grouped Data

For grouped data, we usually don't find a specific Mode value, but instead, we focus on finding the **Modal Class**.

The **Modal Class** is the class interval that has the **highest frequency**. Simply put, just find the group with the most data points.

**Example:**

Store A's shoe size data:

| Shoe Size (Class Interval) | Frequency ($$f_i$$) |
| :------------------------- | :------------------------------------ |
| $$37\text{-}39$$ | $$2$$               |
| $$40\text{-}42$$ | $$11$$              |
| $$43\text{-}45$$ | $$16$$ (Highest Frequency) |
| $$46\text{-}48$$ | $$1$$               |
| **Total**                  | $$30$$              |

Visible text: | Shoe Size (Class Interval) | Frequency () |
| :------------------------- | :------------------------------------ |
| | |
| | |
| | (Highest Frequency) |
| | |
| **Total** | |

Look at the frequency column. The highest frequency is $$16$$. The class interval with this frequency is $$43\text{-}45$$.

Visible text: Look at the frequency column. The highest frequency is . The class interval with this frequency is .

Thus, the **Modal Class** for this data is $$43\text{-}45$$. This means the most frequently sold shoe size is likely within this range.

Visible text: Thus, the **Modal Class** for this data is . This means the most frequently sold shoe size is likely within this range.

## Median for Grouped Data

Finding the Median (middle value) for grouped data is a bit more complex than finding the modal class. Since the data is grouped, we need to use an estimation formula to find approximately where the middle value lies.

### How to Find the Median for Grouped Data

1.  **Calculate Median Position:**

    First, find the position of the middle data point using the formula $$n/2$$, where $$n$$ is the total number of data points.

2.  **Create Cumulative Frequency:**

    Add a column to the frequency distribution table for Cumulative Frequency ($$F_k$$). Cumulative frequency is the sum of frequencies from the first class up to the current class.

3.  **Determine the Median Class:**

    Find the class interval where the $$n/2$$-th data point lies. Look at the Cumulative Frequency column. The Median Class is the first class whose Cumulative Frequency is **equal to or greater than** $$n/2$$.

4.  **Use the Median Formula:**

    Once the Median Class is found, use the following formula:

    
    
    ```math
    Me = L + \left( \frac{\frac{n}{2} - F}{f_{me}} \right) \times c
    ```

    Where:

    - $$Me$$ = Median of the grouped data
    - $$L$$ = **Lower Boundary of the Median Class**. This is the
      true lower limit of the class where the median lies. Calculated as:{" "}

      
      
      ```math
      L = \text{Lower Limit of Median Class} - 0.5
      ```

    - $$n$$ = Total number of data points (total frequency)
    - $$F$$ = **Cumulative Frequency BEFORE** the Median Class
    - $$f_{me}$$ = **Frequency of the Median Class** (the frequency
      of the class containing the median)
    - $$c$$ = **Class Width**. This is the width of each class
      interval. Common calculation method:

      
      
      ```math
      c = \text{Upper Class Boundary} - \text{Lower Class Boundary}
      ```

      (where $$\text{Upper Boundary} = \text{Upper Limit} + 0.5$$).

Visible text: 1. **Calculate Median Position:**

 First, find the position of the middle data point using the formula , where is the total number of data points.

2. **Create Cumulative Frequency:**

 Add a column to the frequency distribution table for Cumulative Frequency (). Cumulative frequency is the sum of frequencies from the first class up to the current class.

3. **Determine the Median Class:**

 Find the class interval where the -th data point lies. Look at the Cumulative Frequency column. The Median Class is the first class whose Cumulative Frequency is **equal to or greater than** .

4. **Use the Median Formula:**

 Once the Median Class is found, use the following formula:

 
 

 Where:

 - = Median of the grouped data
 - = **Lower Boundary of the Median Class**. This is the
 true lower limit of the class where the median lies. Calculated as:{" "}

 
 

 - = Total number of data points (total frequency)
 - = **Cumulative Frequency BEFORE** the Median Class
 - = **Frequency of the Median Class** (the frequency
 of the class containing the median)
 - = **Class Width**. This is the width of each class
 interval. Common calculation method:

 
 

 (where ).

**Example:**

Let's use Store A's shoe size data.

| Shoe Size | Frequency ($$f_i$$) | Cumulative Frequency ($$F_k$$) |
| :-------- | :------------------------------------ | :----------------------------------------------- |
| $$37 - 39$$ | $$2$$ | $$2$$ |
| $$40 - 42$$ | $$11$$ | $$2 + 11 = 13$$ |
| $$43 - 45$$ | $$16$$ ($$f_{me}$$) | $$13 + 16 = 29$$ |
| $$46 - 48$$ | $$1$$ | $$29 + 1 = 30$$ |
| Total     | $$n = 30$$          |                                                  |

Visible text: | Shoe Size | Frequency () | Cumulative Frequency () |
| :-------- | :------------------------------------ | :----------------------------------------------- |
| | | |
| | | |
| | () | |
| | | |
| Total | | |

1.  **Median Position:** $$n/2 = 30/2 = 15$$. We are looking for the $$15$$th data point.
2.  **Cumulative Frequency:** Already created in the table.
3.  **Median Class:** Look at $$F_k$$. Where does the $$15$$th data point fall? The $$F_k$$ of the first class ($$2$$) is not enough. The $$F_k$$ of the second class ($$13$$) is also not enough. The $$F_k$$ of the third class ($$29$$) exceeds $$15$$. So, the median class is $$43\text{-}45$$.
4.  **Calculate Formula Components:**

    - Median Class is $$43\text{-}45$$
    - $$L$$ (Lower Boundary) is $$43 - 0.5 = 42.5$$
    - $$n/2 = 30/2 = 15$$
    - $$F$$ ($$F_k$$ before median class) = $$13$$
    - $$f_{me}$$ (Frequency of median class) = $$16$$
    - $$c$$ (Class width) = $$\text{Upper Boundary} - \text{Lower Boundary}$$

      
      
      ```math
      c = (45 + 0.5) - (43 - 0.5) = 45.5 - 42.5 = 3
      ```

5.  **Plug into the Median Formula:**

    <MathContainer>
      
    
    ```math
    Me = 42.5 + \left( \frac{15 - 13}{16} \right) \times 3
    ```

      
    
    ```math
    Me = 42.5 + \left( \frac{2}{16} \right) \times 3
    ```

      
    
    ```math
    Me = 42.5 + \left( \frac{1}{8} \right) \times 3
    ```

      
    
    ```math
    Me = 42.5 + \frac{3}{8}
    ```

      
    
    ```math
    Me = 42.5 + 0.375
    ```

      
    
    ```math
    Me = 42.875
    ```

    </MathContainer>

Visible text: 1. **Median Position:** . We are looking for the th data point.
2. **Cumulative Frequency:** Already created in the table.
3. **Median Class:** Look at . Where does the th data point fall? The of the first class () is not enough. The of the second class () is also not enough. The of the third class () exceeds . So, the median class is .
4. **Calculate Formula Components:**

 - Median Class is 
 - (Lower Boundary) is 
 - 
 - ( before median class) = 
 - (Frequency of median class) = 
 - (Class width) = 

 
 

5. **Plug into the Median Formula:**

 <MathContainer>
 
 

 
 

 
 

 
 

 
 

 
 

 </MathContainer>

**So, the Median of the shoe size data is approximately $$42.875$$.** This means if all the data were sorted, the middle value is estimated to be $$42.875$$.

Visible text: **So, the Median of the shoe size data is approximately .** This means if all the data were sorted, the middle value is estimated to be .

Remember, just like the [Mean for grouped data](/en/subjects/mathematics/statistics-foundations/mean-group-data), the Median for grouped data is also an **estimation** of the true middle value.