Lognormal Distribution

The lognormal distribution, also known as the Galton distribution, is used to model variables whose logarithm is normally distributed. It is applicable to variables that are positive and can have very large values.

DefinitionPermalink

The lognormal distribution has a location parameter μ and a scale parameter σ, which correspond to the mean and standard deviation of the associated normal distribution. The probability density function (PDF) is:

f(x)=1xσ2πe(lnxμ)2/2σ2

The cumulative distribution function (CDF) is:

F(x)=12+12erf(lnxμσ2)

The distribution is defined for all positive real numbers (x > 0), with the scale parameter σ being strictly positive.

ApplicationsPermalink

The lognormal distribution is widely used to model naturally occurring quantities in many scientific and engineering fields. Common applications include:

  • Environmental science uses the lognormal distribution to model the concentration of pollutants in air, water, and soil samples.

  • In reliability engineering, the distribution describes the time between failures and repair times for industrial equipment.

  • Geologists apply the lognormal distribution to model the concentration and distribution of minerals in ore deposits.

  • Financial analysts use the distribution to model asset prices and returns in financial markets.

  • Biologists employ the lognormal distribution to describe the growth rates of organisms and the size distribution of biological populations.

PropertiesPermalink

Statistical Properties
PropertyValue
Meaneμ+σ2/2
Variance(eσ21)e2μ+σ2
Skewness(eσ2+2)eσ21
Excess Kurtosise4σ2+2e3σ2+3e2σ26
Medianeμ
Modeeμσ2
Entropyμ+12+ln(σ2π)

Notable properties include:

  • The characteristic function is given by ϕ(t)=eiμtσ2t2/2.

  • The distribution is always right-skewed.

  • The quantile function is Q(p)=eμ+σΦ1(p).

Relationships to Other DistributionsPermalink

  • If X follows a normal distribution with parameters μ and σ, then Y = exp(X) follows a lognormal distribution.

  • The product of independent lognormal random variables is lognormally distributed.

  • The lognormal distribution is a special case of the generalized gamma distribution.

The LognormalDistribution classPermalink

The lognormal distribution is implemented by the LognormalDistribution class. It has two constructors. The first constructor takes two arguments. The first argument is the location parameter, and corresponds to the mean of the associated normal distribution. The second argument is the scale parameter and corresponds to the standard deviation of the associated normal distribution.

The following constructs the lognormal distribution with location parameter 6.8 and scale parameter 4.1:

C#
var lognormal = new LognormalDistribution(6.8, 4.1);

The LognormalDistribution class has two specific properties, LocationParameter and ScaleParameter, which return the location and scale parameters of the distribution.

If a variable is assumed to have a lognormal distribution, then the order and scale parameters of the distribution can be estimated using the method of maximum likelihood or the method of matching moments. This is done by estimating the parameters of the normal distribution for a logarithmic transformation of the variable. The second constructor performs this calculation. It takes one argument: a Vector<T> whose distribution is to be estimated.

Note that parameter estimation says nothing about how well the estimated distribution fits the variable's distribution. Use one of the goodness-of-fit tests to verify the appropriateness of the choice of distribution.

LognormalDistribution has one static (Shared in Visual Basic) method, Sample, which generates a random sample using a user-supplied uniform random number generator. The second and third parameters are the location and scale parameters of the distribution.

C#
var random = new Pcg32();
double sample = LognormalDistribution.Sample(random, 6.8, 4.1);

The above example uses the MersenneTwister to generate uniform random numbers.

ReferencesPermalink

For more information on the exponential distribution, refer to the following sources:

  • Johnson, N. L., Kotz, S., & Balakrishnan, N. (1994). "Continuous Univariate Distributions, Volume 1", Chapter 14. Wiley Series in Probability and Statistics.

  • Forbes, C., Evans, M., Hastings, N., & Peacock, B. (2011). "Statistical Distributions", Chapter 29. Wiley Series in Probability and Statistics.

  • Aitchison, J., & Brown, J.A.C. (1957). The Lognormal Distribution. Cambridge University Press.