[Math] Why does the log-normal probability density function have that extra “x”

logarithmsprobability distributionsrandom variables

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?

Best Answer

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$.

Related Question