I have a curiosity about the relationship between m.g.f. and p.d.f..
Actually, I knew like the following: $$M_X(t)=E\left[e^{tX}\right]$$ where $M_X(t)$ is the moment generating function with respect to random variable $X$.
Also, I learned that m.g.f. is unique. So if m.g.f. of $X$ and $Y$ are same, then $X$ and $Y$ have the same distribution.
However, my professor mentioned slightly that knowing all moments is equivalent to knowing density function.
Under any circumstances, is it possible to make a random variable's density function if I know its moment generating function?
I agree that if I have moment generating function which is well-known like Bernoulli, Poisson, ..., I can guess its density function.
However, I think it is not possible to make density function, even if I have a value of $E[X]$, $E[X^2]$, $E[X^3]$, and so on...
Is my thought wrong?
The m.g.f. $M(t) = E[e^{tX}]$, if it exists for $t$ in some real interval $-\epsilon < t < \epsilon$, also exists and is analytic for $-\epsilon < \text{Re}(t) < \epsilon$ in the complex plane. In particular, the analytic continuation of the m.g.f. to imaginary $t$ is the characteristic function $C(s) = E[e^{isX}]$. We can then obtain the density, if indeed it exists, as the Fourier transform of the characteristic function.