Results 1 to 3 of 3

Math Help - Find variance of g(x)

  1. #1
    Senior Member
    Joined
    Oct 2009
    Posts
    295
    Thanks
    9

    Find variance of g(x)

    I'm having trouble getting the answer here.

    g(X)=3X-2

    Density function:
    f(x)=\left\{\begin{array}{cc}\frac{1}{4}e^\frac{-x}{4},&\mbox{ if }x>0 \\0, & \mbox{ elsewhere }\end{array}\right.

    I used:

     var(g(X))=E(g(X)^2)-[E(g(X))]^2

    So I got:

    E(g(X))= \int g(X)f(x)=\int(3X-2)(\frac{1}{4}e^\frac{-x}{4})

    =\int\frac{3}{4}Xe^\frac{-x}{4}-\int\frac{1}{2}e^\frac{-x}{4}

    =\frac{3}{4}[-4Xe^\frac{-x}{4}+4\int e^\frac{-x}{4}dx]-\int\frac{1}{2}e^\frac{-x}{4}

    =\frac{3}{4}[-4Xe^\frac{-x}{4}-16  e^\frac{-x}{4}]+2e^\frac{-x}{4}

    =-3Xe^\frac{-x}{4}-10e^\frac{-x}{4}\mid \begin{array}{cc}\infty\\0\end{array}


    =0-(-10)=10

    Nevermind, I think I've got it right but if someone would double check my work that'd be great. Thanks.
    However, the answer should be 10, so the signs are switched up somewhere in there but I can't find where. Apparently, this first part of the problem is the only part that's wrong. If someone could help me, that'd be awesome. After typing the second part out and redoing the math, see that it's right.

    E(g(X)^2)= \int(3X-2)^2 f(x) = \int(9X^2 -12X+4)(\frac{1}{4}e^\frac{-x}{4})

    =\frac{9}{4}\int X^2 e^\frac{-x}{4}-3\int Xe^\frac{-x}{4}+\int e^\frac{-x}{4}

    =\frac{9}{4}[X^2 e^\frac{-x}{4}+4\int 2Xe^\frac{-x}{4}]-3\int Xe^\frac{-x}{4}+\int e^\frac{-x}{4}

    =\frac{9}{4}[-4X^2 e^\frac{-x}{4}+8[-4Xe^\frac{-x}{4}+4\int e^\frac{-x}{4}]]-3\int Xe^\frac{-x}{4}+\int e^\frac{-x}{4}

    =\frac{9}{4}[-4X^2 e^\frac{-x}{4}+8[-4Xe^\frac{-x}{4}-16e^\frac{-x}{4}]]-3\int Xe^\frac{-x}{4}+\int e^\frac{-x}{4}

    =\frac{9}{4}[-4X^2  e^\frac{-x}{4}+8[-4Xe^\frac{-x}{4}-16e^\frac{-x}{4}]]-3[-4Xe^\frac{-x}{4}+4\int e^\frac{-x}{4}]+\int e^\frac{-x}{4}

    =\frac{9}{4}[-4X^2   e^\frac{-x}{4}+4[-8Xe^\frac{-x}{4}-16e^\frac{-x}{4}]]-3[-4Xe^\frac{-x}{4}-16e^\frac{-x}{4}]+\int e^\frac{-x}{4}

    =\frac{9}{4}[-4X^2    e^\frac{-x}{4}+8[-4Xe^\frac{-x}{4}-16e^\frac{-x}{4}]]-3[-4Xe^\frac{-x}{4}-16e^\frac{-x}{4}]-4e^\frac{-x}{4}

    =-9X^2e^\frac{-x}{4}-72Xe^\frac{-x}{4}-288e^\frac{-x}{4}+12Xe^\frac{-x}{4}+48e^\frac{-x}{4}-4e^\frac{-x}{4}

    =-9X^2e^\frac{-x}{4}-60Xe^\frac{-x}{4}-244e^\frac{-x}{4}\mid \begin{array}{cc}\infty\\0\end{array}

    =0-(0-0-244)=244

    This part is correct because the final answer is supposed to be 144

    So finally:

    var(g(X))= 244-(-10)^2= 144

    It's the right answer, but for the first part it should be 10, not-10.
    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 downthesun01 View Post
    I'm having trouble getting the answer here.

    g(X)=3X-2

    Density function:
    f(x)=\left\{\begin{array}{cc}\frac{1}{4}e^\frac{-x}{4},&\mbox{ if }x>0 \\0, & \mbox{ elsewhere }\end{array}\right.

    I used:

     var(g(X))=E(g(X)^2)-[E(g(X))]^2

    So I got:

    E(g(X))= \int g(X)f(x)=\int(3X-2)(\frac{1}{4}e^\frac{-x}{4})

    =\int\frac{3}{4}Xe^\frac{-x}{4}-\int\frac{1}{2}e^\frac{-x}{4}

    =\frac{3}{4}[-4Xe^\frac{-x}{4}+4\int e^\frac{-x}{4}dx]-\int\frac{1}{2}e^\frac{-x}{4}

    =\frac{3}{4}[-4Xe^\frac{-x}{4}-16 e^\frac{-x}{4}]+2e^\frac{-x}{4}

    =-3Xe^\frac{-x}{4}-10e^\frac{-x}{4}\mid \begin{array}{cc}\infty\\0\end{array}


    =0-(-10)=10

    Nevermind, I think I've got it right but if someone would double check my work that'd be great. Thanks.
    However, the answer should be 10, so the signs are switched up somewhere in there but I can't find where. Apparently, this first part of the problem is the only part that's wrong. If someone could help me, that'd be awesome. After typing the second part out and redoing the math, see that it's right.

    E(g(X)^2)= \int(3X-2)^2 f(x) = \int(9X^2 -12X+4)(\frac{1}{4}e^\frac{-x}{4})

    =\frac{9}{4}\int X^2 e^\frac{-x}{4}-3\int Xe^\frac{-x}{4}+\int e^\frac{-x}{4}

    =\frac{9}{4}[X^2 e^\frac{-x}{4}+4\int 2Xe^\frac{-x}{4}]-3\int Xe^\frac{-x}{4}+\int e^\frac{-x}{4}

    =\frac{9}{4}[-4X^2 e^\frac{-x}{4}+8[-4Xe^\frac{-x}{4}+4\int e^\frac{-x}{4}]]-3\int Xe^\frac{-x}{4}+\int e^\frac{-x}{4}

    =\frac{9}{4}[-4X^2 e^\frac{-x}{4}+8[-4Xe^\frac{-x}{4}-16e^\frac{-x}{4}]]-3\int Xe^\frac{-x}{4}+\int e^\frac{-x}{4}

    =\frac{9}{4}[-4X^2 e^\frac{-x}{4}+8[-4Xe^\frac{-x}{4}-16e^\frac{-x}{4}]]-3[-4Xe^\frac{-x}{4}+4\int e^\frac{-x}{4}]+\int e^\frac{-x}{4}

    =\frac{9}{4}[-4X^2 e^\frac{-x}{4}+4[-8Xe^\frac{-x}{4}-16e^\frac{-x}{4}]]-3[-4Xe^\frac{-x}{4}-16e^\frac{-x}{4}]+\int e^\frac{-x}{4}

    =\frac{9}{4}[-4X^2 e^\frac{-x}{4}+8[-4Xe^\frac{-x}{4}-16e^\frac{-x}{4}]]-3[-4Xe^\frac{-x}{4}-16e^\frac{-x}{4}]-4e^\frac{-x}{4}

    =-9X^2e^\frac{-x}{4}-72Xe^\frac{-x}{4}-288e^\frac{-x}{4}+12Xe^\frac{-x}{4}+48e^\frac{-x}{4}-4e^\frac{-x}{4}

    =-9X^2e^\frac{-x}{4}-60Xe^\frac{-x}{4}-244e^\frac{-x}{4}\mid \begin{array}{cc}\infty\\0\end{array}

    =0-(0-0-244)=244

    This part is correct because the final answer is supposed to be 144

    So finally:

    var(g(X))= 244-(-10)^2= 144

    It's the right answer, but for the first part it should be 10, not-10.
    Life is much much easier if you just use the simple fact that Var(3X - 2) = 3^2 Var(X). Now note that Var(X) = 16 (see here: Exponential distribution - Wikipedia, the free encyclopedia)
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Senior Member
    Joined
    Oct 2009
    Posts
    295
    Thanks
    9
    You're so right. I completely forgot about that. We just went over it in class on Tuesday. Thanks for the input.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. What is the best way to find the variance?
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: October 7th 2010, 04:59 AM
  2. Find the Variance
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: May 5th 2010, 03:08 PM
  3. Find mean and variance
    Posted in the Statistics Forum
    Replies: 1
    Last Post: December 6th 2009, 05:42 PM
  4. find variance
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: April 30th 2009, 08:21 PM
  5. How to find the variance
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: April 11th 2009, 04:43 PM

Search Tags


/mathhelpforum @mathhelpforum