WordGPT

Log-normal distribution

Log-normal distribution: a positive, right-skewed variable whose logarithm is normal. With the default parameters (mean of ln X (μ) = 0, sd of ln X (σ) = 0.6) its mean is 1.1972 and its standard deviation 0.7881. Use the simulator below to draw samples and see it take shape.

Simulate it

Change the parameters, then draw random samples. The bars are the samples; the line is the exact density. With more samples the bars settle onto it.

Samples to draw

00.20.40.60.801234567x
Mean
sample - · exact 1.197
Standard deviation
sample - · exact 0.7881

What is the log-normal distribution?

A variable is log-normal when its logarithm follows a normal distribution. Equivalently, it is what you get when many independent positive factors multiply together, just as the normal arises when many small effects add. That makes it the typical shape of incomes, house prices, city sizes, file sizes and stock prices.

It has a long right tail: the mean sits above the median, so a few very large values pull the average up. That is why median income is reported in preference to mean income.

Where it is used

  • Incomes, wealth and house prices.
  • Stock prices and asset values over time (the basis of the Black–Scholes model).
  • City sizes, file sizes and the size of particles.
  • Biological quantities such as drug concentrations.
  • Any positive quantity that grows by random percentages.

Shape and parameters

Positive, with a peak near zero for a large σ and a long right tail. The parameters μ and σ are the mean and standard deviation of ln X, not of X itself. The median is eᵘ, the mean eᵘ⁺ˢ²⁄² is larger, and the mode is smaller.

What it assumes

  • Strictly positive values.
  • The logarithm of the data looks normal.

How it relates to other distributions

  • Normal distribution: Take logs of a log-normal variable and you get a normal one.
  • Gamma distribution: Another positive right-skewed family, often a close alternative.
  • Weibull distribution: Another positive family used for lifetimes.

Common mistakes

  • Reading μ and σ as the mean and standard deviation of the data rather than of its logarithm.
  • Applying the normal distribution to data that is clearly right-skewed and positive.
  • Comparing means instead of medians for skewed data.

How to work it out

  1. 1

    The probability density function (the formula that gives the shape):

    f(x)=1xσ2π e−(ln⁡x−μ)22σ2,x>0f(x)=\frac{1}{x\sigma\sqrt{2\pi}}\,e^{-\frac{(\ln x-\mu)^2}{2\sigma^2}},\quad x>0
  2. 2

    Its mean (the long-run average) and variance (the spread):

    mean eμ+σ2/2,σX2=(eσ2−1) e2μ+σ2\text{mean } e^{\mu+\sigma^2/2},\qquad \sigma_X^2 = (e^{\sigma^2}-1)\,e^{2\mu+\sigma^2}
  3. 3

    Worked example with the default parameters (mean of ln X (μ) = 0, sd of ln X (σ) = 0.6): With μ = 0 and σ = 0.6 (for ln X), what is the probability that X is above 2?

    answer=0.1240\text{answer} = 0.1240
LaTeX source of the formulas on this page
\[ f(x)=\frac{1}{x\sigma\sqrt{2\pi}}\,e^{-\frac{(\ln x-\mu)^2}{2\sigma^2}},\quad x>0 \]
\[ \text{mean } e^{\mu+\sigma^2/2},\qquad \sigma_X^2 = (e^{\sigma^2}-1)\,e^{2\mu+\sigma^2} \]
\[ \text{answer} = 0.1240 \]

At a glance

PropertyValue
TypeContinuous (measurements)
Parametersmean of ln X (μ); sd of ln X (σ)
Possible values0 to ∞
Mean1.1972
Variance0.6211
Standard deviation0.7881
Example (mean of ln X (μ) = 0, sd of ln X (σ) = 0.6)With μ = 0 and σ = 0.6 (for ln X), what is the probability that X is above 2? Answer: 0.1240.

How to compute it in Excel, Python and R

ToolFunction
Excel / Google Sheets=LOGNORM.DIST(x, μ, σ, TRUE)
Python (SciPy)scipy.stats.lognorm.cdf(x, s=sigma, scale=np.exp(mu))
Rplnorm(x, meanlog = mu, sdlog = sigma)

Questions

What is the log-normal distribution used for?

A positive, right-skewed variable whose logarithm is normal. Typical uses: Incomes, wealth and house prices. Stock prices and asset values over time (the basis of the Black–Scholes model). City sizes, file sizes and the size of particles.

What are the mean and variance of the log-normal distribution?

Mean: mean e^μ+σ²/2. Variance: σ_X² = (e^σ²-1)e²μ+σ².

What does the log-normal distribution assume?

Strictly positive values. The logarithm of the data looks normal.

How do I calculate it in Excel?

=LOGNORM.DIST(x, μ, σ, TRUE)

How is the log-normal distribution related to other distributions?

Normal distribution: Take logs of a log-normal variable and you get a normal one. Gamma distribution: Another positive right-skewed family, often a close alternative. Weibull distribution: Another positive family used for lifetimes.

Related distributions

Choosing a distribution

    Log-normal distribution: what it is, when to use it, formulas and simulator | WordGPT