# Can we make a better estimate of the variance given that the distribution is known?

When we have a sample of numbers, say

-69, 153, -54, 54, -198, -242, -63, 87, -45, -134, ...

we can calculate an estimation of the variance using the formula

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

now this formula applies to any sequence of numbers, regardless of its underlying distribution. But what if we know that these numbers are sampled from a normal distribution, can we provide a better estimate of the variance? And/or if we know the true mean?

• Define what you mean by "better" for an estimator. Feb 7 at 15:45
• @user10354138 If I generated these numbers using some code, I want it to be closer to the variance I used to actually generate them. Feb 7 at 15:50
• Now define "closer". Hint: you might want to look at Estimation theory for the many different ways to measure "closeness". Feb 7 at 16:00
• @user10354138 just closer... the difference x_pred - x_true is smaller... Feb 7 at 16:03
• You still haven't define what "closer" mean in this context, since x_pred (and hence x_pred - x_true) is a random variable. Does, for example, getting closer with 51% probability count when the other 49% are way off? Define it exactly which number (yes, a single number not a random variable) you are going to (try to) minimise. Feb 7 at 16:21

If the sample is known to be iid from a normal distribution with unknown mean and variance then $$\hat{\sigma^2}$$ is the Uniform Minimum Variance Estimator of $$\sigma^2$$.
If $$\mu$$ is known, then replace $$\bar{x}$$ by $$\mu$$ and delete the $$-1$$ in the denominator. That will be the UMVUE in that scenario.
If you don't know $$\sigma^2$$, but have correct knowledge about what it might be (a prior distribution), then the posterior mean of $$\sigma^2$$ will be biased but have smaller mean-squared error than the UMVUE.