1. Limited time only! Sign up for a free 30min personal 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!

Homework Help: Probability- moment generating functions.

  1. May 11, 2009 #1


    User Avatar

    1. A random variable Y is called gamma([tex]\theta[/tex], n) for [tex]\theta[/tex]>0 and natural n if it takes positive values and takes the following PDF:

    f(y)=[tex]\frac{1}{\theta (n-1)!}[/tex]([tex]\frac{y}{\theta}[/tex])[tex]^{n-1}[/tex] exp[tex]\frac{-y}{\theta}[/tex]

    Show how to find the moment generating function, expectation and variance of Y.

    3. I have not got very far I am stil stuck on finding the moment generating function.

    I know it is given by the following:

    [tex]\int_{0}^{\infty} \exp(ty)f(y) dy[/tex]

    but I have no idea how to evaluate it and get the correct answer (can somebody please show me?)

    The answer you should get is: G[tex]_{y}[/tex](t)=1/(1-t[tex]\theta[/tex])[tex]^{n}[/tex]

    I think I will know how to find the expectation and variance once I have the moment generating function.
  2. jcsd
  3. May 11, 2009 #2
    Substitute [tex]u=\frac{(1-\theta t) y}{\theta} [/tex] .

    (The restriction on t is that [tex]1-\theta t>0[/tex] .)
  4. May 11, 2009 #3


    User Avatar

    I do not see how that helps, could someone please elaborate?
  5. May 11, 2009 #4
    Write down the integral you are trying to evaluate.

    Don't just write "f(y)." Write down what f(y) is.

    You now have two factors with e to a power. Combine them into one factor of e to a power, using properties of exponents.

    Now make a u-substitution, the one I suggested, as in calc 1 or calc 2.

    Write this out and show us how far you can get.
  6. May 11, 2009 #5


    User Avatar

    Ok this is as far as I keep getting:

    [tex]\int_{0}^{\infty} e^{\frac{-y}{\theta}}e^{tx} {\frac{y^{n-1}}{(t\theta-1)^{n-1}}{\frac{1}{\theta(n-1)!} dy[/tex]

    =[tex]\int_{0}^{\infty} e^{\frac{y(t\theta-1)}{\theta}}{\frac{y^{n-1}}{\theta^{n-1}}{\frac{1}{\theta(n-1)!}dy[/tex]

    let u=[tex]{\frac{y(t\theta-1)}{\theta}[/tex]

    Then du=[tex]{\frac{(t\theta-1)}{\theta}[/tex]dy

    =[tex]\int_{0}^{\infty} {\frac{1}{(t\theta-1)(n-1)!}}{\frac{u^{n-1}}{(t\theta-1)^{n-1}}e^u du[/tex]
  7. May 11, 2009 #6


    User Avatar

    = [tex]\frac{1}{(t\theta-1)^n}[/tex] [tex]\int_{0}^{\infty} e^u \frac{u^{n-1}}{(n-1)!}[/tex]

    Is this right so far? Is there some reason why [tex]\int_{0}^{\infty} e^u \frac{u^{n-1}}{(n-1)!}[/tex] should be one?
  8. May 11, 2009 #7
    C.E, that's mostly pretty good!

    Here is an important technical detail. The m.g.f. is defined for t near 0, so [tex]\theta t -1[/tex] is negative. This means that for the substitution you used, y=infinity would become u=-infinity. Thus, your integral with du should become from 0 to -infinity.

    Now you can find [tex]\int u^{n-1} e^u\,du[/tex] using integration by parts. Or use a table of integrals. The first time you use IBP you obtain a formula involving [tex]\int u^{n-2} e^u\,du[/tex]. Then do IBP again and you get [tex]\int u^{n-3} e^u\,du[/tex]. Pretty soon you'll see what happens with the factorial.

    Do the IBP with definite integrals, [tex]\int_a^b u\,dv=uv\bigr|_a^b-\int_a^b v\,du[/tex] so that you can take care of those "uv" terms at each step.
  9. May 11, 2009 #8


    User Avatar

    How do you know that the MGF is for t near to 0 (it does not say in the question)? I assume from the limits you told me it is for 0<t<1?
  10. May 11, 2009 #9
    MGF is always for t near 0, because that's where you need it to find the mean and moments. M'(0), M''(0), etc.

    [tex]\theta t -1<0[/tex] i.e. [tex]1-\theta t>0[/tex] will give you [tex]t<1/ \theta[/tex], and this last inequality includes t=0.

    You need to use that condition to get your integral du from 0 to -infinity, and the -infinity will be used to get convergence of the improper integral.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook