I have the following question. Mostly a clarification:
I know that $Var(X)=E(X-EX)^2 =E(X^2)-(EX)^2$
I have the following problem: $X_1,...X_n $ are idd $n(\mu,\sigma^2)$. Then I am using the Method of Moments and end up with the expressions:
1) $\bar{X}=\mu$
2) $\hat{\sigma^2}=(1/n)\sum X^2_i -\bar{X^2}=(1/n) \sum(X_i-\bar{X})^2$
When I first saw that expression I just thought about the expression above. First since $E(X_i)=\mu=\bar{X}$ then I thought $(1/n)$ as a pmf and that somehow $(1/n)\sum X^2_i=E(X^2)$. But I realized this is mistaken, since the $EX^2$ assumes that X follows a normal distribution.
My question is how do I go from here: $(1/n)\sum X^2_i -\bar{X^2}$ to here $ (1/n) \sum(X_i-\bar{X})^2$
MY ATTEMPT is the following:
Apply the Expectation to the whole expression 2, and put the Xbar inside the summation: $E\hat{\sigma^2}=E[(1/n)\sum X^2_i -\bar{X^2}]=E[(1/n)\sum (X^2_i -n\bar{X^2})]$
$(1/n)[\sum E(X^2_i) -nE(\bar{X^2})]=(1/n)[\sum E(X^2_i) -n\mu^2)]$
Now this is a summation of variances so I can just use the regular formula presented above, and I will substitute $\mu^2=\bar{X^2}$, then:
$(1/n)[\sum E(X_i-\bar{X})^2]= E \hat{\sigma^2}$
Since I have expectations in both sides, I can just remove them. Is this the right approach? It seems like a long thing to just be left out.
Thanks!!