Skip to content

Latest commit

 

History

History
202 lines (133 loc) · 4.31 KB

laplace.rst

File metadata and controls

202 lines (133 loc) · 4.31 KB

Laplace Distribution

Table of contents

local

Density Function

The density function of the Laplace distribution:

$$f(x; \mu, \sigma) = \frac{1}{2 \sigma} \exp \left( - \frac{|x-\mu|}{\sigma} \right)$$

Methods for scalar input, as well as for vector/matrix input, are listed below.

Scalar Input

Vector/Matrix Input

STL Containers

Armadillo

Blaze

Eigen


Cumulative Distribution Function

The cumulative distribution function of the Laplace distribution:

$$F(x; \mu, \sigma) = \int_{-\infty}^x f(z; \mu, \sigma) dz = \frac{1}{2} + \frac{1}{2} \times \text{sign} ( x - \mu ) \times \left( 1 - \exp \left( - \frac{|x - \mu|}{\sigma} \right) \right)$$

Methods for scalar input, as well as for vector/matrix input, are listed below.

Scalar Input

Vector/Matrix Input

STL Containers

Armadillo

Blaze

Eigen


Quantile Function

The quantile function of the Laplace distribution:


q(p; μ, σ) = μ − σ × sign(p − 0.5) × ln (1 − 2|p − 0.5|)

Methods for scalar input, as well as for vector/matrix input, are listed below.

Scalar Input

Vector/Matrix Input

STL Containers

Armadillo

Blaze

Eigen


Random Sampling

Random sampling for the Laplace distribution is achieved via the inverse probability integral transform.

Scalar Output

  1. Random number engines
  2. Seed values

Vector/Matrix Output

  1. Random number engines
  2. Seed values