1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Probability density of a new variable

  1. Sep 10, 2012 #1

    fluidistic

    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data
    Let X be a continuous random variable with parameters [itex]\langle x \rangle[/itex] and [itex]\sigma[/itex].
    Calculate the probability density of the variable Y=exp(X). Calculate the mean and the variance of Y.


    2. Relevant equations
    Reichl's 2nd edition book page 180:
    [itex]P_Y(y)=\sum _{-\infty}^{\infty} \delta (y-H(x))P_X(x)dx[/itex] where H(x)=Y, so I guess, H(x)=exp (x).


    3. The attempt at a solution
    I used the given formula and reached [itex]P_Y(y)=P_X (\ln y)[/itex]. Is this the correct answer?
    I don't really know how to calculate the mean, [itex]\langle y \rangle[/itex]. I guess they want it in function of the mean of X, namely [itex]\langle x \rangle[/itex].
    I know that [itex]\langle x \rangle=\int _{-\infty}^{\infty} xP_X(x)dx[/itex] and that [itex]\langle y \rangle=\int _{0}^{\infty} yP_Y(y)dy[/itex]. But this does not help me much. Any idea on how to continue further?
     
  2. jcsd
  3. Sep 10, 2012 #2

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    I hate using canned formulas without thoroughly understanding them, so I prefer to proceed from first principles. In this case, Y > 0 because exp(X) is never negative or zero. So, given a value y > 0 we have P{Y <= y} = P{exp(X) <= y} = P{X <= ln(y)} = F(ln(y)), where F is the cumulative distaribution of X. That is, FY(y) = FX(ln(y)). Now get the density of Y as fY(y) = d FY(y) /dy, which you can express in terms of fX. Now, even if we know m = EX and σ^2 = Var(X) that does not help: different fX, all having the same mean and variance, can give different values for EY and Var(Y). However, we can express EY and Var(Y) in terms of integrations involving y and fX(ln y).

    RGV
     
  4. Sep 10, 2012 #3

    fluidistic

    User Avatar
    Gold Member

    First let me thank you very much Ray for all the help so far.
    Ok this is what I've got, namely that [itex]P_Y(y)=P_X (\ln y)[/itex], using Dirac's delta.
    I am a bit lost here. Why do you take the derivative?
    Okay I'll try once I understand the previous point!
     
  5. Sep 10, 2012 #4

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Why the derivative? Well, F is the cumulative distribution, so to get the density you need to differentiate it! Surely you must know this.

    RGV
     
  6. Sep 10, 2012 #5

    fluidistic

    User Avatar
    Gold Member

    I had never read the term "cumulative distribution" before, nor does it appear in my textbook. But apparently it's "just" the distribution function and I had never seen the relationship between it and the probability density!
    So it means that what I've done using the definition in the book is wrong. I'll work on this tomorrow as I must wake up in a few hours.
    Thanks for the lesson.
     
  7. Sep 11, 2012 #6

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    It is true that the modifier 'cumulative' is often dropped nowadays, and we just say 'distribution function', but I was not sure what convention you or your book were following. However, I am shocked that you have not been exposed to the relation between the distribution function F and the density function f; that is absolutely one of the basic probability relations.

    What you did might not have been wrong; maybe your book uses a different notation or terminology from everyone else. Rather than relying on words and names, you need to look instead at ideas and concepts.

    RGV
     
  8. Sep 13, 2012 #7

    fluidistic

    User Avatar
    Gold Member

    Ok I have more time for the next days for these problems.
    I've checked my textbook, now I see the difference between the distribution function and the probability function, I also realize that the latter is the derivative of the former.
    However, even though the book uses that same terminology, it still clearly says
    And a few pages before,
    So the book uses the same notation as yours. Yet I found out (using the cookbook formula), [itex]P_Y(y)=P_X (\ln y)[/itex] while you found out [itex]F_Y(y) = F_X(ln(y))[/itex] which are two different things.
    I guess I haven't applied well the Dirac's delta then? Is the textbook wrong on that formula? Since my professor gave it in the course that seems rather strange, though possible of course.
     
  9. Sep 14, 2012 #8

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You need to be very, very careful about using things like ##\delta(y - H(x))## in an x-integral; that is why you obtained the wrong answer. Essentially, you need to change variables to z = H(x), with $$dz = H'(x) dx \longrightarrow
    dx = \frac{dz}{H'(H^{-1}(z))}.$$ For H(x) = exp(x), this implies
    $$ dz = z dx, \longrightarrow dx = dz/z.$$ We thus get
    $$ \int \delta(y - H(x)) f_X(x) \, dx = \int \delta(y - z) f_X(\ln z) \frac{dz}{z}
    = \frac{1}{y} f_X(\ln y).$$ This is exactly what you get if you apply the method I suggested before. It disagrees with your computation.

    Because use of the δ is so tricky, I prefer to avoid it like the plague. However, use it if you want, but be careful.

    RGV
     
  10. Sep 14, 2012 #9

    fluidistic

    User Avatar
    Gold Member

    Ok thank you infinitely for this. I've just played around with Dirac's delta and found an "intuitive way" (for me at least) not to fall into the trap I've fell over.
    If you're interested here is how I think about it: [itex]\int _{-\infty} ^{\infty} \delta (y-e^{x})P_X(x)dx[/itex]. Now I need to get the argument of the Dirac's delta equal to 0. This implies [itex]x=\ln y[/itex]. If I replace x by ln y in the expression, the dx becomes [itex]d \ln y = \frac{dy}{y}[/itex]. So that the integral is simply worth [itex]\frac{1}{y}P_X(\ln y)=P_Y(y)[/itex].
    Edit: Ok this would answer the first question.
    For the mean value, I get that [itex]\langle Y \rangle =\int _{-\infty} ^{\infty} y P_Y(y)dy= \int _0 ^{\infty} P_X (\ln y ) dy[/itex]. If I'm not wrong this is worth 1??!! Because the distribution is supposed to be normalized. (details: [itex]\int _0 ^{\infty} P_X (\ln y ) dy=\int _{-\infty}^{\infty}P_X(y)dy[/itex] but since y is a dummy variable, this is equal to [itex]\int _{-\infty}^{\infty}P_X(x)dx[/itex] and I'm sure this is worth 1.)
     
    Last edited: Sep 14, 2012
  11. Sep 14, 2012 #10

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    That is exactlywhat I did above.

    RGV
     
  12. Sep 14, 2012 #11

    fluidistic

    User Avatar
    Gold Member

    Yes I know :) I kind of reformulated what you wrote into my own "words".
    What do you think about the mean value I found?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook