The mean of grouped data with group boundaries \(c_0, c_1, \dots,
c_r\) and group frequencies \(n_1, \dots,
n_r\) is
$$\frac{1}{n} \sum_{j = 1}^r a_j n_j,$$
where
\(a_j = (c_{j - 1} + c_j)/2\)
is the midpoint of the \(j\)th interval, and
\(n = \sum_{j = 1}^r n_j\).