# Quantile function of log-normal distribution

The quantile function for log-normal distribution is given by $$F^{-1}(p)=\exp(\mu+\sigma\Phi^{-1}(p)),$$ where $$0 and $$\Phi(p)$$ is the CDF of a normal distribution.

I am trying to derive $$F^{-1}(p)$$ and arrive at the solution above.

Let $$X$$ be log-normally distributed and $$Z\sim N(\mu,\sigma^2)$$. Now $$F(x)=\Phi\left(\frac{\ln x-\mu}{\sigma}\right)=\frac{1}{\sqrt{2\pi}}\int^{\frac{\ln x-\mu}{\sigma}}_{0}\exp \left(-\frac{1}{2} \left(\frac{z-\mu}{\sigma}\right)^2\right)dz.$$

Now let's solve it in terms of $$x$$. $$x=\frac{1}{\sqrt{2\pi}}\int^{\frac{\ln x-\mu}{\sigma}}_{0}\exp \left(-\frac{1}{2} \left(\frac{z-\mu}{\sigma}\right)^2\right)dz \iff \\ x\sqrt{2\pi}=\int^{\frac{\ln x-\mu}{\sigma}}_{0}\exp \left(-\frac{1}{2} \left(\frac{z-\mu}{\sigma}\right)^2\right)dz \iff \\ x\sqrt{2\pi}=\exp \left(-\frac{1}{2} \left(\frac{\frac{\ln x-\mu}{\sigma}-\mu}{\sigma}\right)^2\right)-\exp \left(-\frac{1}{2} \left(\frac{0-\mu}{\sigma}\right)^2\right) \iff \\ x\sqrt{2\pi}=\exp \left(-\frac{1}{2} \left(\ln x -\mu -\sigma\mu\right)^2\right)-\exp \left(\frac{1}{2} \left(\frac{\mu}{\sigma}\right)^2\right) \iff \\ x\sqrt{2\pi}+\exp \left(\frac{1}{2} \left(\frac{\mu}{\sigma}\right)^2\right)=\exp \left(-\frac{1}{2} \left(\ln x -\mu -\sigma\mu\right)^2\right) \iff \\ \log\left(x\sqrt{2\pi}+\exp \left(\frac{1}{2} \left(\frac{\mu}{\sigma}\right)^2\right)\right)=-\frac{1}{2} \left(\ln x -\mu -\sigma\mu\right)^2$$

I am not sure how to go on from here.

Let $$\log (X) \sim \mathcal{N}(\mu,\sigma^2)$$, than indeed $$F(x) = \Phi\left( \frac{\log(X) - \mu}{\sigma} \right).$$ We know that $$F(x) \in [0,1]$$, so let $$F(x) = p$$, than we see that $$p = \Phi\left( \frac{\log(F^{-1}(p)) - \mu}{\sigma} \right).$$ Solving for the quantile function $$F^{-1}(p)$$ gives us $$\Phi^{-1}(p) = \frac{\log(F^{-1}(p)) - \mu}{\sigma} \iff\\ \sigma \Phi^{-1}(p) = \log(F^{-1}(p)) - mu \iff\\ \mu + \sigma\Phi^{-1}(p) = \log(F^{-1}(p)) \iff\\ F^{-1}(p) = \exp(\mu + \sigma\Phi^{-1}(p)).$$

Start from the definition $$P(X \geq m_p)=1-p$$

where $$m_p$$ is your $$F^{-1}(p).$$

Using the fact that the $$\log$$ function is increasing $$P(log(X) \geq log(m_p))=1-p$$

We have that $$Z:=log(X)\sim \mathcal{N}(\mu,\sigma^2)$$ $$P(\mu+\sigma Y \geq log(m_p))=1-p$$ where $$Y \sim \mathcal{N}(0,1)$$

Thus, $$P(Y \geq \frac{log(m_p)-\mu}{\sigma})=1-p$$ $$1-P(Y \leq \frac{log(m_p)-\mu}{\sigma})=1-p$$ $$P(Y \leq \frac{log(m_p)-\mu}{\sigma})=p$$ $$\Phi\left(\frac{log(m_p)-\mu}{\sigma}\right)=p$$

where $$\Phi$$ is the CDF of a standard normal variable

Using the inverse of $$\Phi$$, we have $$\frac{log(m_p)-\mu}{\sigma}=\Phi^{-1}(p)$$

$$log(m_p)=\mu+\sigma \Phi^{-1}(p)$$ $$m_p=\exp\left(\mu+\sigma \Phi^{-1}(p)\right)$$

The result wanted