## 15.7 Double Exponential (Laplace) Distribution

### 15.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. Specifically, if $\alpha \sim \mathsf{Exponential}\left( \frac{1}{\lambda} \right)$ and $\beta \sim \mathsf{Normal}(\mu, \alpha),$ then $\beta \sim \mathsf{DoubleExponential}(\mu, \lambda).$ 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}}.$

### 15.7.2 Sampling Statement

y ~ double_exponential(mu, sigma)

Increment target log probability density with double_exponential_lpdf( y | mu, sigma) dropping constant additive terms.

### 15.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_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 generated quantities block. For a description of argument and return types, see section vectorized PRNG functions.