Finding a moment generating function given E(X) and E(x^2) I am trying to find the moment generating function.
It takes values in the set {0,1,2} with moments
E(X) = 1 and E($X^{2}$) = $ \frac 3 2 $
I know then that M'(0) = 1 and M"(0) =  $\frac 3 2 $
I have read through my course notes/ textbook and have found nothing.
If anyone has an idea where I can go with what I have, I would appreciate it.
 A: Hint:
Remember that the MGF of a random variable $X$ is defined by
$$
M_X(t):=\mathbb{E}[e^{itX}].
$$
In this particular case, if $X$ only takes values on $\{0,1,2\}$, then this can be rewritten as
$$
M_X(t)=1\cdot P(X=0)+e^{it}\cdot P(X=1)+e^{i2t}P(X=2).
$$
So, what you need to find are these three probabilities.
Now, you know that 
$$
1=\mathbb{E}[X]=0\cdot P(X=0)+1\cdot P(X=1)+2\cdot P(X=2),
$$
and
$$
\frac{3}{2}=\mathbb{E}[X^2]=0^2\cdot P(X=0)+1^2\cdot P(X=1)+2^2\cdot P(X=2).
$$
Since we also know that $P(X=0)+P(X=1)+P(X=2)=1$, you have a system of three equations in three unknowns (namely, the probabilities you want to find).  If you can find those, then you can substitute them in to your expression for the MGF to finish the problem.
A: Let $X=\{0,1,2\}$  So you know a couple of things:  
Let $p_0=P(X=0), p_1=P(X=1), p_2=P(X=2)$.  Then
$$0\cdot{p_0}+1\cdot{p_1}+2\cdot{p_2}=1$$
$$0^2\cdot{p_0}+1^2\cdot{p_1}+2^2\cdot{p_2}=\frac3{2}$$
You can  now solve the system in terms of $p_1$ and $p_2$, and find $p_0$ from there.
You also know that $M_X(t)=\sum_{k=0}^2(e^{tX})p_{k}$
Thus, your moment generating function will be
$$M_X(t)=e^{t\cdot{0}}\cdot{p_0}+e^{t\cdot{1}}\cdot{p_1}+e^{t\cdot{2}}\cdot{p_2}$$
$$M_X(t)=p_0+e^t\cdot{p_1}+e^{2t}\cdot{p_2}$$
