# Is there any restriction for numerator of variance calculation for population?

When reading things relating to the degree of freedom, I face this document.

In this document, there is one part:

Standard deviation in a population is:

I understand that when we estimate the standard, deviation in the sample, we must restrict the deviations sum to 0, but why it does not happen in the population, is it because of the randomness of the data?

• Sorry, a bit of clarification might help. What is the question, specifically? Is it "why are there no net deviation from a mean?" (As in, how can we know that Sum[x-mu] will be 0 if we could observe all individual x's for an entire population?) If so, the reason is due to construction and the definition of mu. The population mean is defined as the sum of all observations divided by the size of the population. Any fluctuation around mu must be balanced out by other deviations, otherwise mu would be different. (I suspect that isn't your question, but if you could clarify a bit it might help!) Jul 27 '21 at 1:10
• @AndrewC : the question is: why do not we have the deviation restriction for population" Jul 27 '21 at 1:43

The "deviation restriction" is not really a restriction. It's just a natural result coming from the definition of $$\bar{x}$$: $$\sum_{i=1}^{n}\left(x_{i}-\bar{x}\right)=\sum_{i=1}^{n}x_{i}-n\bar{x}\equiv0.$$ It's not something we intentionally pose on the sample variance, it's a by-product or side effect arises when we replace sample mean $$\mu$$ by its estimation $$\bar{x}$$. If we use other estimation than $$\bar{x}$$, this "restriction" will also change accordingly. Consider a different situation, that we know the true value of population mean, then variance can simply be estimated by $$n^{-1}\sum_{i=1}^{n}\left(x_{i}-\mu\right)^{2}$$, no restriction at all.

• "that we know the true value of sample mean", do you mean knowing the true value of sample mean without calculating? Jul 27 '21 at 11:12
• @BeautifulMindset Sorry, that was a typo, it should be population mean instead. Sometimes the population mean is given or assumed, hence variance becomes the only parameter of interest.
– Q9y5
Jul 27 '21 at 15:10
• But the population mean is not sample mean, so in this case we still need to calculate the sample mean, leading to the reduce of degree of freedom again? Jul 28 '21 at 2:11
• @BeautifulMindset First, computing sample mean doesn't lead to reduce of degree of freedom. The reduce comes from the step we replace $\mu$ by $\bar{x}$ in computing $\sum_{i=1}^{n}\left(x_{i}-\mu\right)^{2}$.
– Q9y5
Jul 28 '21 at 13:46
• @BeautifulMindset Anything about sample should not be our final goal. The reason we are interested in some statistics derived from sample is these statistics provide information that we can use about the population (e.g. estimation or inference). We have interest in the sample mean only when population mean is unknown to us, since sample mean can serve as a good proxy of population mean. In the case population mean is known, sample mean is useless.
– Q9y5
Jul 28 '21 at 13:49

It may be helpful here to distinguish three different statistics. The population standard deviation $$\sigma$$ is given by:

$$\sigma=\sqrt\frac{\sum_{i=1}^n(x_i-\mu)^2}{n}\qquad(1)$$ To calculate that we need to know the values of $$x_i$$ for the whole population. The standard deviation of a sample can be calculated using exactly the same formula, albeit with the $$x_i$$ being the sample data, $$\mu$$ the mean of the sample and $$n$$ the sample size. No "restriction" is needed here. Comparing the calculation of the population and sample standard deviations, therefore, the question why there is no "restriction" in the population formula does not arise.

Where the denominator is required to be $$n-1$$ rather than $$n$$ is in the common situation where we use sample data, not to find the standard deviation of the sample, but to estimate the standard deviation of the population. Thus the formula becomes (assuming the population mean is not known so must also be estimated from the sample data):

$$s=\sqrt\frac{\sum_{i=1}^n(x_i-\bar{x})^2}{n-1}\qquad(2)$$

What can possibly cause confusion here is that this formula is sometimes referred to as giving the sample standard deviation, a phrase which - to me at least - suggests the standard deviation of the sample, not an estimate of the standard deviation of the population.

Thus formula (1) is not the population equivalent of (2), and there is no reason why (1) should have $$n-1$$ in the denominator just because (2) has.