Download Laplace Distribution - Paul Johnson Homepage

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Central limit theorem wikipedia , lookup

Transcript
Laplace Distribution
Raminta Stockute and Paul Johnson
June 10, 2013
1
Introduction
This is a continuous probability distribution. It is named after a French mathematician.
Wikipedia points out that it is also known as a double exponential distribution, because it
reminds one of an exponential distribution “spliced together back-to-back.”
The most outstandanding characteristics of this distribution are that it is unimodal and
symmetric.
2
Mathematical definition
This distribution is characterized by location θ (any real number) and scale λ (has to be
greater than a 0) parameters.
The probability density function of Laplace(θ, λ) is:
|x − θ|
1
.
f (x|θ, λ) = exp −
2λ
λ
!
The cumulative density function looks even more impressive, yet rather easy to integrate
because of the absolute value in the formula:
1
|x − θ|
F (x|θ, λ) = exp −
, when (x ≤ θ) .
2
λ
!
and
1
|θ − x|
F (x|θ, λ) = 1 − exp −
, when (x > θ) .
2
λ
!
The exponential distribution’s probability density is defined for x > 0
1
Exponential(λ) : f (x|λ) = exp(−x/λ), x > 0
λ
Unlike the exponential, the Laplace is defined −∞ < x < ∞.
1
If θ = 0, then the probability density function for Laplace on x > 0 is equal to 1/2 of the
probability of the exponential. In Figure 1, we illustrate this fact by plotting the probability
density of the Laplace on (−15, 15) side-by-side with an exponential distribution, and then
in the figure below, one can observe that if the exponential is divided by half, then it is equal
to the Laplace. The R code which generates the figure is:
par ( mfrow=c ( 2 , 2 ) )
x1 <− s e q ( −15 , 1 5 , by = 0 . 0 5 )
m y l a p l a c e 1 <− d l a p l a c e ( x1 , l o c a t i o n = 0 , s c a l e = 1 )
p l o t ( x1 , mylaplace1 , type = " l " , x l a b = " x " , y l a b = "P( x ) " ,
main=" Laplace , l o c a t i o n =0, s c a l e =1" )
x2 <− s e q ( 0 , 1 5 , by = 0 . 0 5 )
myexp1 <− dexp ( x2 , r a t e = 1 )
p l o t ( x2 , myexp1 , type = " l " , x l a b = " x " , y l a b = "P( x ) " , main = "
E x p o ne nt i al , r a t e =1" )
myexp2 <− 0 . 5 ∗ dexp ( x1 , r a t e =1)
p l o t ( x1 , myexp2 , type = " l " , x l a b = " x " , y l a b = " 0 . 5 ∗P( x ) " , main
= " 0 . 5 ∗ E x p o n e n t i a l PDF" )
l i b r a r y (VGAM)
l i b r a r y (VGAM)
3
Moments
The expected value of a Laplace distribution is
E(x) = θ
As in the case of other symmetrical distributions, such as the Normal and the logistic
distributions, Laplace’s location is the same as its mean, median, and mode.
The variance is:
V ar(x) = 2λ2 .
4
Illustrations
From the Figure 2, we see that the scale parameter determines the width of the distribution.
From Figure 3, it is apparent that changing the location simply shifts the probability density
curve to the right or to the left.
The Laplace can be compared against the Normal distribution. Recall that a Normal
distribution N (µ, σ 2 ) has an expected value of µ and a variance equal to σ 2 . Suppose we
fix the mean of a Normal to equal the mean of a Laplace distribution, and then also match
the variances of the two. In Figure 4, we compare N (4, 8) and L(4, 2), both of which have
variance equal to 8. The distributions appear to be quite similar, except that Laplace has
higher spike and slightly thicker tails .
2
l i b r a r y (VGAM)
l i b r a r y (VGAM)
5
Conclusion
If we have real-valued observations, the errors can be distributed either in normal or in
Laplace. Let is take gene expression data as an example. A distribution of gene expression
errors tends to be in Laplace form. Better yet, if the distribution is a bit asymmetric, there
is an Asymmetric Laplace to allow for this asymmetry.
3
Figure 1: Laplace and Exponential
0.0
−15
−5
0
5
10
15
0
x
0.4
0.2
0.0
−15
−5
0
5
10
x
0.5*Exponential PDF
0.5*P(x)
0.4
P(x)
0.2
0.0
P(x)
0.8
Exponential, rate=1
0.4
Laplace, location=0, scale=1
5
10
15
x
4
15
Laplace(4,2)
Laplace(4,4)
Laplace(4,8)
0.00
0.05
0.10
P(x)
0.15
0.20
0.25
Figure 2: Laplace Density Function
0
5
x
5
10
Figure 3: Impact of location change on Laplace Density Function
0.5
Laplace, scale=1
0.0
0.1
0.2
P(x)
0.3
0.4
location=−2
location=2
location=5
location=10
−15
−10
−5
0
x
6
5
10
15
0.25
Figure 4: Laplace and Normal Densities
0.15
0.10
0.00
0.05
P(x)
0.20
Laplace(4,2)
Normal(4,8)
−5
0
5
10
15
x
0.05
Expanded view, x>8
0.03
0.02
0.01
0.00
P(x)
0.04
Laplace(4,2)
Normal(4,8)
8
10
12
14
x
7
16
18
20