// Home / Documentation / Gallery of Distributions / Laplace distribution

Laplace distribution

Where will you meet this distribution?

Shape of Distribution

Basic Properties

  • Two parameters \mu, \phi are required.
    \phi>0
  • Continuous distribution defined on entire range
  • This distribution is always symmetric.

Probability

  • Cumulative distribution function
    F(x)=\begin{cases}\frac{1}{2}\exp\left(\frac{x-\mu}{\phi}\right)\;&(x<\mu)\\1-\frac{1}{2}\exp\left(-\frac{x-\mu}{\phi}\right)\;&(x\geq \mu)\end{cases}[/latex]</div> </li> <li><a href="/glossary/#local_probability">Probability density function</a> <div class="eq">[latex]f(x)=\frac{1}{2\phi}\exp\left(-\frac{|x-\mu|}{\phi}\right)
  • How to compute these on Excel.
     
    1
    2
    3
    4
    5
    6
    7
       
    8
       
    A B
    Data Description
    0.5 Value for which you want the distribution
    8 Value of parameter Mu
    2 Value of parameter Phi
    =(A2-A3)/A4 Standardized variable z
    Formula Description (Result)
    =IF(A2<A3,0.5*EXP(A5),1-0.5*EXP(-A5)) Cumulative distribution function for the terms above
    =0.5*EXP(-ABS(A5))/A4 Probability density function for the terms above

Quantile

  • Inverse function of cumulative distribution function
    F^{-1}(P)=\begin{cases}\phi\ln 2P+\mu\;&(P<0.5)\\-(\phi\ln 2(1-P)+\mu)\;&(P\geq 0.5)\end{cases}
  • How to compute this on Excel.
     
    1
    2
    3
    4
    5
    6
       
    A B
    Data Description
    0.7 Probability associated with the distribution
    1.7 Value of parameter Mu
    0.9 Value of parameter Phi
    Formula Description (Result)
    =IF(P<0.5,A4*LN(2*A2)+A3,-(A4*LN(2*(1-A2))+A3)) Inverse of the cumulative distribution function for the terms above

Characteristics

Mean – Where is the “center” of the distribution? (Definition)

  • Mean of the distribution is given as \mu.

Standard Deviation – How wide does the distribution spread? (Definition)

  • Variance of the distribution is given as
    2\phi^2

    Standard Deviation is a positive square root of Variance.

  • How to compute this on Excel
     
    1
    2
    3
    4
    A B
    Data Description
    2 Value of parameter Phi
    Formula Description (Result)
    =SQRT(2)*A2 Standard deviation of the distribution for the terms above

Skewness – Which side is the distribution distorted into? (Definition)

  • Skewness of the distribution is 0.

Kurtosis – Sharp or Dull, consequently Fat Tail or Thin Tail (Definition)

  • Kurtosis of the distribution is 3.

Random Numbers

  • Random number x is generated by inverse function method, which is for uniform random U,
    x=\begin{cases}\phi\ln 2U+\mu\;&(U<0.5)\\-(\phi\ln 2(1-U)+\mu)\;&(U\geq 0.5)\end{cases}
  • How to generate random numbers on Excel.
     
    1
    2
    3
    4
    5

       

    A B
    Data Description
    0.5 Value of parameter Mu
    0.5 Value of parameter Phi
    Formula Description (Result)
    =IF(NTRAND(100)<0.5,A3*LN(2*NTRAND(100))+A2,-(A3*LN(2*(1-NTRAND(100)))+A2)) 100 Laplace deviates based on Mersenne-Twister algorithm for which the parameters above

    Note The formula in the example must be entered as an array formula. After copying the example to a blank worksheet, select the range A5:A104 starting with the formula cell. Press F2, and then press CTRL+SHIFT+ENTER.

NtRand Functions

Not supported yet

Reference

 

Comments are closed.