# 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)$$

It then follows that:

$$\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)$$

• You had expectations evaluating to be sample quantities. I don't think that is actually what you want. I edited, but you can always roll back if there's some reason why that would be correct (like notation not meaning what I think it does). – Glen_b Oct 8 '14 at 6:05
• I would first define the population mean by conditioning on strata. \$ E [Y]=\sum _i{E [Y|stratum=i] P [Stratum=i]}..then your calc follows – seanv507 Oct 8 '14 at 6:36
• @Glen_b, you're right about the expected value. Thanks. Do you know if any part of my logic is still flawed or poorly articulated? – mrt Oct 8 '14 at 13:12
• mrt -- My problem is I'm not 100% sure what the exact point you wish to make is, it may be slightly different from what I originally thought when I made them comment. Sean's comment would improve your answer (though it could be covered by less ambiguous notation/definitions, which is my fault). – Glen_b Oct 8 '14 at 21:27