# Consider a random variable $X$ with the log-normal pdf $f(x) ={1\over \sqrt{2π}}x^{−1}exp^{{−0.5 (logx)^2}}$, $x>0$.

Consider a random variable $$X$$ with the log-normal pdf $$f(x) ={1\over \sqrt{2π}}x^{−1}exp^{{−0.5 (logx)^2}}$$, $$x>0$$.

a) Find the mean and the variance of $$X$$.

I know that $$\int_0^\infty f(x) dx=1$$, but this says "consider the random variable $$X$$ with the log-normal pdf" so would I actually be integrating $$\int_0^\infty x f(x) dx$$ for the mean? The reason I ask (and I'm skeptical) is because the solution to that integral is disgusting and has $$i$$ in the solution and that doesn't seem to be applicable for what I'm doing. Any help is greatly appreciated.

hint: it is $$\int_0^{\infty} xf(x)\, dx$$. To evaluate this make the substitution $$y=\log\, x$$. And then use the following: $$-\frac 12 y^{2}+y=-\frac 1 2 (y-1)^{2} +\frac 1 2$$. You should get the answer as $$\sqrt e$$. [ You have to use the fact $$\frac 1 {\sqrt {2\pi}} \int_{-\infty}^{\infty} e^{-\frac 1 2 y^{2}}\, dy =1$$]

• Should the substitution be $y=\log x$? – ddswsd Jan 26 at 5:19
• @ddswsd Yes, sorry for the typo. – Kavi Rama Murthy Jan 26 at 5:24
• If I let $y= \log x$, then the integral becomes ${1\over \sqrt{2\pi}}\int_{- \infty} ^{\infty} e^{-0.5y^{2}+y} dy$. I don't think that equals $\sqrt{e}$. – ddswsd Jan 26 at 14:16
• @ddswsd The integral you have written is $\sqrt e$ as far as I can see. Can you show me how you evaluated it? – Kavi Rama Murthy Jan 26 at 23:26
• Interesting...I put that integral into wolfram alpha and used -0.5 and 0.5 instead of writing them as fractions and the answer they gave wasn't $\sqrt{e}$. Then I changed the decimals to fractions and the answer is $\sqrt{e}$. I see why you chose to complete the square. Really clever! Thank you! – ddswsd Jan 27 at 0:13