Moment Generating Function Given Expectations

48 Views Asked by At

How would I go about finding the moment generating function given the expectations? For example, given $E(X^n)=n!$ for $n \in Z_+$, what is the moment generating function of X? In this case the random variable is discrete, but I would also like to apply to a similar case of a continuous random variable.

I feel like I should be able to use the fact that $E(X^n)=\frac{d^nM_X(t=0)}{d^nt}=n!$, but I feel like it just turns into a computational nightmare very quickly.