# Comparing answers from an estimated variance, help

Exercise: Suppose a random sample of size n is drawn from a normal pdf where the mean $\mu$ is known ut the variance $\sigma^{2}$ is unknown. Use the method of maximun likelihood to find a formula for $\hat \sigma^2$ Compare your answer to the maximun likelihood estimator found in Example $5.2.4$

I already this this problem, and I got $\hat\sigma^2_ = \frac{1}{n}\Sigma_{i= 1}^{n} (y_i - \mu)^2$.

And that is the book's answer, so it is correct. But it does not mention the comparison.I need to compare my answer to the answer given in Example 5.2.4

This is what example 5.2.4 says

Example $5.2.4$ Suppose a random sample of size $n$ is drawn from the two-parameter normal pdf $f_Y(y; \mu, \sigma^2) = \frac{1}{\sqrt(2\pi) \sigma}e^{\frac{(y_{i} - \mu)}{2\sigma^2}}$

Use the method of maximun likelihood to find formulas for $\mu_e$ and $\sigma^2_e$.

Answers for Example $5.2.4$ are 1) $\mu_e = \frac{1}{n}\Sigma_{i= 1}^{n}y_i = \bar y$

and 2) $\sigma^2_e = \frac{1}{n}\Sigma_{i= 1}^{n} (y_i - \bar y)^2$.

The answers look the same, so I would compare them as being identical. However, I don't know if it's ok to assume that. Can anyone please compare the answers? Thank you

They are not identical because $\bar y$ is the sample mean, not the true mean. The formulas are what you expect, but since in 5.2.4 the true mean is not known, the obvious thing to do (substitute the random sample mean) turns out to be correct.