TITLE: Distribution of the sum of squared independent normal random variables.
QUESTION [14 upvotes]: The sum of squares of $k$ independent standard normal random variables $\sim\chi^2_k$
I read here that if I have $k$ i.i.d normal random variables where $X_i\sim\mathcal{N}(0,\sigma^2)$ then $X_1^2+X_2^2+\dots+X_k^2\sim\sigma^2\chi^2_k$. How do I go about obtaining the pdf?
If I have $k$ independent normal random variables where $X_i\sim\mathcal{N}(0,\sigma_i^2)$ then what is the distribution of $X_1^2+X_2^2+\dots+X_k^2$?

REPLY [2 votes]: To answer the first part, remember that the $\chi_k^2$ distribution is (as a special case of the gamma) $\Gamma (k/2,2)$, so by the properties of the gamma distribution you have $X_i^2=\sigma^2 Z_i^{2}$ and so $\sigma^2\chi_k^2$ is equivalent to the $\Gamma(k/2,2\sigma^2)$ and from here is just a case of plugging in to the known gamma pdf to obtain your desired pdf. For part to go from the fact that $X_i^2$ has also a gamma distribution and then find the sum of independent gamma distributions.