# Deriving the formula for the mean of a stratified sample

The formula for the mean of a stratified sample $\bar Y_s$ is:

$$\bar Y_s = \frac 1 N \sum_i N_i \bar Y_i$$

where $N$ is the sample size for all strata, and $N_i$ and $Y_i$ are the sample size and mean, respectively, for the $i$th stratum.

I understand intuitively why $\bar Y_s$ is just the sum of the stratum totals $\tau$ (where $\sum \tau = \sum N_i \bar Y_i$) divided by the sample size for all strata $N$, as this follows pretty directly from the sample mean formula $\sum \frac {Y_i}{n}$.

However, I'm confused by the following. Consider a random variable $Y_i$, which represents some estimation from the strata. If we want to account for the fact that each stratum has a different sample size, we can weight the $Y_i$ with a constant $c_i$, which represents the strata's sample sizes. The expected value of the estimation is then:

$$E(c_1Y_1 + c_2Y_2 + … + c_iY_i)$$ $$= c_1E(Y_1) + c_2E(Y_2) + … + c_iE(Y_i)$$ $$= \sum c_iE(Y_i)$$

From here, I'm not exactly certain how these steps inform/guide the derivation of the formula for $\bar Y_s$. I understand that this final formula looks a lot like the one for $\bar Y_s$. But I'm not quite sure how to make the leap in logic or to show mathematically how the two are connected.

Do I just stick the whole sum $\sum c_iE(Y_i)$ over $N$ and say that I'm averaging it? That is:

$$\sum c_iE(Y_i) \equiv \sum N_i \bar Y_i$$ $$\therefore \frac {\sum c_iE(Y_i)}{N} \equiv \frac{\sum N_i \bar Y_i}{N}$$

Any insight would be great. Thanks!

• The actual $c_i$ are $N_i/N$, the proportion of the total. So if you do it right, you're already doing that. Look carefully. – Glen_b Oct 8 '14 at 0:52
• Oooh, that's right. The weights are relative to each other and sum to equal 1. Therefore, they can't equal $N_i$ but instead should be a proportion of the total $N_i/N$. Is my thinking right, or am I missing any steps in my logic? Thanks for your response. – mrt Oct 8 '14 at 0:59
• $\bar Y_s = \frac 1 N \sum_i N_i \bar Y_i= \sum_i \frac{N_i}{N} \bar Y_i=\sum_i c_i \bar Y_i$. So $E(\bar Y_s)=\sum_i c_i E(\bar Y_i)=\sum_i c_i E(Y_i)$, where $c_i=\frac{N_i}{N}$. – Glen_b Oct 8 '14 at 1:03
• Sure, I'll give it a go. – mrt Oct 8 '14 at 1:10

Let $Y_i$ be a random variable, which represents an estimation from the strata. Assume that each stratum has different sample sizes. To account for this, each $Y_i$ is weighted with a constant $c_1$ to reflect the sample sizes of each stratum. Because the $Y_i$ are independent, $\sum c_i = 1$, where each $c_1$ is a proportion of the stratum size $N_i$ over the total sample size $N$. The expected value of the estimation is:
$$E(c_1Y_1 + c_2Y_2 + … + c_iY_i)$$ $$= c_1E(Y_1) + c_2E(Y_2) + … + c_iE(Y_i)$$ $$= \sum c_iE(Y_i)$$
$$\sum c_iE(Y_i) = \sum(\frac{N_i}{N})E(\bar Y_i) = \frac 1 N \sum N_iE(\bar Y_i) = E(Y_s)$$