[Math] Moment generating function gives an undefined first moment, but first moment still exists

moment-generating-functionsprobability distributions

Let's say we have a probability density function given by

$f_X(x) = 2x$ for $0 \leq x \leq 1$.

(Note $\int_0^1 f_X(x) = 1$.)

The moment generating function is

$$\int_0^1 e^{tx}\cdot2x \,dx$$

which wolfram alpha gives as

$$\frac{2(e^t(t – 1) + 1)}{t^2}$$

Trying to get the first moment (which we should know to be $\int_0^1x \cdot 2x \, dx$ = 2/3), we take the first derivative of the mgf at $t = 0$:

$$\frac{d}{dt}\frac{2(e^t(t – 1) + 1)}{t^2}$$

which wolfram alpha gives as

$$\frac{2e^t(t^2-2t+2) – 4}{t^3}$$

which is clearly not defined for $t = 0$. If I didn't know better, I would conclude that the first moment for $f_X(x) = 2x$ does not exist (but it's clearly 2/3).

Why this is happening? Is it possible for a moment generating function to not give a moment, but for the moment to exist? Or am I calculating the moments incorrectly?

EDIT: I've noticed that the limit of the first derivative of the mgf that I gave above as t approaches 0 is indeed 2/3. So is the definition of the kth moment then not "the kth derivative of the mgf evaluated at t = 0", but rather "the limit as t approaches 0 of the kth derivative of the mgf?"

Best Answer

The singularity of the MGF at $t=0$ is removable. Use the Maclaurin series of the exponential function. The MGF is actually defined everywhere.

Related Question