# 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/mean-group-data
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/statistics-foundations/mean-group-data/en.mdx

Calculate mean for grouped data using class intervals and midpoints. Learn the formula with worked examples and frequency distribution tables.

---

## Mean for Grouped Data

You already know how to calculate the mean for individual data, right? Just sum up all the values and divide by the number of data points.

```math
\bar{x} = \frac{\sum x_i}{n}
```

But what if the data is presented in **groups** or **intervals**, like in a frequency distribution table? For example, test scores grouped into $$70\text{-}79$$, $$80\text{-}89$$, and $$90\text{-}100$$.

Visible text: But what if the data is presented in **groups** or **intervals**, like in a frequency distribution table? For example, test scores grouped into , , and .

When data is grouped, we **don't know the exact value** of each data point within that group. For instance, if there are $$5$$ students in the $$70\text{-}79$$ group, we don't know if their scores are exactly $$70$$, $$72$$, $$75$$, or some other value within that range.

Visible text: When data is grouped, we **don't know the exact value** of each data point within that group. For instance, if there are students in the group, we don't know if their scores are exactly , , , or some other value within that range.

## Using the Class Midpoint

Since we don't know the exact values, we use an **assumption** or **approximation**. We assume that all data points within a group are **represented by the midpoint** of that group (class interval).

The class midpoint (often symbolized as $$x_i$$) is calculated as:

Visible text: The class midpoint (often symbolized as ) is calculated as:

```math
x_i = \frac{\text{Lower Class Limit} + \text{Upper Class Limit}}{2}
```

## Formula for Mean of Grouped Data

Once we have the midpoint for each class, we can calculate the mean of the grouped data using the formula:

```math
\bar{x} = \frac{\sum (f_i \times x_i)}{\sum f_i}
```

Where:

- $$\bar{x}$$ = Mean of the grouped data
- $$f_i$$ = Frequency of the $$i$$
  -th class (how many data points are in that group)
- $$x_i$$ = Midpoint of the $$i$$
  -th class
- $$\sum (f_i \times x_i)$$ = Sum of the products of the frequency
  and midpoint for each class
- $$\sum f_i$$ = Sum of all frequencies (equal to the total number
  of data points, $$n$$)

Visible text: - = Mean of the grouped data
- = Frequency of the 
 -th class (how many data points are in that group)
- = Midpoint of the 
 -th class
- = Sum of the products of the frequency
 and midpoint for each class
- = Sum of all frequencies (equal to the total number
 of data points, )

## Example: Average Shoe Size

Consider the grouped data for shoe sales at Store A:

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

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

**Steps to calculate the Mean:**

1.  **Find the Midpoint ($$x_i$$) for each class:**

    - Class $$37\text{-}39$$: $$x_1 = (37+39)/2 = 38$$
    - Class $$40\text{-}42$$: $$x_2 = (40+42)/2 = 41$$
    - Class $$43\text{-}45$$: $$x_3 = (43+45)/2 = 44$$
    - Class $$46\text{-}48$$: $$x_4 = (46+48)/2 = 47$$

2.  **Multiply Frequency by Midpoint ($$f_i \times x_i$$) for each class:**

    - Class $$37\text{-}39$$: $$2 \times 38 = 76$$
    - Class $$40\text{-}42$$: $$11 \times 41 = 451$$
    - Class $$43\text{-}45$$: $$16 \times 44 = 704$$
    - Class $$46\text{-}48$$: $$1 \times 47 = 47$$

3.  **Sum all the products ($$\sum (f_i \times x_i)$$):**

    
    
    ```math
    \sum (f_i \times x_i) = 76 + 451 + 704 + 47 = 1278
    ```

4.  **Sum all frequencies ($$\sum f_i$$):**

    
    
    ```math
    \sum f_i = 2 + 11 + 16 + 1 = 30
    ```

5.  **Calculate the Mean ($$\bar{x}$$):**

    
    
    ```math
    \bar{x} = \frac{\sum (f_i \times x_i)}{\sum f_i} = \frac{1278}{30} = 42.6
    ```

Visible text: 1. **Find the Midpoint () for each class:**

 - Class : 
 - Class : 
 - Class : 
 - Class : 

2. **Multiply Frequency by Midpoint () for each class:**

 - Class : 
 - Class : 
 - Class : 
 - Class : 

3. **Sum all the products ():**

 
 

4. **Sum all frequencies ():**

 
 

5. **Calculate the Mean ():**

**Therefore, the average shoe size sold at Store A is $$42.6$$.**

Visible text: **Therefore, the average shoe size sold at Store A is .**

Remember, this result is an **estimate** of the mean because we use midpoints to represent the data within each group. However, this is the standard and most common way to calculate the mean for grouped data.