Results 1 to 12 of 12

Math Help - Probability Density Functions Variance

  1. #1
    Junior Member
    Joined
    Sep 2009
    From
    Over there
    Posts
    30

    Probability Density Functions Variance

    I know how to calculate the variance of a set of numbers but not of a probability density function. I'm guessing it requires some calculus (which I'm not too great with). Could someone give me a few hints to get through this one?

    f(x) = ce^(2x), 0 < x < 1

    Determine Var(x)
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Jul 2009
    Posts
    593
    Thanks
    4
    You only need to know how to take the integral of a probability distribution function to determine the variance. So:

    c\int_0^1x^2(e^{2x})dx-\mu_{x}^2;

    is the "computational" form of the variance of a pdf over a certain limit of integration; all you need to know really is your sample mean, and you are good to go with plugging and chugging.
    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 sadmath View Post
    I know how to calculate the variance of a set of numbers but not of a probability density function. I'm guessing it requires some calculus (which I'm not too great with). Could someone give me a few hints to get through this one?

    f(x) = ce^(2x), 0 < x < 1

    Determine Var(x)
    Var(X) = E(X^2) - [E(X)]^2.

    E(X) = \int_0^1 x f(x) \, dx and E(X^2) = \int_0^1 x^2 f(x) \, dx.

    (The above integrals can be done using integration by parts).

    To get the value of c, you need to note that \int_0^1 x f(x) \, dx = 1.

    If you're studying probability distribution functions (pdf's), then you better get your calculus up to speed otherwise you're in for a world of pain.


    Edit: How to do the integrations is discussed here http://www.mathhelpforum.com/math-he...beyond-me.html
    Last edited by mr fantastic; September 25th 2009 at 04:10 PM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Junior Member
    Joined
    Sep 2009
    From
    Over there
    Posts
    30
    @ANDS!

    Thanks. I'm going to try to figure it out from your equation. Will post my results here.

    @Mr Fantastic

    are you missing a 'c' from those equations? or is it just implied to be to the left of the integral sign?
    Last edited by sadmath; September 26th 2009 at 05:01 AM. Reason: I just got back from learning basic english.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Junior Member
    Joined
    Sep 2009
    From
    Over there
    Posts
    30
    ok, so this is what I ended up with:

    E(X) = c \left ( {e^2 + 1} \over 4 \right )

    and

    E(X^2) = c \left ( {e^2 - 1} \over 4 \right )

    is this right?

    @Mr Fantastic:

    So is what you were saying about finding the value of c that

    E(X) = c \left ( {e^2 + 1} \over 4 \right ) = 1

    That doesn't seem right. I think I misunderstood. Could you clarify?
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,605
    Thanks
    1573
    Awards
    1
    Quote Originally Posted by sadmath View Post
    I think I misunderstood. Could you clarify?
    You are correct about that.
    You should the value of c first.

    Because \int_0^1 {e^{2x} dx}  = \frac{{e^2  - 1}}{2} and the total mass is 1 we get c = \frac{2}{{e^2  - 1}}
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Junior Member
    Joined
    Sep 2009
    From
    Over there
    Posts
    30
    Sigh... I'm going to take a break from this question, because I'm just not getting it. I'll come back to it soon.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Junior Member
    Joined
    Sep 2009
    From
    Over there
    Posts
    30
    Ok, I know it seems like you're hand-holding me through the entire process but I really don't get it.

    What is meant by the "total mass is 1" and how is c suddenly equal to the reciprocal of \int_0^1 {e^{2x} dx}  = \frac{{e^2  - 1}}{2}
    Follow Math Help Forum on Facebook and Google+

  9. #9
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,605
    Thanks
    1573
    Awards
    1
    If f(x) is probability distribution function then \int_{ - \infty }^\infty  {f(x)dx}  = 1.
    In this problem, outside [0,1] we have f(x)=0.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Junior Member
    Joined
    Sep 2009
    From
    Over there
    Posts
    30
    Var(X) = E(X^2) - \left[ E(X) \right]^2


    Since:
    \int_0^1 ce^{2x} = 1
    {c{e^{2} - 1} \over 2} = 1
    c = {2 \over {e^2 - 1}}

    E(X) = \int cxe^{2x}
    = {{c} \over {2}}xe^{2x} - {{c} \over {2}} \int e^{2x}dx
    = {{c} \over {2}} e^{2x}x - {{c} \over {4}} e^{2x} + C
    = ce^{2x} \left( {x \over 2} - {1 \over 4} \right) + C

    E(X^2) = \int cx^2e^{2x}
    = {c \over 2} e^{2x}x^2 - c \int e^{2x}xdx
    = {c \over 2} e^{2x}x^2 - {c \over 2} e^{2x}x + {c \over 2} int e^{2x} dx
    = {c \over 2} e^{2x}x^2 - {c \over 2} e^{2x}x + {c \over 4} e^{2x} + C
    = {ce^{2x} \over 4} \left( 2x^2 - 2x + 1 \right) + C

    Now we need to integrate from zero to one.
    E(X) = \int_0^1 cxe^{2x}
    = c \left | e^{2x} \left( {x \over 2}-{1 \over 4} \right) \right | _0^1
    = c \left[ e^2 \left( {1 \over 2} - {1 \over 4} \right) - e^0 \left( {0 \over 2} - {1 \over 4} \right) \right]
    = c \left({{e^2 + 1} \over 4} \right)

    E(X^2) = \int_0^1 cx^2e^{2x}
    = c \left | {{e^{2x}} \over 4} ( 2x^2 - 2x + 1 ) \right |_0^1
    = c \left [ {e^2 \over 4} (2 - 2 + 1) - {e^0 \over 4} \right ]
    = c \left ( {{e^2 - 1} \over 4} \right )

    Plugging in we get:
    Var(X) = c \left ( {{e^2-1} \over 4} \right) - \left [ c \left ( {{e^2 + 1} \over 4} \right ) \right ]^2
    = c \left({{e^2 - 1} \over 4} \right) - {{c^2(e^4 + 2e^2 + 1)} \over 16}
    = c \left({{e^2 - 1} \over 4} \right) - {{c^2(e^2 + 1)^2} \over 16}

    Now plug in the value of c:
    = {2 \over e^2 - 1} \left( {e^2 - 1 \over 4} \right) - {\left( {2 \over e^2 - 1} \right)^2(e^2 + 1)^2 \over 16}
    = {1 \over 4} - {e^2 + 1 \over 8}
    = {1 - e^2 \over 8}

    Therefore:
    Var(X) = {1 - e^2 \over 8}


    Is any of this right?


    NOTE: I had to translate from Open office's formula expressions to the latex ones used here. I don't think I made any error's but some of the equations may make no sense and then go back to what it would have been had it made sense. I hope that makes sense
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by sadmath View Post
    @ANDS!

    Thanks. I'm going to try to figure it out from your equation. Will post my results here.

    @Mr Fantastic

    are you missing a 'c' from those equations? or is it just implied to be to the left of the integral sign?
    c is in the rule for f(x). It appears when you substitute the rule for f(x).

    Quote Originally Posted by sadmath View Post
    Var(X) = E(X^2) - \left[ E(X) \right]^2


    Since:
    \int_0^1 ce^{2x} = 1
    {c{e^{2} - 1} \over 2} = 1
    c = {2 \over {e^2 - 1}}

    E(X) = \int cxe^{2x}
    = {{c} \over {2}}xe^{2x} - {{c} \over {2}} \int e^{2x}dx
    = {{c} \over {2}} e^{2x}x - {{c} \over {4}} e^{2x} + C
    = ce^{2x} \left( {x \over 2} - {1 \over 4} \right) + C

    E(X^2) = \int cx^2e^{2x}
    = {c \over 2} e^{2x}x^2 - c \int e^{2x}xdx
    = {c \over 2} e^{2x}x^2 - {c \over 2} e^{2x}x + {c \over 2} int e^{2x} dx
    = {c \over 2} e^{2x}x^2 - {c \over 2} e^{2x}x + {c \over 4} e^{2x} + C
    = {ce^{2x} \over 4} \left( 2x^2 - 2x + 1 \right) + C

    Now we need to integrate from zero to one.
    E(X) = \int_0^1 cxe^{2x}
    = c \left | e^{2x} \left( {x \over 2}-{1 \over 4} \right) \right | _0^1
    = c \left[ e^2 \left( {1 \over 2} - {1 \over 4} \right) - e^0 \left( {0 \over 2} - {1 \over 4} \right) \right]
    = c \left({{e^2 + 1} \over 4} \right)

    E(X^2) = \int_0^1 cx^2e^{2x}
    = c \left | {{e^{2x}} \over 4} ( 2x^2 - 2x + 1 ) \right |_0^1
    = c \left [ {e^2 \over 4} (2 - 2 + 1) - {e^0 \over 4} \right ]
    = c \left ( {{e^2 - 1} \over 4} \right )

    Plugging in we get:
    Var(X) = c \left ( {{e^2-1} \over 4} \right) - \left [ c \left ( {{e^2 + 1} \over 4} \right ) \right ]^2
    = c \left({{e^2 - 1} \over 4} \right) - {{c^2(e^4 + 2e^2 + 1)} \over 16}
    = c \left({{e^2 - 1} \over 4} \right) - {{c^2(e^2 + 1)^2} \over 16}

    Now plug in the value of c:
    = {2 \over e^2 - 1} \left( {e^2 - 1 \over 4} \right) - {\left( {2 \over e^2 - 1} \right)^2(e^2 + 1)^2 \over 16}
    = {1 \over 4} - {e^2 + 1 \over 8}
    = {1 - e^2 \over 8}

    Therefore:
    Var(X) = {1 - e^2 \over 8}


    Is any of this right?


    NOTE: I had to translate from Open office's formula expressions to the latex ones used here. I don't think I made any error's but some of the equations may make no sense and then go back to what it would have been had it made sense. I hope that makes sense
    Sorry, but I don't check details. Here's how you can check:

    The definite intergrals (omit the value of c) can be checked using WolframAlpha in the way that Plato has already shown. Then multiply the result by the value of c (which is just arithmetic, no calculus).
    Last edited by mr fantastic; September 26th 2009 at 03:19 PM.
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Junior Member
    Joined
    Sep 2009
    From
    Over there
    Posts
    30
    Quote Originally Posted by mr fantastic View Post
    c is in the rule for f(x). It appears when you substitute the rule for f(x).


    Sorry, but I don't check details. Here's how you can check:

    The definite intergrals (omit the value of c) can be checked using WolframAlpha in the way that Plato has already shown. Then multiply the result by the value of c (which is just arithmetic, no calculus).
    Alright, not entirely sure if it's right, but I'm just going to go with it. Thanks for all your help.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. probability density functions
    Posted in the Statistics Forum
    Replies: 10
    Last Post: November 23rd 2010, 03:19 AM
  2. Probability density functions
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: August 14th 2010, 03:51 PM
  3. Replies: 8
    Last Post: June 6th 2010, 05:43 PM
  4. Probability Density Functions
    Posted in the Advanced Statistics Forum
    Replies: 5
    Last Post: October 27th 2009, 06:45 AM
  5. probability density functions
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: March 12th 2008, 06:04 PM

Search Tags


/mathhelpforum @mathhelpforum