## 4.4 Variance of $$\bar{Y}$$

SW 2.5, 3.1

Next, let’s calculate the variance of $$\bar{Y}$$. As before, we are continuing with the thought experiment of being able to repeatedly draw new samples of size $$n$$, and, therefore, we call this variance the sampling variance.

\begin{aligned} \mathrm{var}(\bar{Y}) &= \mathrm{var}\left(\frac{1}{n} \sum_{i=1}^n Y_i\right) \\ &= \frac{1}{n^2} \mathrm{var}\left(\sum_{i=1}^n Y_i\right) \\ &= \frac{1}{n^2} \left( \sum_{i=1}^n \mathrm{var}(Y_i) + \textrm{lots of covariance terms} \right) \\ &= \frac{1}{n^2} \left( \sum_{i=1}^n \mathrm{var}(Y_i) \right) \\ &= \frac{1}{n^2} \sum_{i=1}^n \mathrm{var}(Y) \\ &= \frac{1}{n^2} n \mathrm{var}(Y) \\ &= \frac{\mathrm{var}(Y)}{n} \end{aligned} Let’s go carefully through each step — these arguments rely heavily on the properties of variance that we talked about earlier. The first equality holds by the definition of $$\bar{Y}$$. The second equality holds because $$1/n$$ is a constant and can come out of the variance after squaring it. The third equality holds because the variance of the sum of random variables is equal to the sum of the variances plus all the covariances between the random variables. In the fourth equality, all of the covariance terms go away — this holds because of random sampling which implies that the $$Y_i$$ are all independent which implies that their covariances are equal to 0. The fifth equality holds because all $$Y_i$$ are identically distributed so their variances are all the same and equal to $$\mathrm{var}(Y)$$. The sixth equality holds by adding up $$\mathrm{var}(Y)$$ $$n$$ times. The last equality holds by canceling the $$n$$ in the numerator with one of the $$n$$’s in the denominator.

Interestingly, the variance of $$\bar{Y}$$ depends not just on $$\mathrm{var}(Y)$$ but also on $$n$$ — the number of observations in the sample. Notice that $$n$$ is in the denominator, so the variance of $$\bar{Y}$$ will be lower for large values of $$n$$. Here is an example that may be helpful for understanding this. Suppose that you are rolling a die. If $$n=1$$, then clearly, the variance of $$\bar{Y}$$ is just equal to the variance of $$Y$$ — sometimes you roll extreme values like $$1$$ or $$6$$. Now, when you increase $$n$$, say, to 10, then these extreme values of $$\bar{Y}$$ are substantially less common. For $$\bar{Y}$$ to be equal to $$6$$ in this case, you’d need to roll 10 $$6$$’s in a row. This illustrates that the sampling variance of $$\bar{Y}$$ is decreasing in $$n$$. If this is not perfectly clear, we will look at some data soon, and I think that should confirm to you that the variance of $$\bar{Y}$$ is decreasing in the sample size.