# If the empirical distribution of a sample is same as the true distribution, how shall the deviation be estimated?

Suppose we can always generate a sample $\{X_1, \dots, X_n\}$ of size $n$ for a discrete distribution, such that its empirical pmf is the same as the true pmf. One of the reason that we can have such assurance is when $X_i$ is a transform of a uniform discrete random variable $Y_i$, and we can generate a sample of $Y_i$ by deterministically enumerating the members of its range.

for example if the common distribution is a Bernoulli distribution with parameter $p$. If we can always ensure that $\sum_i X_i /n = p$, shall the deviation be estimated as ${\frac{1}{n} \sum_i (X_i - \bar{X}}^2)^{-1/2}$ or ${\frac{1}{n-1} \sum_i (X_i - \bar{X}}^2)^{-1/2}$. Normally we would prefer the latter because it is unbiased while the former isn't. But here we know exactly that $\sum_i X_i /n = p$. Will the former be better than the latter?

Thanks and regards!

• It seems a stretch to call a "deterministic enumeration" a sample. – whuber Mar 28 '13 at 17:00

The reason you divide by $n-1$ is the loss of a degree of freedom when you have to estimate the mean of the distribution. If you know the mean with certainty, then I would think that you could divide by $n$ and have an unbiased estimator.