# distribution of sum of independent gaussians

what is the probability density function of $|y|^2$, where

$$y = \sum_{i=1}^n a_i x_i$$
where $x_i$ are complex gaussian random variables with zero mean and unitary variance? With only two terms I can solve it, but with three or more I can't simplify the product $|y|^2 = y y'$ in a simple form.

-
Well, what is the distribution of $\sum a_i x_i$? As the sum of independent normals, both $\Re(y)$ and $\Im(y)$ should, I think, be independent normals with mean $0$; then, what is the distribution of the sum of the squares of two mean $0$ normals? If the scalars are real then this should go through fine; I haven't thought about what happens if the scalars are complex. –  guy Aug 2 '11 at 21:37
Isn't the square of a normal a $\mathbb \chi^2$ ? –  gary Aug 2 '11 at 22:29
@gary: If the mean is 0 then it is a Gamma; to get a $\chi^2$ you need to divide through by the variance. When the dust settles, you hopefully get an exponential distribution for $|y|^2$. This is, I think, easy to see if the scalars are real, and I suppose if you believe the answer below also true if the scalars are complex. –  guy Aug 3 '11 at 2:50
yes the coefficients $a_i$ are real and positive in my case –  ACAC Aug 3 '11 at 17:15

Real and imaginary parts of $y$ form uncorrelated normal random vector with zero means, marginal variances $\frac{1}{2} \vert a \vert^2$.

Indeed, $\mathbb{E}( \text{re}( \sum_k a_k x_k )^2 ) = \mathbb{E}( \text{im}( \sum_k a_k x_k )^2 ) = \frac{1}{2} \sum_k \vert a_k \vert^2 = \frac{1}{2} \vert a \vert^2$ and $\mathbb{E}( \text{re}(\sum_k a_k x_k ) \text{im}( \sum_m a_m x_m ) ) = \sum_{k} \mathbb{E} (\text{re}(a_k x_k ) \text{im}( a_k x_k ) ) = \sum_k ( \text{re}(a_k) \text{im}( a_k ) - \text{im}(a_k) \text{re}( a_k ) ) = 0$.

Then your random variate $\vert y \vert$ is the some squares of two normals with variances $\vert a\vert^2$ and is thus an exponential distribution with rate $\lambda = \vert a \vert^2$, which is the same as rescaled $\chi^2_2$ variable.

Here is a simulation evidence using Mathematica:

Here is the Mathematica code:

a = RandomComplex[1 + I, 5];

PDF[NormalDistribution[0, 1/Sqrt[2]], x] PDF[
NormalDistribution[0, 1/Sqrt[2]], y]

Show[
Histogram[
Table[Abs[
a.RandomReal[NormalDistribution[0, 1/Sqrt[2]], {5, 2}].{1,
I}]^2, {10^4}], Automatic, "PDF"],
Plot[PDF[ExponentialDistribution[1/Norm[a]^2], x], {x, 0, 25},
PlotStyle -> Red], PlotRange -> All]

-