Skip to content

LogNormalDistribution ​

The log-normal distribution: log⁡X∼NormalDistribution(μ,σ)\log X \sim NormalDistribution(\mu, \sigma).

LogNormalDistribution(mu, sigma)an inert distribution object — carries μ,σ\mu, \sigma, unevaluated.
Typed signatures
TypePackageApplies
(real, real<0..>) -> distributionstatisticsalways

Domain: Statistics

Details
  • PDF(x)=PDF(NormalDistribution(μ,σ),log⁡x)/xPDF(x) = PDF(NormalDistribution(\mu,\sigma), \log x) / x — delegates to compute-engine's native Normal PDF rather than writing out the Gaussian by hand.
  • CDF(x)=CDF(NormalDistribution(μ,σ),log⁡x)CDF(x) = CDF(NormalDistribution(\mu,\sigma), \log x), same delegation.
  • Mean=eμ+σ2/2Mean = e^{\mu+\sigma^2/2}, Variance=(eσ2−1)e2μ+σ2Variance = (e^{\sigma^2}-1)e^{2\mu+\sigma^2}, both exact.
  • RandomVariate draws eμ+σZe^{\mu + \sigma Z} for a standard normal ZZ.

Examples

Basic #
live ↗
InPDF⁡(LogNormalDistribution(0,1),1)\operatorname{PDF}(\mathrm{LogNormalDistribution}(0, 1), 1)Out12π\sqrt{\frac{1}{2π}}
live ↗
InCDF⁡(LogNormalDistribution(0,1),1)\operatorname{CDF}(\mathrm{LogNormalDistribution}(0, 1), 1)Out12\frac{1}{2}
live ↗
Inmean(LogNormalDistribution(0,1))\mathrm{mean}(\mathrm{LogNormalDistribution}(0, 1))Oute\sqrt{e}

Cross-checked against wolframscript's N[Variance[LogNormalDistribution[0, 1]]]

live ↗
InVariance(LogNormalDistribution(0,1))\mathrm{Variance}(\mathrm{LogNormalDistribution}(0, 1))Oute(e−1)e(e-1)
About
Examples4

See also: NormalDistribution, PDF, CDF