# Why a variance of a sample mean is the population variance divided by a sample size?

$$Var(\overline{X})=Var(\frac{1}{n}\sum_{i=1}^{n}X_{i})=\frac{1}{n^{2}}\sum_{i=1}^{n}Var(X_{i})=\frac{1}{n^{2}}n\sigma^{2}=\frac{\sigma^{2}}{n}$$

I am confused because $$Var(X_{i})$$ is replaced by $$\sigma^{2}$$ where $$\sigma^{2}$$ is the variance of the population. I don't understand this because $$X_{i}$$ is not the population. It is a single value from a sample. Why this replacement is allowed?

• Can you give us a bit more context on the level of study you are on so any answer could be tailored to that level? Often $X_i$ represents a random variable which is an independent, identical copy of the population distribution. On the other hand $x_i$ (with little $x$) represents a realisation (single value) from the above random variable, and hence does not have a variance. Jun 23 '21 at 14:31
• @B.Liu I got my master's degree in IT a few years ago. Now I try to study some maths on my own. This question connected to sevenkul's anwser in this thread where you can find the end part of the equality again. I don't understand how we can replace a sample size with the populstion size when we replace $Var(X_{i})$ by the $\sigma^{2}$. Jun 23 '21 at 15:35
• Everything follows from the mantra "variances add."
– whuber
Jun 23 '21 at 17:06
• I have to admit I am still not entirely clear on what exactly you are confused on. Question to tease that out: What do you think $Var(X_i)$ should be in this case? Jun 23 '21 at 17:12
• @whuber I have a feeling that the OP might be confusing $\sigma^2$ with $S^2$ (or $s^2$) with their mention of sample and population. But hopefully the clarification question would help our understanding. Jun 23 '21 at 17:14

I don't understand this because $$X_i$$ is not the population.

$$X_i$$ is a random variable.

It is a single value from a sample.

No it is not. $$X_i$$ is a random variable, but $$X_i = x_i$$ is a sample.

Why this replacement is allowed?

The description in the preceding paragraph in the link you provided explains this well. Your confusion stems from what a random variable is. I suggest you have a look at this resource to understand random variables better.

• In other words $X_i$ represents drawing a ticket out of the hat, while $x_i$ represents the ticket.
– Dave
Jun 23 '21 at 14:41
• @mhdadk in some articles I see formulas for the expected value like $E(X)=\sum_{i=1}^{n}X_{i}$. In other articles this formula can look like $E(X)=\sum_{i=1}^{n}x_{i}$. When should I use random variable and when sampled value? Jun 25 '21 at 7:16
• @Tolfel you need to review your basic probability theory. Here is a good book to do this: probabilitycourse.com Jun 25 '21 at 11:12
• @mhdadk Thank you Jun 27 '21 at 17:39