Maximum likelihood estimator for $\mu=\sigma^2=\phi$ I got a question about maximum likelihood estimators. I have for independent normally distributed stochastic variable found the maximum likelihood estimators $\hat{\mu}=\frac{1}{n} \sum_{i=1}^n y_i$ and $\hat{\sigma^2}=\frac{1}{n}\sum_{i=1}^{n}(y_i-\mu)^2$ and then I have to compare these with the likelihood estimator when we have that $\sigma^2=\mu=\phi$ as I have found as $\hat{\phi}(Y_1,...,Y_n)=\frac{-n+\sqrt{n^2 +4n \sum_{i=1}^{n}Y_i}}{2n}$. How will you compare the two results?
 A: When choosing among unbiased estimators one often chooses the
one with the smallest variance.
Consider estimators $A = \bar X = \frac 1n\sum_{i=1}^n X_i$
and $V = S^2 = \frac{1}{n-1}\sum_{i=1}^n (X_i-\bar X)^2.$
One can show that $E(A) = \mu,$ $Var(A) = \sigma^2/n,$
and that $\frac{(n-1)S^2}{\sigma^2} \sim \mathsf{Chisq}(n-1),$
so that $E(V) = \sigma^2,$ and $Var(V) = \frac{\sigma^4}{(n-1)^2}Var(\mathsf{Chisq}(n-1)) = \frac{\sigma^4}{(n-1)^2}[2(n-1)]
= 2\sigma^4/(n-1).$
In your example, suppose $n = 9, \mu = \sigma^2 = 1,$
$E(A) = 1, Var(A) = 1/9,$ $E(V) = 1, Var(V) = 1/4.$ Thus, both estimators are unbiased and
estimator $A$ has smaller variance than estimator $V.$
(Estimators that combine these two do not seem promising.)
As a check, we show a simulation in R for the numerical values just above. With 100,000 iterations it is reasonable to expect about two-place accuracy.
n = 9;  mu = sg = 1
set.seed(1234)
a = replicate(10^6, mean(rnorm(n,mu,sg)))
mean(a); var(a)
[1] 0.9999257    # aprx E(A) = 1
[1] 0.1112768    # aprx Var(A) = 1/9
v = replicate(10^5, var(rnorm(n,mu,sg)))
mean(v); var(v)
[1] 0.9990863    # aprx $(V) = 1
[1] 0.2511987    # aprx $Var(V) = 1/4.


par(mfrow = c(2,1))
 hist(a, prob=T, xlim=c(-1,5),  ylim=c(0,1), col="skyblue2")
 hist(v, prob=T, xlim=c(-1,5),  ylim=c(0,1), col="skyblue2")
par(mfrow = c(1,1))

