This is an old version, view current version.

18.1 Lognormal distribution

18.1.1 Probability density function

If \(\mu \in \mathbb{R}\) and \(\sigma \in \mathbb{R}^+\), then for \(y \in \mathbb{R}^+\), \[ \text{LogNormal}(y|\mu,\sigma) = \frac{1}{\sqrt{2 \pi} \ \sigma} \, \frac{1}{y} \ \exp \! \left( - \, \frac{1}{2} \, \left( \frac{\log y - \mu}{\sigma} \right)^2 \right) . \]

18.1.2 Sampling statement

y ~ lognormal(mu, sigma)

Increment target log probability density with lognormal_lupdf(y | mu, sigma).
Available since 2.0

18.1.3 Stan functions

real lognormal_lpdf(reals y | reals mu, reals sigma)
The log of the lognormal density of y given location mu and scale sigma
Available since 2.12

real lognormal_lupdf(reals y | reals mu, reals sigma)
The log of the lognormal density of y given location mu and scale sigma dropping constant additive terms
Available since 2.25

real lognormal_cdf(reals y, reals mu, reals sigma)
The cumulative lognormal distribution function of y given location mu and scale sigma
Available since 2.0

real lognormal_lcdf(reals y | reals mu, reals sigma)
The log of the lognormal cumulative distribution function of y given location mu and scale sigma
Available since 2.12

real lognormal_lccdf(reals y | reals mu, reals sigma)
The log of the lognormal complementary cumulative distribution function of y given location mu and scale sigma
Available since 2.12

R lognormal_rng(reals mu, reals sigma)
Generate a lognormal variate with location mu and scale sigma; may only be used in transformed data and generated quantities blocks. For a description of argument and return types, see section vectorized PRNG functions.
Available since 2.22