I am going through some more exam practice questions for my stats class - Here is the complete question, it has two parts:

Let $X$ be a continuous random variable with known probability density function (pdf) $f_X(x)$ for $-\infty < x < \infty$ and let $M_X(p)=E(e^{pX}) $ be a real valued function of $p.$

(a) Write down $M_X(p)$ as an integral involving the pdf $f_X(x)$ and $e^{pX}.$

(b) Show that $E(x)=M'_X(0)$, where $M'_X(p)=\frac{dM_X(p)}{dp}.$

Here is what I have so far:

(i) Seems pretty straightforward from the definition of $E(g(x))$. I simply have:

$$E(e^{pX}) = \int^{p}_{-\infty}e^{pX}f_X(x) dx.$$

(b) For part b, I am a little stuck. From (a), I have that

$$M'_X(p)=\frac{d}{dp} M_X(p)=\frac{d}{dp}E(e^{pX})=\frac{d}{dp}\int^{p}_{-\infty}e^{pX}f_X(x) dx.$$

Is there a theorem similar to the fundamental theorem of calculus for taking the derivative of an improper integral?

The way I have tried to evaluate this is:

$$\frac{d}{dp}\left( \lim_{b \to -\infty}\int^{p}_{b}e^{pX}f_X(x) dx\right).$$

Now I am a little stuck. I know that the definition of $E(x) = \int^{\infty}_{-\infty}xf_X(x)dx$, but when I try to integrate the above improper integral I don't think I am getting anywhere but making it more complicated. Am I even on the right track? I feel like I am making it more complicated than it is supposed to be.

Any help would be greatly appreciated!


2 Answers 2


$$ (1) \quad M_X(t) = \mathrm{E}\left[e^{tX}\right] = \int_{-\infty}^\infty e^{tx} f_X(x)\,dx \quad $$ $$ (2) \quad M'_X(t) = \frac{d}{dt} \int_{-\infty}^\infty e^{tx} f_X(x)\,dx = \int_{-\infty}^\infty \frac{d}{dt} e^{tx} f_X(x)\,dx = \int_{-\infty}^\infty x\,e^{tx} f_X(x)\,dx $$ $$ M'_X(0) = \int_{-\infty}^\infty x\,f_X(x)\,dx = \mathrm{E}[X] $$

Reasons: The second equality in (1) is due to the theorem known folklorically as the Law of the Unconscious Statistician; In (2) the derivation under the integral sign is justified by the Dominated Convergence Theorem.

  • $\begingroup$ Why is the derivation under the integral justified by the Monotone Convergence Theorem? is it because $M_{X}(t)$ is bounded above (since it is in the context of probabilities?) Could you elaborate on this a bit for me? Many thanks for your answer! $\endgroup$ Sep 23, 2013 at 12:19
  • $\begingroup$ Take a look at Ash's "Probability and Measure Theory", second edition, section 1.6, problem 3 (answered at the end of the book). $\endgroup$
    – Zen
    Sep 23, 2013 at 22:38

You have an error:


Note the limits of integration, you had them wrong. This way you can differentiate under integral. Of course there are conditions, when you can do this exactly, but you can assume that they are met.

The fact that you are integrating over infinite interval is a complication, but still everything depends on the properties of $exp$ and $f_X$. I.e. as long as the integral is differentiable function and some additional smoothness properties (probably), you can differentiate inside the integral.

  • $\begingroup$ thanks for your help. Can I just ask - if I take the derivative first with respect to t (treating $f_X(x)dx$ as a constant), then I have $\int^{\infty}_{\infty}xe^{tx}f_X(x)dx $ - do I then take the integral with respect to $x$ using integration by parts? Would that be correct? $\endgroup$ Sep 19, 2013 at 12:28
  • $\begingroup$ You can use any integration method you want. But in this case you do not need to use any. $\endgroup$
    – mpiktas
    Sep 23, 2013 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.