Results 1 to 7 of 7

Math Help - Laplace distribution

  1. #1
    Member
    Joined
    Jul 2005
    Posts
    187

    Laplace distribution

    I have equation that:
    f(x)=(\lambda/2)exp(-\lambda|x-a|)
    I need to find F(x).
    I think the answer is F(x)=(\lambda/2)exp(-\lambda|x-a|)
    but math book shows me that answer:
    F(x)=\left\{\begin{array}{cc}0.5exp(\lambda(x-a)),&\mbox{ if }<br />
x<a\\1-0.5exp(\lambda(a-x)), & \mbox{ if } x\geq a\end{array}\right.
    There are two different answers taking into account cases where x<a and x\geq a. Where do these considerations come from?
    What I did wrong?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member vincisonfire's Avatar
    Joined
    Oct 2008
    From
    Sainte-Flavie
    Posts
    469
    Thanks
    2
    Awards
    1
    Usually  F(x) stand for the primitive of the function.
    Using the definition of derivative, you can find  \frac{d(e^u)}{dx} = e^u \frac{du}{dx}
    You know that for  x<a than  |x-a| \implies -(x-a) and  x>a than  |x-a| \implies (x-a) Draw the graph of  y = |x-a| for example it will appear clear to you.
    You thus have
    <br />
f(x)=(\lambda/2)e^{(\lambda(x-a))}<br />
if  x<a and <br />
f(x)=(\lambda/2)e^{-(\lambda(x-a))}=(\lambda/2)e^{(\lambda(a-x))}<br />
if  x>a
    Now you fin the primitive of these. For example the seconde is <br />
F(x)=\frac{-1}{2}e^{(\lambda(a-x))}+C<br />
With initial condition you find that C = 1
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by totalnewbie View Post
    I have equation that:
    f(x)=(\lambda/2)exp(-\lambda|x-a|)
    I need to find F(x).
    I think the answer is F(x)=(\lambda/2)exp(-\lambda|x-a|)
    but math book shows me that answer:
    F(x)=\left\{\begin{array}{cc}0.5exp(\lambda(x-a)),&\mbox{ if }<br />
x<a\\1-0.5exp(\lambda(a-x)), & \mbox{ if } x\geq a\end{array}\right.
    There are two different answers taking into account cases where x<a and x\geq a. Where do these considerations come from?
    What I did wrong?
    f(x) = \frac{\lambda}{2} \, e^{-\lambda (x - a)} if x - a \geq 0 \Rightarrow x \geq a.


    f(x) = \frac{\lambda}{2} \, e^{-\lambda (a - x)} if x - a < 0 \Rightarrow x < a.


    Both cases have to be considered seperately when calculating F(x).

    Read this: http://en.wikipedia.org/wiki/Laplace_distribution
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor chiph588@'s Avatar
    Joined
    Sep 2008
    From
    Champaign, Illinois
    Posts
    1,163
    what initial conditions give you C=1?
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor chiph588@'s Avatar
    Joined
    Sep 2008
    From
    Champaign, Illinois
    Posts
    1,163
    Wait never mind, I see it.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Member
    Joined
    Jul 2005
    Posts
    187
    <br />
F'(x)=0.5exp^{(\lambda x-\lambda a)}\frac {d}{dx}=0.5e^{(\lambda x- \lambda a)}*\lambda=0.5\lambda e^{(\lambda(x-a))}<br />
    <br />
F'(x)=-0.5exp^{(\lambda a-\lambda x)}\frac {d}{dx}=-0.5e^{( \lambda a- \lambda x)}*{(- \lambda)=0.5\lambda}e^{(\lambda(a-x))}<br />
    Funny, taking the derivative of the primitive function doesn't give to me the right answer.

    And inital condition is that \int f(x) dx = 1
    And:
    \int 0.5\lambda e^{(\lambda(x-a))}dx= 0.5exp^{(\lambda x-\lambda a)} -1
    \int 0.5\lambda e^{(\lambda(a-x))}dx= -0.5exp^{(\lambda a-\lambda x)} -1
    Last edited by totalnewbie; November 9th 2008 at 01:23 AM.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by mr fantastic View Post
    f(x) = \frac{\lambda}{2} \, e^{-\lambda (x - a)} if x - a \geq 0 \Rightarrow x \geq a.


    f(x) = \frac{\lambda}{2} \, e^{-\lambda (a - x)} if x - a < 0 \Rightarrow x < a.


    Both cases have to be considered seperately when calculating F(x).

    Read this: Laplace distribution - Wikipedia, the free encyclopedia
    x \geq a:

    F(x) = \int_{-\infty}^{x} \frac{\lambda}{2} \, e^{-\lambda (t - a)} \, dt = 1 - \int_{x}^{+\infty} \frac{\lambda}{2} \, e^{-\lambda (t - a)} \, dt

    Substitute u = t - a:

    = 1 - \frac{\lambda}{2} \, \int_{x-a}^{+\infty} \, e^{-\lambda u} \, du = 1 - \frac{1}{2} \, \left[ e^{-\lambda u} \right]_{x-a}^{+\infty}

    = 1 - \frac{1}{2} \, e^{-\lambda (x - a)}.



    x < a:

    F(x) = \int_{-\infty}^{x} \frac{\lambda}{2} \, e^{-\lambda (a - t)} \, dt

    Substitute u = t - a:

    = \frac{\lambda}{2} \, \int^{x-a}_{-\infty} \, e^{\lambda u} \, du = \frac{1}{2} \, \left[ e^{\lambda u} \right]^{x-a}_{-\infty}

    = \frac{1}{2} \, e^{\lambda (x - a)}.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Laplace distribution
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: November 22nd 2011, 02:20 AM
  2. Replies: 1
    Last Post: June 9th 2010, 01:01 AM
  3. Laplace Distribution
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: March 3rd 2010, 01:36 PM
  4. Fourier Transform and Laplace distribution
    Posted in the Advanced Applied Math Forum
    Replies: 7
    Last Post: February 16th 2010, 04:48 AM
  5. Conjugate prior of a Laplace distribution
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: December 9th 2009, 05:38 AM

Search Tags


/mathhelpforum @mathhelpforum