Why does the log-normal probability density function have that extra "x"?

4.2k Views Asked by At

For a random variable $X \sim N(\mu, \sigma^2)$, the probability density function is

$$f(x; \mu, \sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2}} \cdot \exp\left\{ -\frac{(x-\mu)^2}{2\sigma^2} \right\}$$

For a random variable $X \sim \ln N(\mu, \sigma^2)$, the pdf is

$$f(x; \mu, \sigma^2) = \frac{1}{x\sqrt{2\pi\sigma^2}} \cdot \exp\left\{ -\frac{(\ln x-\mu)^2}{2\sigma^2} \right\}$$

Why is there an extra $1/x$ in the log-normal pdf? I'd (naively, I guess) think that if $\log X \sim N(\mu, \sigma^2)$ then I could use the normal pdf, but this would apparently be in error? Can someone expose and correct my confusion please?

2

There are 2 best solutions below

3
On

For a random variable $X$ that has a normal distribution, the transformed random variable $U=e^X$ will have a log-normal distribution, and not $U=\ln X$.

You cannot use the normal pdf for $U$, although superficially it looks almost identical.

Setting $U=g(X)=e^X$, we have $X=g^{-1}(U)=\ln U$. By the law of transformation of random variables, the density of $U$ will become $$f(u)=f(x)\color{blue}{\left|\frac{dx}{du}\right|}= \frac{1}{\sqrt{2\pi\sigma^2}} \cdot \exp\left\{ -\frac{(\ln u-\mu)^2}{2\sigma^2} \right\}\color{blue}{\left|\frac{d(\ln u)}{du}\right|}\\=\frac{1}{\color{blue}{u}\sqrt{2\pi\sigma^2}} \cdot \exp\left\{ -\frac{(\ln u-\mu)^2}{2\sigma^2} \right\}$$ hence the extra $u$ term in the denominator.

To see where the derivative term in the transformation arises, the probability that transformed random variable $U=g(X)$ lies in range $[u_1,u_2]$ must equal that of random variable $X$ lying in range $[x_1,x_2]$ where $x_1=g^{-1}(u_1)$ and $x_2=g^{-1}(u_2)$, i.e. $$\mathbb{P}(u_1<U<u_2)=\mathbb{P}(g^{-1}(u_1)<X<g^{-1}(u_2))$$ This equality can be expressed as the integral of the probability density functions, where a change of variable occurs:- $$\int_{u_1}^{u_2}\color{blue}{f(u)}\ du=\int_{g^{-1}(u_1)}^{g^{-1}(u_2)}f(x)\ dx=\int_{g^{-1}(u_1)}^{g^{-1}(u_2)}\color{blue}{f(g^{-1}(u))}\ \color{blue}{\frac{d(g^{-1}(u))}{du}}\ du$$ Note that the integral is unity for limits $u_1=0,u_2=\infty$ for $U$, and corresponding limits $x_1=-\infty,x_2=\infty$ for $X$.

0
On

The answer given by Alijah Ahmed is perfect and more general then mine. However I felt the necessity to give another answer based directly on the definition of the lognormal distribution.

By definition, a non negative random variable $X$ is of lognormal distribution if its logarithm is normal. For the sake of simplicity let $\mu=0$ and let $\sigma=1$. That is $$P(ln(X)<x)=P(X<e^x)=\frac{1}{2\pi}\int_{-\infty}^xe^{-\frac{y^2}{2}}dy$$ Introduce a new variable $0\le u=e^x$ or $x=ln(u)$. Whit this the cdf of the lognormal distribution is $$P(X<u)=\frac{1}{2\pi}\int_{-\infty}^{ln(u)} e^{-\frac{y^2}{2}}dy.$$ Since the pdf is the derivative of the cdf (if this derivative exists, like in our case) we have for non negative $u$'s $$f_X(u)=\frac{1}{2\pi}\frac{d}{du}\int_{-\infty}^{ln(u)} e^{-\frac{y^2}{2}}dy=\frac{1}{2\pi}\frac{1}{u}e^{-(ln(u))^2}.$$ Two elementary facts from calculus have been used: (1) differentiating with respect to the upper limit of an integral is the integrand at the upper limit, (2) in the case of composite functions the derivative of the outer function has to be multiplied by the derivative of the inner function.

Furtehermore: the whole argumentation can be repeated with arbitrary $\mu$ and $\sigma.$