# Can quantiles be calculated for lognormal distributions?

I just talked to someone who stated that quantiles cannot be computed for lognormal distributions. or it does not make sense.

Is this true?

• Edited to quantiles, consistently. Quartiles are just one kind of quantile. – Nick Cox Jul 1 '15 at 13:46
• Quantiles exist and make sense for all distributions. If you intend your readers to interpret "can be computed" in terms of the existence of a practicable algorithm, then please indicate that and explain what kinds of algorithm you would consider feasible. – whuber Jul 1 '15 at 13:52
• One sentence summary: the quantiles of a lognormal are just the quantiles of the corresponding normal, exponentiated; so there is nothing suspect about them and your friend is either misinformed (badly) or misinterpreted (badly). – Nick Cox Jul 1 '15 at 20:33

## 3 Answers

Let's start with definitions and notation. A random variable $$X$$ is lognormal if its natural logarithm, $$Y = \log(X)$$, is normal.

Denote with $$M$$ and $$S$$ the mean and standard deviation of $$X$$. Denote with $$m$$ and $$s$$ the mean and standard deviation of $$Y$$. Given $$M$$ and $$S$$, you can calculate $$m$$ and $$s$$ as: $$m = \log[M^2/(M^2 + S^2)^{(1/2)}]$$ and $$s = (\log[(S/M)^2+1])^{(1/2)}$$.

To calculate a quantile of $$X$$, we use the fact that the exponential function (inverse of the log function) is monotone increasing -- it maps quantiles of $$Y$$ into quantiles of $$X$$. Suppose we want to calculate the .95-quantile of $$X$$ (nothing special about .95, substitute any quantile you like). Let $$Q$$ denote the .95 quantile of $$X$$. Let $$q$$ denote the .95 quantile of $$Y$$. We know the mean and standard deviation, $$M$$ and $$S$$, of $$X$$. From these, we calculate the mean and standard deviation, $$m$$ and $$s$$, of $$Y$$. Since $$Y$$ is normal, we can easily calculate its .95 quantile $$q$$. The .95 quantile $$Q$$ of $$X$$ is then simply: $$Q = \exp[q]$$.

here is the original post by Glyn Holton: http://www.riskarchive.com/archive02_4/00000622.htm

• We appreciate you locating this reference. However, the complete reproduction of somebody else's post is not acceptable here. It is better to summarize and link to the post. That also helps make it clearer which work is yours and which is not. Before you go any further, please make sure you read our help page at stats.stackexchange.com/help/referencing concerning this policy. – whuber Jul 1 '15 at 13:55
• This is answered in many threads on this site. – whuber Jul 1 '15 at 14:26
• Hamed, even with the edits, the linked referencing policy has not been followed. Please read the policy carefully and follow it, or the answer may be deleted. – Glen_b Jul 1 '15 at 16:01
• Most critically, the author of what you quote is not credited. – Glen_b Jul 1 '15 at 16:03
• your link in riskarchive does not work. – silgon Jul 27 '17 at 13:23

I am not a statistician, but I am quite sure that the quantile function for the log-normal distribution is well-defined because it is the inverse of the cumulative distribution function, which is strictly increasing.

For all continuous distributions, the ICDF exists and is unique if 0 < p < 1. (source)

There is a software library (distributions-lognormal-quantile) I have used in some applications to evaluate that function, and I believe it uses this equation: This function is also available in Microsoft Excel as LOGNORM.INV.

• I implemented that formula and it compares well with the results from R. Strange that the formula doesn't appear on the Wikipedia page for the Log-normal distribution. – Matthew Walker Nov 27 '18 at 6:52

Here is the proof. Take $$\log X \sim \mathcal{N}(\mu, \sigma)$$. Then $$X$$ is log-normally distributed with CDF: $$F(x) = \frac{1}{2}\left(1 + erf \left(\frac{\log x - \mu}{\sigma \sqrt{2}} \right) \right)$$

we can now solve:

\begin{align} x &= \frac{1}{2}\left(1 + erf \left(\frac{\log F^{-1}(u) - \mu}{\sigma \sqrt{2}} \right) \right) \\ erf^{-1} \left(2x-1\right) &= \frac{\log F^{-1}(u) - \mu}{\sigma \sqrt{2}} \\ \sigma \sqrt{2} erf^{-1} \left(2x-1\right) +\mu &= \log F^{-1}(u) \\ \exp\left(\sigma \sqrt{2} erf^{-1} \left(2x-1\right) +\mu\right) &= F^{-1}(u) \\ \end{align}

which is what iX3 got.