How do I use the moment generating function of the chi-square distribution to show that if $x_1\sim\chi^2(n_1), x_2\sim\chi^2(n_2),\dots ,x_k\sim \chi^2(n_k)$ then $y=x_1+x_2+\dots+x_k\sim\chi^2(n_1+n_2+\dots+n_k)$ so indicate that you can add random variables having chi-square distributions by adding their degrees of freedom?
HINTS: Start with the moment generating function of $X \sim \chi^2(n)$: $$\mathcal{M}_X\left(t\right) = \left(1-2 t\right)^{-n/2}$$ Now, notice that for the sum of $m$ independent random variables $Z = X_1 + X_2 + \cdots+X_n$, the moment generating function is $$\mathcal{M}_Z(t) = \mathbb{E}\left(\mathrm{e}^{Z t}\right) = \mathbb{E}\left(\mathrm{e}^{\left( X_1 + X_2 + \cdots+X_n\right) t}\right) = \mathbb{E}\left(\mathrm{e}^{X_1 t} \cdot \mathrm{e}^{X_2 t} \cdots\mathrm{e}^{X_n t}\right)$$ Using independence: $$\mathcal{M}_Z(t) = \prod_{k=1}^n \mathbb{E}\left(\mathrm{e}^{X_k t} \right) = \prod_{k=1}^n \mathcal{M}_{X_k}(t)$$ Now piece these two facts together, and notice that the functional form of $\mathcal{M}_Z(t)$ is that of a $\chi^2$ distribution, and read off its degrees of freedom parameter.