# Inverting a moment generating function

If I have a random variable $$X$$ with pdf $$f$$ I can compute its MGF as $$M_X(t) = \int_{-\infty}^\infty e^{tx} f(x)dx.$$ My understanding is that this is basically a Laplace transformation. Furthermore, I have read that Laplace transforms can be inverted, but when I try this on MGFs of distributions I know it doesn't work. I tried to do the inverse Laplace transform of $$e^{t^2/2}$$, which is the MGF of a standard normal RV, but wolfram alpha tells me that there is no inverse among standard functions. What is going on here? Can MGFs be inverted to recover the density (assuming the MGF is finite, I'm guessing)?

• Generally speaking there is no systematic way to invert a moment generating function. If you are familiar with the function forms of MGFs of many distribution families, then you may be able to go backwards from a particular familiar MGF to the PDF. For example, if you see MGF $m(t) = (1 - 5t)^{-1},$ you might recognize it as the MGF of an exponential distribution with mean $\mu = 5.$// A possible exception is that MGFs of simple discrete dist'ns can show clearly the probabilities of the several possible values. // By contrast, characteristic functions (Fourier transforms) can be inverted Sep 17, 2020 at 21:36
• en.wikipedia.org/wiki/… Sep 18, 2020 at 4:11

Using the terminology of Wikipedia, what you have given is not a Laplace transform, but a bilateral Laplace transform. So, while mgf's as defined in statistics is related to Laplace transform, they are more general. Maybe you can ask Wolphram Alpha of finding the inverse of a bilateral Laplace transform?

In general, I would guess that to invert (exactly or approximately) an mgf, some extra information will be needed, such as the range of the relevant random variable. In most real applications that should be known.

1. Regarding @BruceET's comment, MGFs don't uniquely define random variables all the time, though. Practically, yeah you can identify many/most common random variables by their mgf. But in general, you don't have this--the classic example is that log normal densities $$g(x)$$ have the same MGF as the weird density $$g(x)[1 + \sin(2 \pi x)]$$.
3. MGFs can be unique for some random variables, though, and give you other cool results. If the MGF is finite on some interval including $$0$$, then a.) there is only one random variable with this MGF (i.e. it is "determined by its moments"), b.) it guarantees the existence of, and the ability to recover, all (noncentral/raw) moments of a r.v., and c.) if you have a random sample from that distribution, you also have some large deviations results that give you fast convergence of sample means.