# 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
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.955485463142395, "perplexity": 235.20862829185197}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-16/segments/1585371656216.67/warc/CC-MAIN-20200406164846-20200406195346-00398.warc.gz"}