Asymmetric Laplace Distribution

In this section we develop an asymmetric Laplace distribution from the difference of two exponential random variables.  The exponent of this random variable leads to a double Pareto distribution.  For papers on this subject follow the path to William Reed on the reference page.  Mathematica provides a symmetric Laplace distribution (essentially a double exponential distribution).  If we take the distribution of the difference of two exponential random variables with different scale factors we can generate the asymmetric Laplace distribution.  The distribution's characteristic function can be written as the product of two exponential characteristic functions.  α and β are scale factors with α > 0 && β > 0.

cfa=CharacteristicFunction[ExponentialDistribution[α],t]
cfb= CharacteristicFunction[ExponentialDistribution[β],-t]
cfl=FullSimplify[cfa cfb,t∈Reals]

The density of this distribution is:

f= InverseFourierTransform[((α β)/((t+I α) (t-I β))),t,x,FourierParameters->{1,1},Assumptions-> {α>0,β>0}]
Integrate[f,{x,-∞,∞}]

Plot[f/.{α-> 1,β-> 2},{x,-5,5},PlotLabel-> "Asymmetric Laplace Density\nα = 1\nβ = 2",Frame-> True]

The distribution function becomes:

F=Integrate[f,{x,-∞, t}, Assumptions-> {α>0,β>0,t∈Reals}]/.t->x

Plot[F/.{α-> 1,β-> 2},{x,-5,5},PlotLabel-> "Asymmetric Laplace Distribution\nα = 1\nβ = 2",Frame-> True]

Note that in the references you will find the asymmetric Laplace distribution defined piecewise.  This density function has the same characteristic function

f1=al= Piecewise[{{α β Exp[β x]/(α+β), x≤0},
{α β Exp[-α x]/(α+β), x>0}}]
FourierTransform[f1,x,t,FourierParameters->{1,1},Assumptions-> {α>0,β>0}]

Normal Laplace Distribution

We now derive the Normal Laplace distribution as a convolution of normal and asymmetric Laplace random variables.  Theoretically we ought to be able to invert the product of the normal characteristic function and the asymmetric Laplace function, but Mathematica can't seem to do this.  It can, however, do the convolution.

fn=PDF[NormalDistribution[μ,σ],x-y]

f2=f/.x->y

fnl = Integrate[fn f2,{y,-∞,∞},Assumptions-> {α>0,β>0,σ>0,μ∈Reals,x∈Reals}]

NLPDF[x_, μ_,σ_,α_,β_]:=((α β ((E^((1/2) α (-2 x+2 μ+α (σ^2)))) Erfc[((-x+μ+α (σ^2))/((Sqrt[2]) σ))]+(E^((1/2) β (2 x-2 μ+β (σ^2)))) Erfc[((x-μ+β (σ^2))/((Sqrt[2]) σ))]))/(2 (α+β)));

Integrate[NLPDF[x, μ,σ,α,β],{x,-∞,∞},Assumptions-> {α>0,β>0,σ>0,μ∈Reals}]

Plot[{NLPDF[x,0,1,1,2],NLPDF[x,1,1.5,1,2],NLPDF[x,0,2,1,2],NLPDF[x,1,2,1,2]},{x,-10,10}]

The distribution function is:

Integrate[NLPDF[x, μ,σ,α,β],{x,-∞,t},Assumptions-> {α>0,β>0,σ>0,μ∈Reals,t∈Reals}]/.t-> x

NLCDF[x_, μ_,σ_,α_,β_]:= (1/(2 (α+β)))(α+β-2 (E^((1/2) α (-2 x+2 μ+α (σ^2)))) β+(α+β) Erf[((x-μ)/((Sqrt[2]) σ))]+(E^((1/2) α (-2 x+2 μ+α (σ^2)))) β Erfc[-((-x+μ+α (σ^2))/((Sqrt[2]) σ))]+(E^((1/2) β (2 x-2 μ+β (σ^2)))) α Erfc[((x-μ+β (σ^2))/((Sqrt[2]) σ))]);

Plot[{NLCDF[x,0,1,1,2],NLCDF[x,1,1,1.5,2],NLCDF[x,0,2,1,2],NLCDF[x,1,2,1,2]},{x,-10,10}]

Random variables for this distribution can be generated simply enough as the sum of a normal random variable with the difference of two exponential random variables.

s=RandomReal[ExponentialDistribution[1],10000]- RandomReal[ExponentialDistribution[2],10000]+RandomReal[NormalDistribution[0,1],10000];

g1=Plot[NLPDF[x,0,1,1,2],{x,Min[s],Max[s]},PlotRange->All,PlotStyle->Thickness[0.008]];
Needs["Histograms`"];
g2=Histogram[s,HistogramScale->1];
Show[g2,g1,PlotLabel-> "Normal Laplace Random Variables\nμ = 0, σ = 1\nα = 1.0, β = 2.0"]

In the next section we will look at the double Pareto-lognormal distribution.

txcolor=RGBColor[181/255,18/255,27/255];
t1 = Graphics[Text[Hyperlink[Framed[Style["Financial Home", {txcolor, Bold, Larger}]], "../map/Overview.html"], {-5, 0}]];
t2 = Graphics[Text[Hyperlink[Framed[Style["Next", {txcolor, Bold, Larger}]], "../s07c/DoubleParetoLogNormal.html"], {0, -0.5}]];
t3 = Graphics[Text[Hyperlink[Framed[Style["Download Notebook", {txcolor, Bold, Larger}]], "../s07b/Laplace.nb"], {5, 0}]];
t4 = Graphics[Text[Hyperlink[Framed[Style["Previous", {txcolor, Bold, Larger}]],  "../s07a/PowerTail.html"], {0, 0.5}]];
Show[ t1, t2, t3, t4, ImageSize -> 500]
CellPrint[TextCell["\n\n© Copyright " <> ToString[DateList[][[1]]] <> " mathestate    " <> DateString[DateList[], "DateShort"], "Text"]]

© Copyright 2007 mathestate    Fri 28 Dec 2007