Calculating the variance of an i.i.d variable Here is the data I have for a variable:
X = [420 450 420 380 440 380 360 360]
I'm told that X is i.i.d with mean = 390. How do I go about estimating variance? Would it simply be:
(Σ(x – xbar) ^2 )/(N) 
= (Σ (Xi - 390)^2)/8
= 1237.5?
 A: Population mean unknown. If you are not given the population mean $\mu$, then use the formula that includes the sample mean and divides by $n - 1.$ (That's $S_1^2$ in the comment from @Ian.)
I got $\bar X = 401.25$ and $S^2 = 1269.643$.
Population mean known. But it seems you are given $\mu = 390.$ Then you need to use the formula that includes $\mu$ and divides by $n.$ (That's $S_2^2$ in the comment.)
For that, I got  1237.5, which agrees with the number in your question.
(However, the first and second expressions in what you wrote are not
equal because you have $\bar X$ in one and $\mu$ in the other.)
In case this is an advanced course. If the data come from a normal population with mean $\mu = 390,$ then the second method is
best. It will have the lower variance because it uses the true population mean rather than estimating it. If you want to make a confidence
interval for the population variance $\sigma^2$ or test a hypothesis about
the population variance, then use $n\sum_{i=1}^n (X_i - \mu)^2/\sigma^2 \sim CHISQ(n).$
