Why the standard error of the mean never gets to zero even when the sample has the same size as the population? Why, when we calculate the standard error of the mean for a hypothetical sample with the same size as the population, the value is not equal to zero, if the sample in this case is identical to the population?
 A: If the sample has the same size as the population, either some units from the population are sampled multiple times, or the sample is in fact the whole population.
In the former case, the sample mean provides an estimate of the population mean, in which case a different sample would likely yield a different estimate of the population mean. Thus, the standard error of the estimate should be greater than zero (unless the sample has zero variance, of course).
In the latter case, there is no need to estimate the population mean, because the population mean can simply be calculated. This statistic has a variance of zero; it will not vary if we sample again using the same sampling procedure. Thus, the standard error is zero in that case.
A: When sampling from finite population, the standard error of the mean $\frac{\sigma}{\sqrt{n}}$ must me multiplied with the finite population correction (FPC) $\sqrt{\frac{N - n}{N - 1}}$ where $N$ is the population size and $n$ the sample size. Hence, the corrected standard error of the mean is:
$$
\frac{\sigma}{\sqrt{n}}\sqrt{\frac{N - n}{N - 1}}
$$
and because $\lim_{n\rightarrow N}\sqrt{\frac{N - n}{N - 1}} = 0$, the standard error of the mean goes to zero, as the other posts explained.
Note that if you work with the sample variance using Bessel's correction ($n-1$) then the FPC is $\sqrt{\frac{N-n}{N}}$ (see here for a derivation).
A: The reason that this does not happen is that we apply formula's that assume that the sample size is much smaller than the population size.

A sample is often regarded as taken from an infinite population and, when used as an estimate for the mean of the population, the estimate of the mean of the population has an estimated variance of $$ \text{var}(\bar{x})  = \frac{1}{n-1} \sum (y_i - \bar{y} )^2  $$
This assumes that the population can be regarded as infinite. When this assumption is false then this formula is not correct. And it is also incorrect to state that the variance does not get to zero.
When you estimate the mean of a finite population and you get to sample the entire population, then you can determine the population mean with 100% accuracy and the standard error should be zero.
