normal density with |z|: MGF and CGF
This is sample question to which the study guide does not provide an answer. I'd appreciate if you could check and make comments on my mistakes/narratives.
Question.
Let Z be a random variable with density
, for
.
(a) show that f_Z is a valid density
(b) find the moment generating function of Z and give an open interval around the origin in which the moment generating function is well-defined.
(c) by considering the cumulant generating function or otherwise, evaluate E(Z) and Var (Z).
Answer.
(a) since |z|=-z if z<0, and |z|=z when
, I split the integration into two parts:
after some eliminations of negative powers of exp.
(b) I use the same 'split interval' when I need to calculate Mx(t)
=E(e^{zt})=\int_{-\infty}^{\infty}e^{zt}\frac{1}{2}e^{-|z|}dz=\frac{1}{2}\int_{-\infty}^{\infty}e^{zt-|z|}dz=\frac{1}{2}\int_{-\infty}^0e^{zt+z}dz+\frac{1}{2}\int_0^{\infty}e^{z t-z}dz=)
![\frac{1}{2}[\frac{1}{t+1}e^{z(t+1)}]_{-\infty}^0+\frac{1}{2}[\frac{1}{t-1}e^{z(t-1)}]^{\infty}_0=\frac{1}{2}\frac{1}{t+1}-\frac{1}{2}\frac{1}{t-1}=\frac{1}{1-t^2}](http://latex.codecogs.com/png.latex?\frac{1}{2}[\frac{1}{t+1}e^{z(t+1)}]_{-\infty}^0+\frac{1}{2}[\frac{1}{t-1}e^{z(t-1)}]^{\infty}_0=\frac{1}{2}\frac{1}{t+1}-\frac{1}{2}\frac{1}{t-1}=\frac{1}{1-t^2})
bounds on t: for the function M to be integrable on the whole real line, the following must hold: z(t-1)<0 and z(t+1)>0; this leads to -1<t<1.
(c) cumulant generating function
=lnM_X(t)=ln(\frac{1}{1-t^2})=-ln(1-t^2))
E(Z) can then be found as the first derivative of Kx(t) around zero, and Var (Z) can be found as the second derivative of Kx(t) around zero:
. If t=0, E(Z)=0
. If t=0, this evaluates to 2.