# Base-10 lognormal PDF integrated over log10(x)

From what I understand, the lognormal probability density function in base-10 is mathematically defined thus:

$$p(x; \mu, \sigma) = \frac{log_{10}(e)}{x \sigma \sqrt{2 \pi}} e^{-\frac{(log_{10}(x) - \mu)^2}{2 \sigma^2}}$$

As any PDF is bound to be, this function is normalised - that is, integrated over all $x$ (I integrate numerically, with $x$ distributed uniformly between the limits of integration) gives 1. In addition, this function, plotted against $x$, shows a unimodal distribution that is skewed/heavy-tailed.

Now, if my understanding is correct, a lognormal distribution is a distribution in which the random variable's logarithm is normally distributed. That is, if I plot the above equation with respect to $log_{10}(x)$, I get something that looks like a Gaussian.

Correct me if I am wrong, but what I am plotting is this:

$$g(y=log_{10}(x); \mu, \sigma) = \frac{log_{10}(e)}{10^y \sigma \sqrt{2 \pi}} e^{-\frac{(y - \mu)^2}{2 \sigma^2}}$$

But if I integrate this function over all $y$ (I integrate numerically, with $y$ distributed uniformly between the limits of integration), I do not get 1 (due to the $log_{10}(e)/10^y$ factor). In other words, what I thought was an alternate representation of the same function, is not normalised.

So my question is, are the two forms of the same PDF not equivalent, as it seems to be in this case? If not, what is the reason? If yes, what am I doing wrong?

Thank you.

A crucial term in the PDFs has been omitted: the measure $\mathrm{d}x$. Really we should think in terms of the probability element

$$p(x; \mu, \sigma)\ \mathrm{d}x = \frac{\log_{10}(e)}{x\,\sigma \sqrt{2 \pi}} e^{-\frac{(\log_{10}(x) - \mu)^2}{2 \sigma^2}}\ \mathrm{d}x,$$

whence, substituting $10^y=x$ (and equivalently $y=\log_{10}(x)$), we may rewrite the probability element in terms of $y$ as

\eqalign{ g(y; \mu, \sigma)\ \mathrm{d}y &= \frac{\log_{10}(e)}{10^y \sigma \sqrt{2 \pi}} e^{-\frac{(y - \mu)^2}{2 \sigma^2}}\ \mathrm{d}(10^y) \\ &=\frac{\log_{10}(e)}{10^y \sigma \sqrt{2 \pi}} e^{-\frac{(y - \mu)^2}{2 \sigma^2}}\ \log(10)10^y\ \mathrm{d}y \\ &= \frac{1}{\sigma \sqrt{2 \pi}} e^{-\frac{(y - \mu)^2}{2 \sigma^2}}\ \mathrm{d}y }

(because $\log_{10}(e)\log(10) = 1$).

This is the standard normal PDF. Normally, one begins at the end, substitutes for $y$, and works backwards to obtain the pdf for the lognormal distribution.

• Thank you very much for the clarification! Now I understand the mathematical equivalence, but I don't understand why the two forms appear different when plotted. That is, when I plot $p(x; \mu, \sigma)$ against $log_{10}(x)$, and $g(y; \mu, \sigma)$ against $y$, they don't match. The latter peaks at the value of $\mu$, whereas the former peaks at some point $< \mu$. Could you please explain what I'm doing wrong here? (I thought this didn't warrant a separate question because it's very much relevant to the topic of equivalence.) Thanks! Feb 11 '12 at 19:02
• Did you see my reply at stats.stackexchange.com/q/14483? It explains why the shapes must vary when the transformation from $x$ to $y$ is nonlinear.
– whuber
Feb 11 '12 at 19:35
• I had seen it, but I guess I was confused. But I do get it now. So, to correct myself, and to rephrase your answer at stats.stackexchange.com/q/14483 - correct me if I'm wrong - the plot of $p(x; \mu, \sigma)$ versus $x$ and that of $g(y; \mu, \sigma)$ versus $y$ are equivalent. Thanks for the help! Feb 11 '12 at 20:18
• The graph of $p$ and $g$ are indeed "equivalent" in the sense of using equal areas (rather than equal heights) to represent equal probabilities, whether expressed in terms of $x$ or in terms of $y$.
– whuber
Feb 11 '12 at 23:50