Results 1 to 6 of 6

Math Help - Moment generating function

  1. #1
    Newbie
    Joined
    Oct 2009
    Posts
    20

    Moment generating function

    I'm trying to work out a practice problem but it seems like the way I'm doing it is so off track.

    The goal is to find u'2 or the second moment generating function evaluated at t=0 for the random variable x with probability density

    x/2 for 0<x<2
    0 elsewhere

    I started with 1/2*int(x*e^(tx),x, 0, 2)
    (integrate x from 0 to 2) using the integration by parts I get this long integration of

    .5[1/t*e^(tx)-1/t[1/te^(tx)]

    Is the way I'm doing it even right up until this part? If it isn't how should I be doing it, and if it is, do I just take the derivative twice here with respect to t?

    More generally, I think my question and confusion lies with this: If the probability density is given to be continuous like the one above but only from say 0 to 2 or 1 to infinity. Am I still integrating e^(tx)f(x) from 0 to infinity when I try to find the mgf? or am I only integrating from the defined 0 to 2 or 1 to infinity?

    thanks a lot to anyone who can make this subject just a little simpler for me!
    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 xuyuan View Post
    I'm trying to work out a practice problem but it seems like the way I'm doing it is so off track.

    The goal is to find u'2 or the second moment generating function evaluated at t=0 for the random variable x with probability density

    x/2 for 0<x<2
    0 elsewhere

    I started with 1/2*int(x*e^(tx),x, 0, 2)
    (integrate x from 0 to 2) using the integration by parts I get this long integration of

    .5[1/t*e^(tx)-1/t[1/te^(tx)]

    Is the way I'm doing it even right up until this part? If it isn't how should I be doing it, and if it is, do I just take the derivative twice here with respect to t?

    More generally, I think my question and confusion lies with this: If the probability density is given to be continuous like the one above but only from say 0 to 2 or 1 to infinity. Am I still integrating e^(tx)f(x) from 0 to infinity when I try to find the mgf? or am I only integrating from the defined 0 to 2 or 1 to infinity?

    thanks a lot to anyone who can make this subject just a little simpler for me!
    By definition, m(t) = E(e^{tX}) = \int_\Omega e^{tx} f(x) \, dx where \Omega is the support of the pdf.

    I haven't checked your calculation (the formatting is too difficult to decipher) but your method is correct. Once you have found m(t) you need to calculate \frac{d^2m}{dt^2} and then evaluate this at t = 0.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Rhymes with Orange Chris L T521's Avatar
    Joined
    May 2008
    From
    Chicago, IL
    Posts
    2,844
    Thanks
    3
    Quote Originally Posted by xuyuan View Post
    I'm trying to work out a practice problem but it seems like the way I'm doing it is so off track.

    The goal is to find u'2 or the second moment generating function evaluated at t=0 for the random variable x with probability density

    x/2 for 0<x<2
    0 elsewhere

    I started with 1/2*int(x*e^(tx),x, 0, 2)
    (integrate x from 0 to 2) using the integration by parts I get this long integration of

    .5[1/t*e^(tx)-1/t[1/te^(tx)]

    Is the way I'm doing it even right up until this part? If it isn't how should I be doing it, and if it is, do I just take the derivative twice here with respect to t?

    More generally, I think my question and confusion lies with this: If the probability density is given to be continuous like the one above but only from say 0 to 2 or 1 to infinity. Am I still integrating e^(tx)f(x) from 0 to infinity when I try to find the mgf? or am I only integrating from the defined 0 to 2 or 1 to infinity?

    thanks a lot to anyone who can make this subject just a little simpler for me!
    In general, to find the mgf of a pdf, you evaluate \int_{-\infty}^{\infty}e^{tx}f\!\left(x\right)\,dx.

    Becaue your pdf is defined as a piecewise function, notice that when we integrate \tfrac{1}{2}xe^{tx}, the bounds become 0 to 2.

    So, \int_{-\infty}^{\infty} e^{tx}f\!\left(x\right)\,dx=\tfrac{1}{2}\int_0^2 xe^{tx}\,dx.

    Integration by parts yields \tfrac{1}{2}\left.\left[\frac{xe^{tx}}{t}-\frac{e^{tx}}{t^2}\right]\right|_0^2=\frac{e^{2t}}{t}-\frac{e^{2t}}{2t^2}+\frac{1}{2t^2}

    Can you take it from here and find the second moment?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Oct 2009
    Posts
    20
    Quote Originally Posted by Chris L T521 View Post
    In general, to find the mgf of a pdf, you evaluate \int_{-\infty}^{\infty}e^{tx}f\!\left(x\right)\,dx.

    Becaue your pdf is defined as a piecewise function, notice that when we integrate \tfrac{1}{2}xe^{tx}, the bounds become 0 to 2.

    So, \int_{-\infty}^{\infty} e^{tx}f\!\left(x\right)\,dx=\tfrac{1}{2}\int_0^2 xe^{tx}\,dx.

    Integration by parts yields \tfrac{1}{2}\left.\left[\frac{xe^{tx}}{t}-\frac{e^{tx}}{t^2}\right]\right|_0^2=\frac{e^{2t}}{t}-\frac{e^{2t}}{2t^2}+\frac{1}{2t^2}

    Can you take it from here and find the second moment?
    yes, thank you very much! This does wonders to solve a lot of the confusion I was having about the proper way to evaluate mgfs if the function's not defined as x>0. Now that I think about it, it makes so much sense, sense a lot of the problems were defined as x>0 so I've been integrating from 0 to infinity, it should make sense that it just carries through when its something like x>1

    Edit: Follow up question should the X always disappear after finding the mgf? There's no way that you can get an mgf where the X still exists right? Otherwise you wouldn't be able to evaluate the derviatives of the mgfs at t?
    Last edited by xuyuan; December 6th 2009 at 07:46 PM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Oct 2009
    Posts
    20
    Follow up question should the X always disappear after finding the mgf? There's no way that you can get an mgf where the X still exists right? Otherwise you wouldn't be able to evaluate the derviatives of the mgfs at t?
    Last edited by mr fantastic; December 8th 2009 at 12:57 AM. Reason: Removed bump reference. It's OK to ask follow-up questions.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor matheagle's Avatar
    Joined
    Feb 2009
    Posts
    2,763
    Thanks
    5
    Quote Originally Posted by xuyuan View Post
    Follow up question should the X always disappear after finding the mgf? There's no way that you can get an mgf where the X still exists right? Otherwise you wouldn't be able to evaluate the derviatives of the mgfs at t?

    It's M_X(t)=E(e^{Xt})
    It's a function of t.
    But it's the moment generating function of the random variable X.
    The expectation is wrt X, so the x is integrated/summed out, leaving this a function of the argument t.
    Last edited by mr fantastic; December 8th 2009 at 12:57 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Moment Generating Function
    Posted in the Statistics Forum
    Replies: 5
    Last Post: July 11th 2010, 03:56 AM
  2. Moment Generating Function
    Posted in the Advanced Statistics Forum
    Replies: 10
    Last Post: November 8th 2009, 02:32 PM
  3. Moment generating function
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: April 26th 2009, 09:14 PM
  4. Moment-Generating Function - Need help!!!
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: March 1st 2009, 05:40 PM
  5. moment-generating function
    Posted in the Advanced Statistics Forum
    Replies: 4
    Last Post: May 3rd 2008, 07:34 PM

Search Tags


/mathhelpforum @mathhelpforum