# Sum of Squares of Normal distributions

Given $X_i \sim \mathcal{N}(\mu_i,\sigma_i^2)$, for $i = 1,\dots,n$. How does one find the distribution of $D = \sum_{i=1}^n X_i^2$? In the case that all the standard deviations are the same (i.e. $\sigma_i = \sigma_1$ for all $i$), the random variable $D/\sigma_1^2$ has a noncentral chi-squared distribution. But when I don't have this simplifying assumption I don't know what to do. Is there a well known distribution for this?

-
From context it seems you want $D = sum X_i^2$ not just the sum as written; the latter would follow a normal distribution. Could you clarify? –  quid Feb 28 '12 at 17:29
Yes, I made a mistake originally, but Douglas Zare fixed it. Thanks Douglas! –  Jonathan Feb 28 '12 at 22:17
This is something that I don't remember well from several courses in which it was touched on. I'd start by googling "Satterthwaite". –  Michael Hardy Feb 29 '12 at 2:31

## 2 Answers

All you could conceivably want to know about the subject (and many things you might not) are in Mathai + Provost, Quadratic Forms in Random Variables.

-

I can write a formula, but I doubt you will like it. Set

$$\rho(x_1,\dotsc, x_n)=\frac{1}{(2\pi)^{\frac{n}{2}}\sigma_1\cdots\sigma_n} \exp\left(-\sum\frac{(x_i-\mu_i)^2}{2\sigma_i^2}\right)$$

denote the joint probability density of $(X_1,\dotsc, X_n)$ which I assumed to be independent. The probability density of $D$ is

$$d(t)=\frac{1}{2\sqrt{t}}\int_{|x|=\sqrt{t}} \rho(x) dS(x),$$

where $dS(x)$ denotes the area element on the sphere $\{|x|=\sqrt{t}\}$.

-