16.7 Double exponential (Laplace) distribution
16.7.1 Probability density function
If \(\mu \in \mathbb{R}\) and \(\sigma \in \mathbb{R}^+\), then for \(y \in \mathbb{R}\), \[ \text{DoubleExponential}(y|\mu,\sigma) = \frac{1}{2\sigma} \exp \left( - \, \frac{|y - \mu|}{\sigma} \right) . \] Note that the double exponential distribution is parameterized in terms of the scale, in contrast to the exponential distribution (see section exponential distribution), which is parameterized in terms of inverse scale.
The double-exponential distribution can be defined as a compound exponential-normal distribution (Ding and Blitzstein 2018). Using the inverse scale parameterization for the exponential distribution, and the standard deviation parameterization for the normal distribution, one can write \[ \alpha \sim \mathsf{Exponential}\left( \frac{1}{2 \sigma^2} \right) \] and \[ \beta \mid \alpha \sim \mathsf{Normal}(\mu, \sqrt{\alpha}), \] then \[ \beta \sim \mathsf{DoubleExponential}(\mu, \sigma ). \] This may be used to code a non-centered parameterization by taking \[ \beta^{\text{raw}} \sim \mathsf{Normal}(0, 1) \] and defining \[ \beta = \mu + \alpha \, \beta^{\text{raw}}. \]
16.7.2 Sampling statement
y ~
double_exponential
(mu, sigma)
Increment target log probability density with double_exponential_lupdf(y | mu, sigma)
.
16.7.3 Stan functions
real
double_exponential_lpdf
(reals y | reals mu, reals sigma)
The log of the double exponential density of y given location mu and
scale sigma
real
double_exponential_lupdf
(reals y | reals mu, reals sigma)
The log of the double exponential density of y given location mu and
scale sigma dropping constant additive terms
real
double_exponential_cdf
(reals y, reals mu, reals sigma)
The double exponential cumulative distribution function of y given
location mu and scale sigma
real
double_exponential_lcdf
(reals y | reals mu, reals sigma)
The log of the double exponential cumulative distribution function of
y given location mu and scale sigma
real
double_exponential_lccdf
(reals y | reals mu, reals sigma)
The log of the double exponential complementary cumulative
distribution function of y given location mu and scale sigma
R
double_exponential_rng
(reals mu, reals sigma)
Generate a double exponential 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.
References
Ding, Peng, and Joseph K. Blitzstein. 2018. βOn the Gaussian Mixture Representation of the Laplace Distribution.β The American Statistician 72 (2): 172β74. https://doi.org/10.1080/00031305.2017.1291448.