# Variance with minimal MSE in normal distribution

Given $X_1,...,X_n$ ~ i.i.d. $N(\mu, \sigma^2)$ where the mean is unknown, let the estimator for $\sigma^2$ be $\hat{e} = p\sum_{i=1}^n(X_i-\overline{X})^2$ How do I choose $p$ so that this estimator has the minimal mean squared error (MSE)?

I've found that $E(\hat{e}) = p\sigma^2(n-1)$

$Var(\hat{e}) = 2p^2\sigma^4(n-1)$

But I can't find the minimal square error, because everytime I try to solve for the min of $MSE = Bias^2 + Var$, it doesn't work out.

Assuming your calculations of the expectation and variance of the estimator $$\hat e = p \sum_{i=1}^n (X_i - \bar X)^2$$ are correct, then you have $$MSE = \operatorname{E}[\hat e - \sigma^2]^2 + \operatorname{Var}[\hat e] = (p(n-1) - 1)^2 (\sigma^2)^2 + 2p^2 \sigma^4 (n-1),$$ or $$MSE = \sigma^4\left((n^2-1)p^2 - 2(n-1)p + 1\right).$$ Then take the derivative with respect to $p$, set it to zero, and solve for the critical point: this gives $$p = (n+1)^{-1}.$$