Jump to content

Documentation/Calc Functions/LOGNORM.DIST

From The Document Foundation Wiki

Function name:

LOGNORM.DIST

Category:

Statistical Analysis

Summary:

Calculates log-normal distribution values from either the probability density function or the cumulative distribution function.

A random variable [math]\displaystyle{ x }[/math] is log-normally distributed if [math]\displaystyle{ \text{log}(x) }[/math] is normally distributed. The log-normal distribution is a family of continuous probability distributions that are typically used to model positive, right-skewed data. The distribution has two characteristic parameters, usually denoted as mu (μ) and sigma (σ), that control its location and shape respectively. μ represents the mean value of the underlying normal distribution, while σ represents the standard deviation of the underlying normal distribution.

Syntax:

LOGNORM.DIST(Number; Mean; STDEV; Cumulative)

Returns:

Returns a non-negative real number, which is the log-normal distribution value for the given arguments. For the probability density function, the value returned lies in the range [0, +∞). For the cumulative distribution function, the value returned lies in the range [0, 1].

Arguments:

Number is a positive real number, or a reference to a cell containing that number, which is the value at which the log-normal distribution is to be evaluated.

Mean is a real number, or a reference to a cell containing that number, which is the value of the location parameter (μ) of the log-normal distribution.

STDEV is a positive real number, or a reference to a cell containing that number, which is the value of the shape parameter (σ) of the log-normal distribution.

Cumulative is a logical value, or a reference to a cell containing that value, that determines whether the required probability is taken from the probability density function or the cumulative distribution function. If Cumulative is set to 0 or FALSE, a value from the probability density function is calculated. For any other values of Cumulative, a value from the cumulative distribution function is calculated.

  • If any of Number, Mean, or STDEV is non-numeric, then LOGNORM.DIST reports a #VALUE! error.
  • If Number is negative or zero, and Cumulative is set to 0 or FALSE (probability density function), then LOGNORM.DIST reports an invalid argument error (Err:502).
  • If Number is negative or zero, and Cumulative is not set to either 0 or FALSE (cumulative distribution function), then LOGNORM.DIST returns 0.
  • If STDEV is less than or equal to 0.0, then LOGNORM.DIST reports an invalid argument error (Err:502).

Additional details:

  • Calc's LOGNORMDIST and LOGNORM.DIST functions perform similar calculations. However, there are minor differences between the two functions with respect to their arguments – for LOGNORMDIST the Mean, STDEV, and Cumulative arguments may be omitted. The requirements for LOGNORMDIST are specified in ODF 1.2; LOGNORM.DIST is provided for interoperability with Microsoft Excel.
  • The formula for the probability density function of the log-normal distribution is given by:
[math]\displaystyle{ \text{LOGNORM.DIST}(x; \mu; \sigma; 0)~=~\frac{1}{x\sigma\sqrt{2\pi}}~\text{EXP} \left(-\frac{1}{2}\left( \frac{ln(x)-\mu}{\sigma} \right)^2 \right) }[/math]
where [math]\displaystyle{ x }[/math] is a positive real number.
  • The formula for the cumulative distribution function of the log-normal distribution is given by:
[math]\displaystyle{ \text{LOGNORM.DIST}(x; \mu; \sigma; 1)~=~\int_{0}^{x}\frac{1}{t\sigma\sqrt{2\pi}}~ \text{EXP} \left(-\frac{1}{2}\left( \frac{ln(t)-\mu}{\sigma} \right)^2 \right) }[/math]
where again [math]\displaystyle{ x }[/math] is a positive real number.
  • The following figure shows probability density function plots for four sample log-normal distributions.
  • The following figure shows cumulative distribution function plots for four sample log-normal distributions.
  • The name space for LOGNORM.DIST is COM.MICROSOFT.LOGNORM.DIST.
  • For more information on the log-normal distribution, visit Wikipedia's Log-normal distribution page.

Examples:

Formula Description Returns
=LOGNORM.DIST(A1; A2; A3; A4) where cells A1:A4 contain the values 1, 0, 1, and 1 respectively. Here the function calculates a value from the cumulative distribution function of the log-normal distribution for the given arguments. 0.5
=LOGNORM.DIST(7.14; 1.5; 3.2; TRUE()) Here the function calculates a value from the cumulative distribution function of the log-normal distribution for the given arguments. 0.557855853816984
=LOGNORM.DIST(7.14; 1.5; 3.2; FALSE()) Here the function calculates a value from the probability density function of the log-normal distribution for the given arguments. 0.0172767714096443
=LOGNORM.DIST(-7.14; 1.5; 3.2; 1) For negative and zero values of the Number argument, the function returns zero for the cumulative distribution function. 0

Related LibreOffice functions:

LOGINV

LOGNORM.INV

LOGNORMDIST

ODF standard:

None

Related (or similar) Excel functions:

LOGNORM.DIST