This topic covers how to calculate the mean for raw data, frequency tables and grouped data, including formulas and worked examples. All math is rendered with MathJax.
The mean is a measure of central tendency â it gives the average value of a set of data.
For a set of data values \( x_1, x_2, x_3, \dots, x_n \), the mean is \[ \bar{x} = \frac{x_1 + x_2 + \cdots + x_n}{n} \] where \(n\) is the number of data values.
If data are presented in a frequency table with values \(x\) and frequencies \(f\):
| x | f |
|---|---|
| 1 | 3 |
| 2 | 5 |
| 3 | 2 |
The mean is given by: \[ \bar{x} = \frac{\sum fx}{\sum f} \]
For grouped data (e.g. class intervals), the mean is estimated using midpoints.
| Class Interval | Midpoint \(x\) | Frequency \(f\) |
|---|---|---|
| 0â10 | 5 | 3 |
| 10â20 | 15 | 4 |
| 20â30 | 25 | 3 |
Use the same formula: \[ \bar{x} = \frac{\sum fx}{\sum f} \]
When the numbers are large, it's often easier to use coding. Choose an assumed mean \(A\) and define \[ y = \frac{x - A}{c} \] where \(c\) is a class width or convenient scaling factor. Then \[ \bar{x} = A + c\bar{y} \] where \(\bar{y} = \frac{\sum fy}{\sum f}\).
| Data Type | Formula for Mean |
|---|---|
| Raw Data | \(\displaystyle \bar{x} = \frac{\sum x}{n}\) |
| Frequency Table | \(\displaystyle \bar{x} = \frac{\sum fx}{\sum f}\) |
| Grouped Data | \(\displaystyle \bar{x} \approx \frac{\sum f(\text{midpoint})}{\sum f}\) |
| Coding Method | \(\displaystyle \bar{x} = A + c\bar{y}\) |