# Thread: Normal + Poisson: conditional mgf

1. ## Normal + Poisson: conditional mgf

Suppose that $Y|Z=\sigma^2{$~ $N(0,\sigma^2)$ where $Z{$~ $}Exp(\lambda)$. Find the variance and forth cumulant of Y.

It looks like use of moment generating function is appropriate here - if I find $M_Y(t)$ I can then calculate $Var(Y)$ and $K_Y(t)$ and 4th cumulant. But I cannot move beyond:

$M_Y(t)=E[M_{Y|Z}(y|z)]=E[exp(\frac{1}{2}t^2{\sigma}^2)]=$

(Since $f_{Y|Z}(y|z)$ is normally distributed with mean=0)

Am I on the wrong path? What also worries me that I am not using Z distribution here at all.

So, as alternative, I was thinking going the 'long' route:
- find joint density
- then find marginal density of Y
- then find Var(Y), My(t) etc the 'long' way.

2. I think you've copied the problem incorrectly. I suspect that you are actually supposed to assume $Y|Z \sim N(Z, \sigma^2)$. It doesn't look like you've committed errors in what you've actually posted.

3. you can find the marginal distibution then the variance..

you have $Y|Z \sim N(0,\sigma^2) \; and\, Z \sim \mbox{Exp}(\lambda)$

Do you know the pdf of Z $f(z)$and its support?

You can find the marginal distribution of y by this strategy: $\displaystyle f(y) = \int_{?}^{?} f(y,z) dz = \int_{?}^{?} f(Y=y|z)\cdot f(z) dz$

4. ^^^ You don't have to do any calculations with the problem as posted; it is obvious that the marginal distribution of Y is N(0, sigma^2). If it isn't obvious from the start, it is certainly obvious from the integral you posted since f(y|z) doesn't depend on z. Hence, there must be an error in the OP.

5. Originally Posted by theodds
I think you've copied the problem incorrectly. I suspect that you are actually supposed to assume $Y|Z \sim N(\lambda, \sigma^2)$. It doesn't look like you've committed errors in what you've actually posted.
I checked again, and it is definitely zero (mean of normal) in the study guide (where I copied it from). But it is not a textbook, and it is know to occasionally have typos, so I won'tbe surprised if it should be something else, like lambda, as you said. I am curious why you feel it should be lambda?

In the meantime, I'll try to solve it with the distribution that you suggested (with lamda as a mean).

6. Originally Posted by harish21
Do you know the pdf of Z $f(z)$and its support?
As per given intial condition, Z is exponentially distributed with parameter Lambda. So it's not a problem to write down its pdf, I was just looking for a shortcut via mgf.

7. Originally Posted by Volga
I checked again, and it is definitely zero (mean of normal) in the study guide (where I copied it from). But it is not a textbook, and it is know to occasionally have typos, so I won'tbe surprised if it should be something else, like lambda, as you said. I am curious why you feel it should be lambda?

In the meantime, I'll try to solve it with the distribution that you suggested (with lamda as a mean).
Actually, I misspoke. Not lambda, it should be $Y|Z \sim N(Z, \sigma^2)$. The reason being, if you are going to set up a conditional distribution for Y|Z where Z ~ Exponential, then you are going to have to make the distribution of Y|Z depend on Z (or else you are just asking a trivial question). Because sigma^2 has already been specified as the variance, it it seems like the reasonable sort of thing to do with Z.

It would also be fine to do something like $Y|Z \sim N(0, Z)$ since Z is strictly positive. Come to think of it, this may be more likely. I suspect if Y|Z ~ N(0, Z) then the integral works out nicely when you go to get the marginal of Y, whereas it wouldn't otherwise.

I would try to answer it in various different ways just for practice.

8. Right, I see your point. I think it was rather (0,Z) rather than the first one, since if it was a typo, then instead of

$Y|Z=\sigma^2{$~ $N(0,\sigma^2)$

it should have been $Y|Z=z$ and therefore instead of sigma^2 in the next expression it would also be Z.

Anyways, I'd try to do both versions and I'd really like to use conditional moment formula. Do you think it would lead me anywhere?

Assuming N(0,Z):

$M_Y(t)=E[M_{Y|Z}(y|z)]=E[e^{\frac{1}{2}zt^2}]$

I am not sure what to do with t squared. For example,

$E[e^{\frac{1}{2}zt^2}]=E[e^{t*(1/2zt)}]$ - would it mean that this is a moment generating function of some random variable $\frac{1}{2}zt$?

I'll get down to integration (I've already got to some horrible integral with e to the quadratic powers of y using $N({\lambda}, {\sigma}^2)$ ))))

9. It is not so nice an integral, after all. Let me check my calculations so far.

Assuming $Y|Z=z\sim N(0,Z)$

$f_{Y|Z}(y|z)=\frac{1}{\sqrt{2{\pi}z}}e^{-\frac{y^2}{2z}}{\lambda}e^{-{\lambda}z}$

$f_Y(y)=\int_0^{\infty}f_{Y,Z}(y,z)dz=\int_0^{\inft y}\frac{1}{\sqrt{2{\pi}z}}e^{-\frac{y^2}{2z}}{\lambda}e^{-{\lambda}z}=\frac{\lambda}{\sqrt{2\pi}}\int_0^{\in fty}\frac{1}{\sqrt{z}}e^{-\frac{y^2}{2z}-{\lambda}z}dz$

Now I have z just about everywhere possible in the integrand ))) Is it a nice one? Or you had another one in mind?

10. Oh, I see the intent of the notation in the problem. Very odd. There is no typo, but indeed it would be more logical to have phrased it as Y|Z = z ~ N(0, z).

Well, that integral isn't so nice as I thought it would be. I was thinking along the lines of conjugate priors when I said it would turn out to be an easy integral; it would have worked out nice if you had an inverse gamma instead of an exponential.

Of course, to do this problem you don't need to get the marginal; you are supposed to be getting the mgf The suggested method makes more sense now:

$\displaystyle
\mbox{E}e^{tY} = \mbox{E}\mbox{E} e^{tY} | Z = \mbox{E} e^{t^2 z / 2} = M_Z (t^2 / 2).
$

11. Aaahhh... While I was looking for an expression for a random variable in the E formula, I should have been looking for an expression for a parameter.

So, $M_Z(\frac{t^2}{2})=\frac{\lambda}{\lambda-\frac{t^2}{2}}=\frac{2\lambda}{2\lambda-t^2}$

Then I need to take second derivative of that and find it around t=0, to find variance. Then take log of that and find its 4th derivative (to find 4th cumulant). Right?

12. Var(Y): find second derivative of $M_Y(t)$ and evaluate at t=0:

$\frac{d^2}{d^2t}(\frac{2\lambda}{2\lambda-t^2{\lambda}})=...=\frac{1}{2\lambda}$

4th cumulant of Y:

$K_Y(t)=ln(M_Y(t))=ln\frac{2\lambda}{2\lambda-t^2{\lambda}}$

$K_Y''''(t)=0$ as somewhere on the 3rd derivative the variable t disappears and k'''=const.

13. Originally Posted by theodds
Of course, to do this problem you don't need to get the marginal; you are supposed to be getting the mgf
In general, how do you know if the MGF methods is better in a particular situation (talking about conditional distribution)?

Also, what's with the 4th cumulant in this question - what am I expected to learn from it? Do you ever calculate 4th cumulant for any practical purposes?

14. Originally Posted by Volga
In general, how do you know if the MGF methods is better in a particular situation (talking about conditional distribution)?

Also, what's with the 4th cumulant in this question - what am I expected to learn from it? Do you ever calculate 4th cumulant for any practical purposes?
Generally I don't usually use mgfs to calculate moments; despite the name they usually are used for other purposes. However, when you start asking things about cumulants, the question is probably trying to steer you towards that sort of things.

As far as practical uses of the fourth cumulant, it is part of the calculation of kurtosis.