Question: how to calculate the variance of an estimator?
Answer: Assuming 0<σ2<∞, by definition σ2=E[(X−μ)2]. Thus, the variance itself is the mean of the random variable Y=(X−μ)2. This suggests the following estimator for the variance ˆσ2=1nn∑k=1(Xk−μ)2. By linearity of expectation, ˆσ2 is an unbiased estimator of σ2.