# Find mean and variance from mgf where t is denominator

For continuous random variable X,

pdf: $$f_{X}(x)=2(1-x), x\in[0,1]$$

mgf: $$M_{X}(t)=\frac{2(e^t-t-1)}{t^2}$$

Problem is to find mean and variance from mgf, I tried using $$\frac{d}{dt}M_{X}(0)$$ and $$\frac{d}{dt}[ln(M_{X}(0))]$$. But I can't seem to solve it even if I use L'Hôpital's rule and $$\lim_{t\to 0}\frac{e^t-1}{t}=1$$. How can the mean and variance be found using the mgf only?

For $$|t| <1$$ we have $$M_X(t)=2(\frac 1 2+t/3!+t^{2}/4!+...)$$. It is easy to write down $$M_X'(0)$$ amd $$M_X''(0)$$ from this. I will let you finish the computation.
• Thanks, this really answered my question, but how did you get $𝑀_{𝑋}(𝑡)=2(1/2+t/3!+t^2/4!+...)$ ? – dylan May 19 at 5:26
• From the power series for $e^{t}$.@dylan – Kavi Rama Murthy May 19 at 5:28