# Mode of lognormal distribution

Suppose $$y=e^{x}$$ where x is normal with mean mu and variance sigma. Then I see how to derive mode of f(y) (distribution of y), as we need to find the value y that makes $$f'(y)==0$$ However, why is mode not simply $$e^{\mu}$$?

y is a monotonic function of x, and so when x reaches its mode, then y should also reach its mode. The mode of x is its mean (mu) hence y's mode should be $$e^{\mu}$$ what mistake have I made?

Thanks

• This post should answer your query. Commented Jan 17, 2018 at 13:36
• For a function f(x), the location x* of the maximum is preserved by a monotonic transformation y* = g(x*), but for a probability density p(x), the location x* of the maximum (mode) is preserved only if y* = g(x*) is linear. y = exp(x) is not linear. For any monotonic transformation, the median x' will be preserved: y' = g(x'). This is true for other quantiles. Commented Oct 27, 2023 at 19:22
• Suppose the function squeezes a lot of possible values together, then it will artificially create a mode. Hence a monotone function has no reason to preserve the mode whatsoever. Commented Mar 23 at 10:42

$X$ has lognormal distribution if $X=e^Z$ where Z has normal distribution, $Z \sim N(\mu, \sigma^2)$. However, the density of X is then given by:

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

Differentiating the density with respect to $x$ we get

$-\frac{1}{x^2\sqrt{2\pi \sigma^2}} e^{-\frac{1}{2 \sigma^2}\left(\ln(x)-\mu\right)^2} - \frac{1}{x\sqrt{2\pi \sigma^2}}e^{-\frac{1}{2 \sigma^2}\left(\ln(x)-\mu\right)^2} \frac{\ln(x)-\mu}{\sigma^2} \frac{1}{x}$

The mode is the value of x that maximizes the density. Thus, equating the above derivative to zero and simplifying, we get

$-1-\frac{\ln(x)-\mu}{\sigma^2}=0$

or

$x= e^{(\mu-\sigma^2)}$

To sum up, your mistake is that you have not used the correct density but the equation for the transformation of variables that gives us the random variable with log-normal distribution.

• Thank you, I see this is the right way to derive mode of X. I was trying to derive it in a different way by using monotonicity between X and Z, but I got a different result. Specifically, what is the flaw below? (i). X is a monotonic function of Z (ii). if z is the value of Z that gives the largest f(Z), then x=exp(z) should be the value of X that gives the largest f(X) (iii). since the above z is mode of f(Z), x=exp(z) should be the mode of f(X). Thank you. Commented Jun 12, 2015 at 23:14

The mode of a given random variable is a quantity that depends on the distribution of $$X$$, not only $$X$$, which is a measureable function from the sample space $$\Omega$$ to $$\mathbb R$$. For example, the quantity $$\sup(X)=\sup_{\omega \in \Omega}X(w)$$ depends only on $$X$$, so the method in the OP works, that is, $$\sup \left (e^X \right)=e^{\sup(X)}.$$

Thus, to check when the method given in the OP works for the mode, we need to focus on the original definition of mode, which is a distribution-dependent concept.

For discrete random variables, the method in the OP works because we have $$\mathbb P(X=m) \ge \mathbb P(X=x), x\in S_X \Leftrightarrow \mathbb P(e^X=e^m) \ge \mathbb P(e^X=e^x), e^x\in S_{e^X}.$$

In other words, $$\color{blue}{p_{e^X}(t)}=\mathbb P(e^X=t) =\mathbb P(X=\log t)\color{blue}{=p_{X}(\log t)}, t\in S_X;$$

hence, $$p_{e^X}(t)$$ preserves the order based on which the mode of $$X$$ is obtained, and if the point $$m$$ maximizes $$p_{X}(x)$$, $$e^m$$ maximizes $$p_{e^X}(t).$$

For continuous random variables, the method does not work because we cannot prove the following

$$f_X(m) \ge f_X(x), x\in S_X \Leftrightarrow f_{e^X}(e^m) \ge f_{e^X}(e^x), e^x\in S_{e^X}.$$

The reason is that $$f_{e^X}(t)$$ is not $$f_{X}(\log t)$$, and is given by

$$\color{blue}{f_{e^X}(t)=\frac{1}{t} \times f_{X}(\log t)}, t>0$$

which does not preserve the order because of the term $$\frac{1}{t}$$, which is a decreasing function in $$t$$. Hence, if the point $$m$$ maximizes $$f_{X}(x)$$, $$e^m$$ does not necessarily maximize $$f_{e^X}(t).$$