# Expectation of sample mean for a population group using simple random sampling

As we know, in case of simple random sampling the sample mean, $$\bar{x}$$, is an unbiased estimator of the population mean, $$\mu$$ (for a prove, see, for example, here).

I assume a similar case can be made for the estimator of the mean of a population sub-group. Imagine, our population can be divided into two sub-groups with $$N = N_1 + N_2$$. (Here, let us also assume we do not know the population porportions $$\frac{N_1}{N}$$ and $$\frac{N_2}{N}$$.) Hence, if we draw a simple random sample (without replacement) from the entire population then $$n = n_1 + n_2$$. (Whereas $$n$$ may be known both $$n_1$$ and $$n_2$$ are random variables and thus may change from sample to sample.) Using a similar argument as for the population mean, we should then be able to show that

\begin{align} \text{E}(\bar{x_1}) &= \text{E} \left ( \frac{1}{n_1} \sum_{i=1}^{n_1} x_{1i} \right ) \\ &= \frac{1}{n_1} \sum_{i=1}^{n_1} \text{E}(x_{1i}) \\ &= \frac{1}{n_1} \sum_{i=1}^{n_1} \mu_1 \\ &= \mu_1 . \end{align}

Hence, the sample-based estimator of the population mean for sub-group 1 is unbiased. And of course, using a similr line of argument, the sample-based estimator of the population mean for sub-group 2 is unbiased, too.

Thus, we know that the sample-based estimates of $$\bar{x}$$, $$\bar{x_1}$$, and $$\bar{x_2}$$ are all unbiased. However, I also would like to show that the total sample mean, $$\bar{x}$$, is an unbiased estimator of the total population mean, $$\mu$$, when explicitly defined as the sum of the 2 domain-specific sample means, $$\bar{x} = \frac{n_1}{n} \bar{x_1} + \frac{n_2}{n} \bar{x_2}$$. The problem in this case is that we need to deal with expectations of products.

To answer, my own question I would note that

\begin{align} \bar{x} &= \frac{n_1}{n}\frac{\sum_{i=1}^{n} y_{1i}x_i}{\sum_{i=1}^{n} y_{1i}} + \frac{n_2}{n}\frac{\sum_{i=1}^{n} y_{2i}x_i}{\sum_{i=1}^{n} y_{2i}}\\ \end{align}

Here, $$y_{ji}$$ represents a dummy on whether or not sample member $$x_i$$ is part of sub-population $$j$$. Taking the expectation would of course result in

\begin{align} \text{E}(\bar{x}) &= \text{E}(\frac{n_1}{n}\frac{\sum_{i=1}^{n} y_{1i}x_i}{\sum_{i=1}^{n} y_{1i}}) + \text{E}(\frac{n_2}{n}\frac{\sum_{i=1}^{n} y_{2i}x_i}{\sum_{i=1}^{n} y_{2i}})\\ \end{align}

As aleady alluded to, the problem is that each of the two elements on the right side is the expectation of the product of two random variables. As for the first sub-sample, for example, $$\frac{n_1}{n}$$ represents a random variable (the number of sample members in sub-population 1 varies from sample to sample) and so does $$\frac{\sum_{i=1}^{n} y_{1i}x_i}{\sum_{i=1}^{n} y_{1i}}$$, which is basically the sample mean for sub-population 1.

To conclude my argument, I would now argue that $$\text{E}(XY) = \text{E}(X)\text{E}(Y)$$ if and only if $$X$$ and $$Y$$ are indepedent. In the case at hand, we can assume that the sample proportion and the sample mean are independent of each other. Therefore,

\begin{align} \text{E}(\bar{x}) &= \text{E}(\frac{n_1}{n}\frac{\sum_{i=1}^{n} y_{1i}x_i}{\sum_{i=1}^{n} y_{1i}}) + \text{E}(\frac{n_2}{n}\frac{\sum_{i=1}^{n} y_{2i}x_i}{\sum_{i=1}^{n} y_{2i}})\\ &= \text{E}(\frac{n_1}{n})\text{E}(\frac{\sum_{i=1}^{n} y_{1i}x_i}{\sum_{i=1}^{n} y_{1i}}) + \text{E}(\frac{n_2}{n})\text{E}(\frac{\sum_{i=1}^{n} y_{2i}x_i}{\sum_{i=1}^{n} y_{2i}})\\ &= \text{E}(\frac{n_1}{n})\frac{\sum_{i=1}^{n} y_{1i}\text{E}(x_i)}{\sum_{i=1}^{n} y_{1i}} + \text{E}(\frac{n_2}{n})\frac{\sum_{i=1}^{n} y_{2i}\text{E}(x_i)}{\sum_{i=1}^{n} y_{2i}}\\ &= \frac{N_1}{N}\mu_1 \frac{N_2}{N}\mu_2\\ &= \mu \end{align}

which then completes the proof. This current write up was amongst others the product of those commented on this post. I thank them very much.

• Are you using $n_1$ and $n_2$ as (binomial) random variables, with $n_1+n_2=n$ known? If so, why do you say $\text{E} (\frac{1}{n} \sum_{i=1}^{n_1} x_{1i}) \neq \frac{N_1}{N} \mu_1$? Nov 10, 2020 at 11:57
• @Henry. Thanks for the comment. I assume a simple random sample. Thus, the expectation is of a product of two random variables (i.e., e.g. $n_1$ and $\bar{x_1}$). And of course the epxectation of a product is not equal to the product of two expectations unless they are independent. Is that what you mean? Oh my god. It is so simple!
– DomB
Nov 10, 2020 at 17:47
• You assumed $n_1$ and $n_2$ are random variables, then in the first result ($\mu_1$) you can't pull $1/n_1$ out of the expectation. Nov 11, 2020 at 9:45
• @Roberto i think you are right. I edited my post to reflect this. I hope it makes sense and you do not find any mistake. Thanks for the feedback!
– DomB
Nov 12, 2020 at 9:30