Moment generating function doubts

180 Views Asked by At

It´s a continous random variable. I have to get the MGF from a piecewise density function, but then, when I have to get the $\mathbb (x)$, the result is undefined, so I don't know if it's correct or I am doing something incorrectly.

This is the density function

how can I get the variance knowing that is the mgf second derivate? It is also undefined... when t=0

1

There are 1 best solutions below

2
On

Let us assume that the MGF is $$M_X(t)=\frac{-2e^t+e^{2t}+1}{t^2}.$$ This formula is undefined at $t=0$, but $M_X(0)=1$ (whatever the random variable is). Then, by definition of derivative, $$M_X'(0)=\lim_{h\to0}\frac{M_X(h)-M_X(0)}{h} =\lim_{h\to0}\frac{M_X(h)-1}{h} =\lim_{h\to0}\frac{-2e^h+e^{2h}+1-h^2}{h^3}$$ which you can evaluate via the Hospital or via Maclaurin series.