1. Not finding help here? Sign up for a free 30min 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!

Deriving the MGF for Y= Z^2

  1. Jun 15, 2012 #1
    So I'm having problems being able to derive the MGF for Y = Z^2 where Z ~ N(0,1).


    I was able to obtain the density function: [y-1/2 / (2pi)1/2] e-y/2

    now to get the MGF of this I know I have to integrate from -∞ to ∞:

    [y-1/2 / (2pi)1/2] e-y/2 etY


    this is where my issue is, I'm having problems trying to simplify this to be able to get my MGF. Maybe I'm using the same variable in two different places and that's confusing me?
     
  2. jcsd
  3. Jun 15, 2012 #2
    Did you use a theorem to get the density? Does your function satisfy all the hypotheses to apply that theorem? You may have to fall back to how they derive that expression, using the cumulative distribution function, then taking the derivative.
     
  4. Jun 15, 2012 #3



    I used the cumulative distribution function to obtain the density for Y, which ended up being my result above minus the e^tY portion. The density function is correct I know that. It's getting the integral for the MGF in the right form that's messing me up. I know the relation ship of Z = [(y-μ)/σ] and I was thinking of re arranging that relationship, but since the standard normal parameters are being used that reduces to Z = y, and since I have Z^2 ==> Y = Z^2 = y^2, but I think I may be using the variable "y" in two places having two different meanings.
     
  5. Jun 15, 2012 #4

    Ken G

    User Avatar
    Gold Member

    Since no mu or sigma appears anywhere in your problem, I don't think that expression for Z, involving y, is relevant to what you are doing. And if y=Z, then there's no need to distinguish those variables, just use Z. So the question is, in your expression, is y=Z, or is y=Y? I suspect the latter-- the probability distribution over Z is already known, it's just the constant 1 and is independent of Z. So you must have solved for the probability distribution over Y, not over y, where Y = Z^2. So it looks to me like you want to set y=Y in your expression for the MGF, and then integrate over all Y.
     
  6. Jun 15, 2012 #5

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Why would you want to integrate y from -∞ to ∞? Can you name a real x that gives you y = x2 < 0?

    Anyway, you can find the MGF of Y without finding the density of Y: just use the definition of MGF and the "theorem of the unconscious statistician".

    RGV
     
  7. Jun 15, 2012 #6


    I believe that's what I did. I've gotten a little confused with my notation: So to be clear: fY(y) would be the probability density function over Y which I solved for and I was given fX(x) which is the pdf over X?

    If that's the case, I tried that initially and got the expression:

    (2pi)-1/2(integral) [(y-1/2e-y/2+ty]

    which doesn't provide me with anything to solve for a known density.











    But doesn't the fact that all densities have to integrate to 1 play a fact in why you go from -∞ to ∞

    I was suppose to try and derive it without that theorem first
     
    Last edited: Jun 15, 2012
  8. Jun 15, 2012 #7

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Absolutely not. If you have a random variable that takes negative and positive values, then of course you need to integrate over a range that includes negative and positive values (perhaps from -∞ to +∞, but not necessarily so, since the range may be limited). However, for a non-negative random variable it is nonsense to integrate from -∞ to +∞ unless you declare the density to be zero for negative arguments---and what would be the point of that?

    As far as I can see you have not used the really easy way, which is to use the theorem of the unconscious statistician. Did your instructor tell you that you are not allowed to use that result?

    RGV
     
  9. Jun 15, 2012 #8



    Well I'm going through it in the order that it was presented, so for this specific section I am "not suppose" to have known about the "theorem". Plus personally I like to be able to know all the ways of coming to the correct conclusion. I think it would give me a more complete understanding, so I put myself thru the difficult tasks as such.
     
  10. Jun 15, 2012 #9

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    OK. So you need to integrate exp(-y/2 + ty)/sqrt(y)/sqrt(2π). What would you get if t = 0? Can you see how to make the problem for t ≠ 0 look like the problem for t = 0?

    RGV
     
  11. Jun 15, 2012 #10
    Ok I let t = 0 and when I did that it converted into a gamma density with parameters [itex]\alpha[/itex] = [itex]\lambda[/itex] = 1/2.

    the only thing i see to make it look like the t = 0 case would be to factor out ety..........doesn't feel right though
     
  12. Jun 15, 2012 #11

    Ken G

    User Avatar
    Gold Member

    Try a new variable x that makes the exponent look just like e-x. The new variable will have t embedded in it, but that's fine, t is just a number. So you end up doing more or less the same thing that you already did to get the Gamma function. However, since I didn't see you derive the probability density for y, I'm not sure the range of y-- I would have thought it was just 0 to 1, like Z2. If so, it won't be a Gamma function, but some kind of incomplete Gamma function.
     
  13. Jun 16, 2012 #12


    Ok I think I'm close...I let x = y/2 - ty ==> 2dx/(1-2t) and as well y = 2x/(1-2t)

    Now putting these all in I have:

    2/(2pi)1/2(1-2t)1/2 (integral) e-x/(2x)1/2


    it looks almost like the normal density except for the "x" in the root and a 2 under the "x" in the exponent.
     
  14. Jun 16, 2012 #13

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You have already done that integral (except you called the dummy integration variable y instead of x). Remember when I asked you what you got when t=0?

    RGV
     
  15. Jun 16, 2012 #14



    Yes and when I did that I got: 1/(2pi)1/2 (integral) y-1/2 e-y/2

    and when I simplified some more I just got:

    1/(pi)1/2 (1-2t)1/2 (integral) x-1/2 e-x


    so no all I'm missing is a "2' in the denominator of the exponential to make it look like the case t=0

    so I did some more fiddling around and just realized the fact that earlier had proven (pi)1/2 = [itex]\Gamma[/itex](1/2) bring that together with what I have and then:

    1/ (1-2t)1/2 (integral) {x-1/2 e-x}/[itex]\Gamma[/itex](1/2) with [itex]\lambda[/itex] =1 and [itex]\alpha[/itex] = 1/2 would mean that the integral integrates to 1.

    and i'm left with: 1/ (1-2t)1/2 but I checked on wiki and it said the MGF for the chi-squared which is what this is, is:

    (1-2t)-k/2 which is very similar...
     
    Last edited: Jun 16, 2012
  16. Jun 17, 2012 #15

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    I should be similar: [itex]\text{for } X \sim \text{N}(0,1), \;X^2 \sim \chi^2(1).[/itex]

    RGV
     
  17. Jun 17, 2012 #16


    Ok, but why don't I have a variable of k in my solution for the Chi?


    Thanks for the patience and help
     
  18. Jun 17, 2012 #17

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You do: k=1.

    RGV
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook