Let X be a discrete random variable taking values in some finite set D. 1)Write the expression for MGF of X. 2)Differentiate MGF n times and set t=0 to obtain E(X^n)
how can I write the expression for MGF of X if it takes values in a set D?? and what does it mean in second part
Start with:$$M_X(t)=\mathbb Ee^{tX}=\sum_{x\in D}e^{tx}P(X=x)$$and note that e.g. the first derivative is:$$M_X'(t)=\sum_{x\in D}xe^{tx}P(X=x)$$