maximum likelihood - estimate $\sigma^2$ in $N(0,\sigma^2)$ Prove, using maximum likelihood, the estimation of $\sigma^2$ where $X$ is $N(0,\sigma^2)$
There is no real statistics involved, just algebra and finding partial derivatives, so I tagged it algebra and calculus as well.
$S_{xx}=n$ is obviously wrong.
Attempt


 A: You need
$$
\frac{d}{d\sigma}\left(-n\log\sigma- \frac 1 2 \sigma^{-2} \sum_{i=1}^n x_i^2\right).
$$
(I've written $x_i$ where you have $x_i-\mu$ since in this case it is known that $\mu=0$.)
The derivative is
$$
\frac{-n}{\sigma} +\sigma^{-3} \sum_{i=1}^n x_i^2.
$$
That differs from what you have.
$$
\frac{d}{d\sigma} \sigma^{-2} = -2\sigma^{-3}.
$$
A: When the variance is unknown, you might want to estimate the variance $\sigma^2$ , or to estimate the standard deviation $\sigma$ and the square it. Sometimes the result is the same, sometimes it's not. For Maximum Likelihood it happens to be the same. But, anyway, it's good to state it clearly firsthand: which is the parameter I'm estimating?  If it's $\sigma^2$ (as you are asked here) then you should treat that as a single variable, forget about the square, think of the whole $\sigma^2$ as a single symbol, or redefine it by some letter, say $s=\sigma^2$ and estimate $s$. Then we'd have:
$$\log L(s) =  -\frac{n}{2} \log(s) + c- \frac{1}{2} \frac{ \sum x_i^2}{s} $$
where $c$ does not depend on $s$. So, derivating with respect to $s$ and equating to zero:
$$ -\frac{n}{2} \frac{1}{s} + \frac{1}{2} \frac{ \sum x_i^2}{s^2} = 0 \implies s = \frac{\sum{x_i^2}}{n}$$
So $\hat {\sigma^2}=\frac{\sum{x_i^2}}{n}$ as expected.
Notice that you could also estimate $\sigma$ (as done in MichaelHardy's answer) and square it, and the result happens to be the same. But in general (outside ML), "to estimate the variance" is one thing and "to estimate the standard deviation and square it" is another different thing.
