Confused with the properties of the Moment generating function

expected valuemeansmoment-generating-functionsprobability

Exercise 5 from "Probability and Statistics, 2nd edition, by Morris H. DeGroot" book.

Suppose that $X$ has a uniform distribution on the interval $(a,b)$.
Determine the moment generating function (mgf) of $X$.

From definition of mgf of $X$:

$$\psi(t)=E[e^{tX}]=\int_a^be^{tx}f(x)dx=\int_a^be^{tx}\frac{1}{b-a}dx=\frac{e^{tb}-e^{ta}}{t(b-a)}.$$

I cannot understand the following two things:

  1. It is known that if $X$ is bounded, which is our case, the mgf of $X$ always exists for all $t$. However, at $t=0$, we get $\psi(0)=0/0$. So we just assume that $\psi(0)=0?$
  2. It is also known that $\psi(0)=1$ if mgf of $X$ exists at $t=0$. This even more confuses me, because from my derivation $\psi(0)=0/0$. We have to take some limit here?

Best Answer

The equality $\int_a^be^{tx}\frac{1}{b-a}dx=\frac{e^{tb}-e^{ta}}{t(b-a)}$ is valid only if $t \neq 0$. For $t=0$ we get $\int_a^b\frac{1}{b-a}dx=1$

Related Question