Results 1 to 8 of 8

Math Help - Expected value of normal function (conditional)

  1. #1
    Newbie
    Joined
    Oct 2008
    Posts
    5

    Expected value of normal function (conditional)

    Hi Guys

    I am trying to find the expected value of Y given that Y>0 and Y ~ N(-3,16)

    The answer I get is not reasonable so I am trying to work out where I went wrong.

    E(x) = \frac{1}{1-Fy(0)}\int_{0}^{+\infty}xfy(x)\,dx

    Now, evaluating \int_{0}^{+\infty}xfy(x)\,dx = \int_{0}^{+\infty}\frac{x}{4\sqrt{2\pi}}\,e^-1/2(\frac{x+3}{4})^2\, dx

    I used integration using substitution, using z = (x+3)/4 and after splitting up the integral, arrived at an integral (between 3/4 and infinity) minus 2 * P(Z>3/4)

    After working out the value for E(x) I get a negative number.

    Any help would be appreciated,

    Thanks,

    Thomas
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by tompa909 View Post
    Hi Guys

    I am trying to find the expected value of Y given that Y>0 and Y ~ N(-3,16)

    The answer I get is not reasonable so I am trying to work out where I went wrong.

    E(x) = \frac{1}{1-Fy(0)}\int_{0}^{+\infty}xfy(x)\,dx

    Now, evaluating \int_{0}^{+\infty}xfy(x)\,dx = \int_{0}^{+\infty}\frac{x}{4\sqrt{2\pi}}\,e^-1/2(\frac{x+3}{4})^2\, dx

    I used integration using substitution, using z = (x+3)/4 and after splitting up the integral, arrived at an integral (between 3/4 and infinity) minus 2 * P(Z>3/4)

    After working out the value for E(x) I get a negative number.

    Any help would be appreciated,

    Thanks,

    Thomas
    Y(Y | Y > 0) = \int_{-\infty}^{+\infty} y \, f(y | Y > 0) \, dy = \int_{0}^{+\infty} y \, \frac{f(y)}{\Pr(Y > 0)} \, dy = \frac{\int_{0}^{+\infty} y \, f(y) \, dy}{\Pr(Y > 0)}

    where f(y) is the pdf for Y.

    Use technology to calculate \Pr(Y > 0) and \int_{0}^{+\infty} y \, f(y) \, dy.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Oct 2008
    Posts
    5
    Thanks you for your reply,

    I still wish to work out the integral by hand though.

    P(Y>0) is easy to work out however I am making a mistake somewhere in the process of solving the integral for the expected value of the normal function between 0 and infinity.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by tompa909 View Post
    Thanks you for your reply,

    I still wish to work out the integral by hand though.

    P(Y>0) is easy to work out however I am making a mistake somewhere in the process of solving the integral for the expected value of the normal function between 0 and infinity.
    Unless you're willing to use the Error Function, Pr(Y > 0) cannot be done by hand.

    Show the details of your calculation of the integral \int_{0}^{+\infty} y \, f(y) \, dy.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Oct 2008
    Posts
    5
    Ok, I am allowed to standardize P(Y>0) and get the probability using Z-tables.

    With the integral I have,

    \int_{0}^{+\infty} y \, \frac{1}{4\,\sqrt{2\pi}} \, e^{-\frac{1}{2}(\frac{y+3}{4})^2} \, dy

    Using substitution z = (y+3)/4, we get y = 4z-3 dy = 4dz

    \int_{3/4}^{+\infty} \, \frac{4z-3}{\sqrt{2\pi}} \, e^{-\frac{1}{2}z^2} \, dz

    \int_{3/4}^{+\infty} \, \frac{4z}{\sqrt{2\pi}} \, e^{-\frac{1}{2}z^2} \, dz \, - \int_{3/4}^{+\infty} \, \frac{3}{\sqrt{2\pi}} \, e^{-\frac{1}{2}z^2} \, dz

    \frac{4}{\sqrt{2\pi}}\int_{3/4}^{+\infty} \, z \, e^{-\frac{1}{2}z^2} \, dz \, - 12\int_{3/4}^{+\infty} \, \frac{1}{4\sqrt{2\pi}} \, e^{-\frac{1}{2}z^2} \, dz

    \frac{4}{\sqrt{2\pi}} \, (-e^{-\frac{1}{2}(+\infty)^2}--e^{-\frac{1}{2}(\frac{3}{4})^2}) - 12 * P(Z > 3/4)

    \frac{4}{\sqrt{2\pi}} \, (0.75484) - 12 * 0.2266

    Thus
    \int_{0}^{+\infty} y \, \frac{1}{4\,\sqrt{2\pi}} \, e^{-\frac{1}{2}(\frac{y+3}{4})^2} \, dy = -1.51465

    Going back to original question

    E(Y|Y>0) =
    \frac{\int_{0}^{+\infty} y \, f(y) \, dy}{\Pr(Y > 0)}= \frac{-1.51465}{P(Y>0)} = \frac{-1.51465}{P(Z>3/4)} =\frac{-1.51465}{0.2266} = -6.68425

    Thanks for your help
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by tompa909 View Post
    Ok, I am allowed to standardize P(Y>0) and get the probability using Z-tables.

    With the integral I have,

    \int_{0}^{+\infty} y \, \frac{1}{4\,\sqrt{2\pi}} \, e^{-\frac{1}{2}(\frac{y+3}{4})^2} \, dy

    Using substitution z = (y+3)/4, we get y = 4z-3 dy = 4dz

    \int_{3/4}^{+\infty} \, \frac{4z-3}{\sqrt{2\pi}} \, e^{-\frac{1}{2}z^2} \, dz

    \int_{3/4}^{+\infty} \, \frac{4z}{\sqrt{2\pi}} \, e^{-\frac{1}{2}z^2} \, dz \, - \int_{3/4}^{+\infty} \, \frac{3}{\sqrt{2\pi}} \, e^{-\frac{1}{2}z^2} \, dz

    \frac{4}{\sqrt{2\pi}}\int_{3/4}^{+\infty} \, z \, e^{-\frac{1}{2}z^2} \, dz \, - 12\int_{3/4}^{+\infty} \, \frac{1}{4\sqrt{2\pi}} \, e^{-\frac{1}{2}z^2} \, dz *

    \frac{4}{\sqrt{2\pi}} \, (-e^{-\frac{1}{2}(+\infty)^2}--e^{-\frac{1}{2}(\frac{3}{4})^2}) - 12 * P(Z > 3/4)

    \frac{4}{\sqrt{2\pi}} \, (0.75484) - 12 * 0.2266

    Thus \int_{0}^{+\infty} y \, \frac{1}{4\,\sqrt{2\pi}} \, e^{-\frac{1}{2}(\frac{y+3}{4})^2} \, dy = -1.51465

    Going back to original question

    E(Y|Y>0) =
    \frac{\int_{0}^{+\infty} y \, f(y) \, dy}{\Pr(Y > 0)}= \frac{-1.51465}{P(Y>0)} = \frac{-1.51465}{P(Z>3/4)} =\frac{-1.51465}{0.2266} = -6.68425

    Thanks for your help
    In the line marked * why do you have 12 \int_{3/4}^{+\infty} \, \frac{1}{{\color{red}4}\sqrt{2\pi}} \, e^{-\frac{1}{2}z^2} \, dz ? This is NOT equal to 12 Pr(Z > 3/4).

    You should have left it as 3 \int_{3/4}^{+\infty} \, \frac{1}{\sqrt{2\pi}} \, e^{-\frac{1}{2}z^2} \, dz = 3 \Pr(Z > 3/4).

    Then you'll get the correct answer.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Oct 2008
    Posts
    5
    Thanks heaps for your help, that worked perfectly

    Best Regards

    Thomas
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by tompa909 View Post
    Thanks heaps for your help, that worked perfectly

    Best Regards

    Thomas
    Thankyou for your excellent manners:

    1. A post of thanks.
    2. A 'click' of thanks.
    3. A post that let me know of your success.
    4. An earlier post that gave full details of your calculations, as requested (which made it very simple for me to give you the help you needed).
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. conditional expected value of bivariate normal
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: December 11th 2009, 10:06 AM
  2. Normal Distribution Expected Value
    Posted in the Advanced Statistics Forum
    Replies: 4
    Last Post: December 3rd 2009, 06:18 PM
  3. expected value of conditional density funtion (urgent)
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: September 24th 2009, 10:07 PM
  4. Expected value conditional
    Posted in the Statistics Forum
    Replies: 1
    Last Post: September 16th 2009, 04:48 AM
  5. Expected Value and markov conditional distribution
    Posted in the Advanced Statistics Forum
    Replies: 4
    Last Post: April 29th 2009, 05:50 PM

Search Tags


/mathhelpforum @mathhelpforum