Overview
LogNormal
The lognormal distribution is like a lop-sided
normal distribution.
It is unique in that it takes only positive values, as opposed to the normal distribution which ranges over the
entire real line.
copy
Definition
A variable is lognormally distributed if the logarithm of the variable is distributed normally. i.e. we have the following:
{% y = ln(x) %}
where
{% x = e^y %}
and y is distributed normally.
{% y \sim\ N(\mu_y, \sigma_y ^2) %}
The probability density of x is given by
{% f(x) = \sqrt{1/ 2 \pi x^2 \sigma_y ^2} e ^{-0.5[(y-\mu_y)/\sigma_y]^2} %}
Moment Formulas
The following relations hold for the
moments
of the lognormal distribution:
{% \mu_x = exp[\mu_y + \sigma_y^2/2] %}
{% \sigma_x = exp[2\mu_y + \sigma_y^2][exp(\sigma_y^2) - 1] %}
{% \mu_y = ln[\mu_x^2/ \sqrt{\mu_x^2 + \sigma_x^2}] %}
{% \sigma_y^2 = ln[1 + \sigma_x^2/\mu_x^2] %}
Lognormal vs Normal
Comparison of the distribution of a normal variable and a lognormal variable, both with mean =1 and variance = 1.
Library
A library for calculating the basic statistics is provided.
lognormal api