Algebra for moment generating function help

moment-generating-functionsprobability distributions

$$(Y_1, Y_2, \dots, Y_k) \sim \operatorname{Multinomial}(n, \pi_1, \pi_2, \dots, \pi_k)$$

The calculation of the moment generating function is as follows

$$M_Y(t) = E(\exp(t \cdot Y))$$

$$=\sum_Y \exp(t_1Y_1 + \cdots + t_KY_K) \frac{n!}{y_1!y_2!\cdots y_K!} \prod_{i=1}^{K} \pi_i^{y_i}$$

$$=\sum_Y \frac{n!}{y_1!y_2!\cdots y_K!} \prod_{i=1}^{K} (\exp(t_i)\pi_i)^{y_i}$$

$$= \left(\sum_{i=1}^{K} \exp(t_i) \pi_i \right)^n$$


I'm stuck understanding the third step. I get that the PMF is $\frac{n!}{y_1!y_2!\cdots y_K!} \prod_{i=1}^{K} \pi_i^{y_i}$ I just don't understand the algebra that is being used after that. How did they get to the third step ?

Best Answer

It may help to look at a case where $K$ is small and fixed, say $K = 3$. Then $$Y = (Y_1, Y_2, Y_3) \sim \operatorname{Multinomial}(n, \pi_1, \pi_2, \pi_3)$$ and $$\Pr[Y = (y_1, y_2, y_3)] = \frac{3!}{y_1! y_2! y_3!} \pi_1^{y_1} \pi_2^{y_2} \pi_3^{y_3}.$$ We have $$M_Y(t_1, t_2, t_3) = \operatorname{E}[e^{t_1 Y_1 + t_2 Y_2 + t_3 Y_3}] = \sum_{y_1 + y_2 + y_3 = n} e^{t_1 y_1 + t_2 y_2 + t_3 y_3} \frac{3!}{y_1! y_2! y_3!} \pi_1^{y_1} \pi_2^{y_2} \pi_3^{y_3}.$$ This is where you are able to follow so far. The next step simply rewrites the first factor as a product, and the combines this with the factor $\pi_1^{y_1} \pi_2^{y_2} \pi_3^{y_3}$; i.e., $$e^{t_1 y_1 + t_2 y_2 + t_3 y_3} = \prod_{i=1}^3 (e^{t_i})^{y_i}$$ so that $$e^{t_1 y_1 + t_2 y_2 + t_3 y_3} \pi_1^{y_1} \pi_2^{y_2} \pi_3^{y_3} = \prod_{i=1}^3 (e^{t_i})^{y_i} \pi_i^{y_i} = \prod_{i=1}^3 (e^{t_i} \pi_i)^{y_i}.$$ The final step is an application of the multinomial theorem (the generalization of the binomial theorem), which states $$(x_1 + x_2 + \cdots + x_k)^n = \sum_{c_1 + \cdots + c_k = n} \frac{n!}{c_1! c_2! \cdots c_k!} x_1^{c_1} x_2^{c_2} \cdots x_k^{c_k}.$$ In our case of $K = 3$, we have the trinomial theorem/expansion $$(e^{t_1} \pi_1 + e^{t_2} \pi_2 + e^{t_3} \pi_3)^n = \sum_{y_1 + y_2 + y_3 = n} \frac{3!}{y_1! y_2! y_3!} (e^{t_1} \pi_1)^{y_1} (e^{t_2} \pi_2)^{y_2} (e^{t_3} \pi_3)^{y_3}.$$ So all you need to note is that the LHS is the factorization of the RHS, and in general, the MGF for general $K$ is going to be the degree-$n$ polynomial in $K$ variables $$M_Y(t_1, \ldots, t_K) = \left( \prod_{i=1}^K e^{t_i} \pi_i \right)^n.$$

Related Question