Skip to main content
7 of 9
edited body
Galen
  • 9.7k
  • 3
  • 27
  • 61

What are the PDF and CDF for truncated lognormal distribution.

Offhand, I don't know the CDF of a truncated log-normal either. But let me take a guess.

  1. Start with a log-normal distribution. It has the CDF $$F(x;\mu, \sigma) = \frac{1}{2} \left[1 + \operatorname{erf} \left( \frac{\ln x - \mu}{\sigma \sqrt{2}} \right) \right]$$
  2. Apply the truncation formula on the interval $(a,b]$ $$F(x| a < X \leq b]) = \frac{F(x) - F(a)}{F(b) - F(a)}$$ which by composition gives

$$F(x;\mu, \sigma | a < X \leq b) = \frac{\frac{1}{2} \left[1 + \operatorname{erf} \left( \frac{\ln x - \mu}{\sigma \sqrt{2}} \right) \right] - \frac{1}{2} \left[1 + \operatorname{erf} \left( \frac{\ln a - \mu}{\sigma \sqrt{2}} \right) \right]}{\frac{1}{2} \left[1 + \operatorname{erf} \left( \frac{\ln b - \mu}{\sigma \sqrt{2}} \right) \right] - \frac{1}{2} \left[1 + \operatorname{erf} \left( \frac{\ln a - \mu}{\sigma \sqrt{2}} \right) \right]}$$

$$= \frac{ \left[1 + \operatorname{erf} \left( \frac{\ln x - \mu}{\sigma \sqrt{2}} \right) \right] - \left[1 + \operatorname{erf} \left( \frac{\ln a - \mu}{\sigma \sqrt{2}} \right) \right]}{ \left[1 + \operatorname{erf} \left( \frac{\ln b - \mu}{\sigma \sqrt{2}} \right) \right] - \left[1 + \operatorname{erf} \left( \frac{\ln a - \mu}{\sigma \sqrt{2}} \right) \right]}$$

$$= \frac{\operatorname{erf} \left( \frac{\ln x - \mu}{\sigma \sqrt{2}} \right) - \operatorname{erf} \left( \frac{\ln a - \mu}{\sigma \sqrt{2}} \right) }{ \operatorname{erf} \left( \frac{\ln b - \mu}{\sigma \sqrt{2}} \right) - \operatorname{erf} \left( \frac{\ln a - \mu}{\sigma \sqrt{2}} \right) }$$

Assuming the above is correct, we can consider the derivative with respect to $x$ in order to obtain the derivative. Fortunately the error function has a derivative.

$$f(x;\mu, \sigma | a < X \leq b) = \frac{\partial}{\partial x} F(x;\mu, \sigma | a < X \leq b)$$

$$= \frac{\partial}{\partial x} \left[ \frac{\operatorname{erf} \left( \frac{\ln x - \mu}{\sigma \sqrt{2}} \right) - \operatorname{erf} \left( \frac{\ln a - \mu}{\sigma \sqrt{2}} \right) }{ \operatorname{erf} \left( \frac{\ln b - \mu}{\sigma \sqrt{2}} \right) - \operatorname{erf} \left( \frac{\ln a - \mu}{\sigma \sqrt{2}} \right) } \right]$$

$$= \frac{ \frac{\partial}{\partial x} \operatorname{erf} \left( \frac{\ln x - \mu}{\sigma \sqrt{2}} \right)}{ \operatorname{erf} \left( \frac{\ln b - \mu}{\sigma \sqrt{2}} \right) - \operatorname{erf} \left( \frac{\ln a - \mu}{\sigma \sqrt{2}} \right) } $$

$$= \frac{ \frac{2}{\sqrt{\pi}} \exp \left( \frac{\ln x - \mu}{\sigma \sqrt{2}} \right) \frac{\partial}{\partial x} \left[ \frac{\ln x - \mu}{\sigma \sqrt{2}} \right] }{ \operatorname{erf} \left( \frac{\ln b - \mu}{\sigma \sqrt{2}} \right) - \operatorname{erf} \left( \frac{\ln a - \mu}{\sigma \sqrt{2}} \right) } $$

$$= \frac{ \frac{2}{\sigma \sqrt{2 \pi} x} \exp \left( \frac{\ln x - \mu}{\sigma \sqrt{2}} \right)}{ \operatorname{erf} \left( \frac{\ln b - \mu}{\sigma \sqrt{2}} \right) - \operatorname{erf} \left( \frac{\ln a - \mu}{\sigma \sqrt{2}} \right) } $$

$$= \frac{ \frac{2}{\sigma \sqrt{2 \pi}} \exp \left( - \frac{\mu}{\sigma \sqrt{2}} \right) x^{\left( \frac{1}{\sigma \sqrt{2}} - 1 \right)}}{ \operatorname{erf} \left( \frac{\ln b - \mu}{\sigma \sqrt{2}} \right) - \operatorname{erf} \left( \frac{\ln a - \mu}{\sigma \sqrt{2}} \right) } $$

Is there are closed form solution.

As Ben Bolker reminded me in the comments, it depends on what you're willing to allow as "closed form".

What aspects must I consider while working with truncated distributions.

Well, you've restricted the support to an interval so ensure that the set of possibilities you want to consider can fall within such an interval. And also since you started with the log-normal distribution, you should be mindful of the positivity constraint.

If censoring the data points above the physical limit a senseful thing to do mathematically speaking.

I am not sure I understand this aspect of the question. The upper bound $b$ being a physical limit should mean that you will never observe a measurement above that level. If you're referring to error in measurements leads to violations of the upper bound in the data, then you can attempt to account for that measurement error using something like an errors-in-variables model. But that's beyond the scope of what I was willing to put into this answer.

Galen
  • 9.7k
  • 3
  • 27
  • 61