Finding moment generating function from a given probability mass function

moment-generating-functionsstatistics

Let $Y_1$ and $Y_2$ be two independent discrete random variables such that $p_1(y_1) = \frac13$; $y_1 = -2, -1, 0$ and $p_2(y_2) = \frac12$, $y_2=1,6$. Let K = $Y_1 + Y_2$. Find the moment generating function of $Y_1,Y_2,$ and $K$.

Attempt:

I know that the moment generating function is just a summation since it is discrete: $$M_x(t) = \sum_{-2}^0 e^{ty_1}p_1(y_1)$$

Which then, for the moment generating function of $Y_1$, should be $(\frac{e^t}{3})^{-2}+(\frac{e^t}{3})^{-1}+(\frac{e^t}{3})^{0}$. However I don't think this is the right way to solve the question, but I don't know what I am missing.

The moment generating function of $Y_2$ can be solved using the same method of $Y_1$, but am I right in saying that the moment generating function of K will just be the sum of the moment generating functions of $Y_1$ and $Y_2$?

Best Answer

If I understand correctly, your $Y_1$ is discrete uniform over the three values $\{-2,-1,0\}$ and your $Y_2$ is discrete uniform over two values $\{1,6\}$.

The moment generating function for $Y_1$ is indeed $$M_1(t) = \sum_{y_1 = -2}^0 e^{t y_1} p_1(y_1) = \frac13 e^{-2t} + \frac13 e^{-t} + \frac13 e^{0} = \frac13\left( 1 + e^{-t} + e^{-2t}\right)$$ You just made the mistake of carrying the power over to the probability mass.

The moment generating function for $Y_2$ is similarly $$M_2(t) = \sum_{y_2 = 1,6} e^{t y_2} p_2(y_2) = \frac12 e^{-t} + \frac12 e^{-6t}= \frac12 e^{-t} \left(1 + e^{-5t}\right)$$

Due to independence, the moment generating function of the sum $K \equiv Y_1 + Y_2$ is the product of the respective MGFs. \begin{align} M_K(t) &= \mathbb{E}\bigl[ e^{ t(Y_1 + Y_2) }\bigr] \\ &= \mathbb{E}\bigl[ e^{ t Y_1 } \bigr] \cdot \mathbb{E}\bigl[ e^{ tY_2 } \bigr] \qquad \because Y_1 \perp Y_2 \\ &= M_1(t) \cdot M_2(t) \\ &= \frac16 e^{-t} \left( 1 + e^{-t} + e^{-2t}\right)\left(1 + e^{-5t}\right)\end{align} The terms ca be expanded or rearranged however one prefers.

Related Question