# PDF of log transformed variable

I want to know if I've understood log transformation correctly in terms of functions of the distributions.

If $$\log(X)$$ is normally distributed, then $$X$$ is lognormally distributed.

Let's say I have a lognormally distributed variable X with PDF $$f(x)=\frac{1}{x\sigma\sqrt{2\pi}}\exp\left(-\frac{(\log x-\mu)^2}{2\sigma^2}\right)$$ Does this mean that $$\log(f(x))$$ is normally distributed?

• The logarithm of a density is just that, the logarithm of a density. For example a normal density is quadratic (parabolic) on log scale which is sometimes useful. Other densities can be linear on log scale, which is often useful. But as pointed out the logarithm of a density isn't another density. Jun 3, 2019 at 13:10

No, it does not mean that. What you are doing is taking the logarithm of the probability density associated with the random variable $$log(X)$$. This does not return a probability density - it is typically negative most places as well, even.
What you have is that, if $$Z = \log(X) \sim N(\mu, \sigma^2)$$, then $$\exp(Z) = X \sim \log N(\mu, \sigma^2)$$. In other words, we are doing a transformation of the random variable, not the probability density. The probability density of the random variable subsequently changes, however.
One way to get the functional form of the probability density is through the change of variable formula. If $$g$$ is a monotone function, and you define a random variable as $$Z = g(X)$$, with $$X$$ having density $$f(X)$$, then $$f_g(x) = |\frac \partial {\partial z} g^{-1}(z)| \cdot f(g^{-1}(z))$$
is now the probability density of the random variable $$Z = g(X)$$. You can try to see if you can arrive at the form of the logarithmic transformation of a lognormal using this formula.
• You still need to keep a clear distinction between a density of a random variable, and the random variable itself. If $X \sim \log N(\mu, \sigma^2)$, and you take the logarithm of $X$, this new variable, which we call $Y$ now, has distribution $Y \sim N(\mu, \sigma^2)$. $f(y)$ is a function, it is not distributed as anything - it is the density of a random variable we call $y$. Jun 3, 2019 at 15:09
• You are still confusing things, I don't think it is a mathematical issue per se. Forget about data - there is no data, just random variables and their associated densities. Each random variable $X$ has an associated density we denote by $f(x)$. Your statement, "if I do the same thing with formulas" is meaningless: You say "starting with lognormal density" and then "take the log of the rv", and then some plot (of what? the density?) should look like the normal distribution. The density is NOT the random variable. Transforming the random variable is NOT the same as transforming the density. Jun 5, 2019 at 12:58