Given $X_1,X_2,\ldots,X_n\sim N(\mu,\sigma^2)$ when given $\sigma^2=1$. We are interested in an estimation of mean squared $g(\mu)=\mu^2$. We consider the following estimator: $\hat{g}=\overline{X}^2$. Find $E_{\mu}\overline{X}^2-\mu^2=$.
My guess was that it will be $\mu-\mu^2$ but in my textbook the answer states that $1/n+\mu^2-\mu^2$. Why is that?
You need to use the definition of variance:
$$ Var[\bar{X}] = E[\bar{X}^2] - E[\bar{X}]^2$$
This means
$$ E[\bar{X}^2] = Var[\bar{X}] + E[\bar{X}]^2$$
So you just need the two values on the right side of that equation. Expectation is linear, so:
$$E[\bar{X}] = E[X] = \mu$$
And assuming your variables are independent:
$$ Var[\bar{X}] = \frac{Var[X]}{n} = \frac{1}{n}$$
This gives you the answer you want