# Relationship between the gamma distribution and Non-central chi squared distribution?

If $Y = \sum_{i=1}^N X_i^2$, where $X_i \sim \mathcal{N}(\mu,\sigma^2)$, i.e. all $X_i$ are i.i.d gaussian random variables of same mean and variance, then what is the resultant PDF of $Y$? How the resultant PDF of $Y$ can be interms of Gamma distribution?

I know that, if the mean is zero, the result follows as given in Relationship between gamma and chi-squared distribution, but how it can be derived for the case if the mean is zero?

• It's unclear what you're attempting to derive or what kind of relationship you're looking for. Could you clarify? See en.wikipedia.org/wiki/… for how the non-central CDF can be expressed as an infinite sum of central CDFs. – whuber Jul 1 '18 at 15:21
• @whuber I assume that you meant a weighted sum of CDFs (with weights summing to $1$) because an infinite unweighted sum of CDFs would diverge as the argument increased without bound. – Dilip Sarwate Jul 1 '18 at 15:49
• @Dilip Of course, thank you: I should have written linear combination rather than "sum." – whuber Jul 1 '18 at 16:24

You can put this into the form of a non-central chi-squared distribution by scaling the random variables to get unit variance. Since $X_i / \sigma \sim \text{IID N}(\mu / \sigma, 1)$ you have: $$\frac{Y}{\sigma} = \sum_{i=1}^N \frac{X_i}{\sigma} \sim \text{Noncentral Chi-Sq} \Big( DF = N, \lambda = \frac{N \mu^2}{\sigma^2} \Big).$$ There is no simple form for the PDF of the non-central chi-squared distribution. It can be written as the product of a gamma density and a confluent hypergeometric limiting function. Using this form, and adjusting for the scaling transform you get the density expression: $$f_Y(y) = \frac{1}{\sigma} \cdot \exp(-\tfrac{\lambda}{2}) \cdot {}_0 F_1 (; \tfrac{N}{2} ; \tfrac{\lambda}{2} \cdot \tfrac{y}{2}) \cdot \underbrace{\frac{2^{-N/2}}{\Gamma(\tfrac{N}{2})} y^{N/2-1} \exp(-\tfrac{y}{2}) }_{\text{Gamma Density}} \quad \quad \text{for }y \geqslant 0$$