Normal likelihood with variance equal to squared mean (source code)

= Normal likelihood with variance equal to squared mean
{title2=$\widehat\mu=(\sqrt{S_1^2+4nS_2}-S_1)/(2n)$}

For independent <normal distribution> observations with mean $\mu>0$ and variance $\mu^2$, put $S_1=\sum_iX_i$, $S_2=\sum_iX_i^2$. The <Fisher-Neyman factorization theorem> makes $(S_1,S_2)$ a <sufficient statistic>, since the <likelihood> is proportional to $\mu^{-n}\exp[-S_2/(2\mu^2)+S_1/\mu]$. Its logarithmic <derivative> has numerator $S_2-S_1\mu-n\mu^2$. When $S_2>0$, this changes sign once on the positive half-line and gives the displayed global <maximum-likelihood estimator>. The zero sample is a probability-zero exception with unbounded <likelihood> as $\mu\downarrow0$.