# MLE for variance of a lognormal distribution

Let $X_1, X_2,...,X_n$ be iid random variables having pdf $$f(x|\theta) = \frac{1}{x \sqrt{2\pi\theta}}e^{(-[\log x]^2/[2\theta])} I_{(0,\inf)}(x)$$ where $\theta > 0$.

Determine the MLE of $\theta$. Since this is an exponential family distribution, this pdf gets factored into: $h(x) = \frac{1}{x} I_{(0,inf)}$, $c(\theta) = \frac{1}{\sqrt{2\pi\theta}}$, $w(\theta) = -1/2\theta$, and $t(x) = (\log x)^2$

I solved this by using the natural parameterization, so $\eta = \frac{-1}{2\theta}$ and therefore $\theta = \frac{-1}{2\eta}$.

We have that $c(\eta) = \frac{1}{\sqrt{-\pi/\eta}}$ and therefore, $\log c(\eta) = \log\frac{1}{\sqrt{-\pi/\eta}}$.

The log likelihood function is $$L(\eta|x) = \sum\log\frac{1}{x_i} + n\frac{1}{\sqrt{-\pi/\eta}} + \eta\sum(\log x_i)^2$$.

After taking the derivative with respect to $\eta$, I got that $$\frac{d}{d\eta}L(\eta|x)=n\frac{-1}{2\eta} + \sum(\log x_i)^2$$

Setting the derivative equal to zero, we get $$n\frac{-1}{2\eta} + \sum(\log x_i)^2 = 0$$ $$\frac{-1}{2\eta} = -\frac{\sum(\log x_i)^2}{n}$$ Subbing $\theta$ back in we get $$\hat\theta_{MLE} = \frac{\sum(\log x_i)^2}{n}$$

I just want to make sure that my work and rationale is correct in solving this.

• I think the middle term in your L(eta|x) formula should be a logarithm. But your derivative is ok. – Sextus Empiricus Mar 5 '18 at 21:19
• Except maybe the minus sign (in the derivative), which I cant reproduce. But in the final line you make again a change of a minus sign (when changing from eta to theta) and end up, I believe, correct. – Sextus Empiricus Mar 5 '18 at 21:26
• This is an lognormal distribution you are dealing with (with $\mu = 0$ and $\sigma^2 = \theta$) so I have changed the title of the post to reflect this. – Ben - Reinstate Monica Mar 5 '18 at 22:09
• $\theta$ is not the variance of this distribution: it is the variance of the logarithms. Which, then, is the question you want answered: how to find the MLE of the variance or how to find the MLE of $\theta$? (The latter is something I'm sure you've already done, because it asks how to find the MLE for the variance of a Normal distribution. In this light your final formula ought to look familiar.) – whuber Mar 5 '18 at 23:21