Good day. I've been trying to understand the solution for the $\sigma^2$ of the method of moment point estimator for the normal random variables $X_1, X_2,...,X_n$ of mean $\mu$ and variance $\sigma^2$. As given, the sample moments equated to the theoretical moments are :
- $$\bar{X}=\hat{\mu}=\frac{1}{n}\sum_{i=1}^nX_i$$
- $$\hat{\sigma}^2-\hat{\mu}^2=\frac{1}{n}\sum_{i=1}^nX_i^2$$
Substituting (1) to (2) and isolating $\hat{\sigma}^2, we get$
$$\sigma^2=\frac{1}{n}\sum_{i=1}^nX_i^2-\bar{X}^2$$
Which, somehow, can be simplified to this:
$$\sigma^2=\frac{1}{n}\sum_{i=1}^n(X_i-\bar{X})^2$$
I can't wrap my head around how this part happened. Am I forgetting some property of the sigma notation that allows for this to happen? Moreso, how are they able to factor the exponent out. I have tried looking it up, but nothing I found elaborates much on this, and I'm on my wit's end. Please help me understand this, and if possible, please link me up to some readings about Point Estimation and Method of Moments.