1
$\begingroup$

I am trying to calculate the approximate mean age of people that participated in a survey. I have 4 age groups: $[0,15);\,[15,35);\,[35,55)$ and $[55,75).$

For each group age I have the number of people that participated. How should I calculate the approximate mean age of people.

Thank you in advance, Mat

$\endgroup$
1

2 Answers 2

1
$\begingroup$

If you only care about the mean, you can take the mean of each group and multiply by the frequency of each group to obtain an unbiased estimator for the mean of your total sample, since the expected value operator is a linear operator. This estimator however will have larger variance.

$\endgroup$
2
  • 1
    $\begingroup$ I took it from the question that only interval boundaries and frequencies are known. If there is a way to find the means of observations in each interval (not just the midpoints as in my answer), then your method is fine. But I don't think that information is available. Interesting idea anyway. (+1) $\endgroup$
    – BruceET
    Commented May 21, 2020 at 5:27
  • 1
    $\begingroup$ @BruceET Yeah you're right, my solution is actually pretty weak as it is based on the assumption that the distribution of the data inside the intervals has a known expectation. If it this is known it is as easy as above. However you're right, if it is not then it is not as easy at all. $\endgroup$
    – Dale C
    Commented May 21, 2020 at 7:25
1
$\begingroup$

Suppose we have data as shown in the histogram below. (Of course there are no ages below $0,$ but I wanted the histogram bars to be of equal widths.)

enter image description here

Suppose we make the simplifying approximation that all ages in each of the $k = 4$ histogram bins are at the centers of their intervals. Then we get frequencies $3, 41, 51, 5$ (for $n = 100$ subjects altogether) 'located' at midpoints $7, 25, 45, 65.$

Then the sample mean can be estimated as $$\bar X \approx \frac{1}{n}\sum_{i = 1}^k f_im_i = 36.66.$$

The average was computed, using R statistical software as a calculator, as follows:

f = c(3, 41, 51, 5)
m = c(7, 25, 45, 65)
a = sum(f*m)/100;  a
[1] 36.66

Perhaps somewhat less accurately, we can approximate the sample variance as follows:

$$S^2 \approx \frac{1}{n-1}\sum_{i=1}^k f_i(m_i - \bar X)^2 = 159.358.$$

v = sum(f*(m-a)^2)/99;  v
[1] 159.358

Unless you have the original data, you can't know how accurately $\bar X$ and $S^2$ are actually estimated by these formulas. However, I simulated the heights in R, so we can check the true values. For my simulated data the approximate values happen to be quite accurate. [I suspect results in this example turned out to be a little better than usual--especially because we used only four intervals.]

set.seed(2020)  # for reproducibility
x = round(rnorm(100, 35, 10))
summary(x)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   5.00   29.00   36.00   36.09   42.25   67.00 
var(x)
[1] 124.4666

Note: (1) Some years ago when computation was more tedious than it is with modern software, it was common practice to use the formulas shown here to approximate $\bar X$ and $S^2$ for large samples. Results are usually pretty good if you use a dozen or so intervals.

(2) Some elementary statistics books (especially high-school AP statistics books) have formulas for estimating sample medians, other sample quantiles, estimating population modes from data summarized in the form of intervals and frequencies.

(3) See this related Q&A.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.