Finding moment generating function from piecewise CDF

3.6k Views Asked by At

I am stuck on this problem:

enter image description here

I am given the CDF, and unless there is a shortcut I am not remembering, I need to find the PDF before I can get the moment generating function and solve the problem.

In this case, it looks like the only part that "matters" is the second part, because if f(x) = (d/dx)F(x), the x<1 and x>=2 pieces are just zero. Thus, I think I am left with this PDF: f(x) = (x-1) for 1 <= x < 2. To get the moment generating function, then, I would do this, right? :

enter image description here

If I calculated right, this integral gives me:

enter image description here

I think the second derivative of this would have t stuff in the bottom, so how could I evaluate it at zero (if that is what is being asked for)? Otherwise, where did I go wrong in approaching this?

2

There are 2 best solutions below

1
On

We have by the substitution $u=x-1$, $$M_X(t)=e^t\int_0^1ue^{tu}du,$$ and defining $h(t):=\int_0^1ue^{tu}du$, we get $$M_X''(t)=e^t(h(t)+2h'(t)+h''(t)),$$ so it remains to compute $h(0)$, $h'(0)$ and $h''(0)$. For $h(0)$, it's simple. We have $h(t)=\frac 1t(e^t-\int_0^1e^{tu}du)=\frac{te^t-e^t+1}{t^2}$, and we can evaluate the limit as $t\to 0$. Use a similar idea for $h''(0)$.

If you know you can differentiate under the integral, the you can avoid these computations.

3
On

The second derivative of the MGF evaluated at 0 is the second moment of the RV, hence the name. So your integral should become easier.

So we have: $E[X^2] = \frac{1}{2} + \int_1^2 t^2 \cdot (t-1) dt = \ldots = \frac{23}{12} \approx 1.92$

Note that the CDF has point mass $\frac{1}{2}$ at $1$, hence the $\frac{1}{2}$.