# Evaluating a Gaussian integral

Let $X_1,\ldots,X_n$ be a sequence of $n$ zero-mean independent and identically distributed Gaussian random variables, i.e. $X_i\sim N(0,\sigma^2)$ for all $i=1,\ldots,n$ and variance $\sigma^2>0$. Therefore, the probability density of $X_i$ is $\phi(x_i;0,\sigma^2)=\frac{1}{\sqrt{2\pi}\sigma}e^{-x_i^2/2\sigma^2}$. This is all elementary probability theory...

I am lost trying to evaluate the following expectation:

$$U(k)=\int_{-\infty}^\infty\cdots\int_{-\infty}^\infty\prod_{i=1}^n\phi(x_i;0,\sigma^2)\left(\sum_{i=1}^n x_i\right)^k\prod_{i=1}^{n}dx_i$$

There are $n$ integration operations and $k$ is a positive integer.

Now, $U(1)$ is obviously zero (since the mean of each $X_i$ is zero).

$U(2)=n\sigma^2$ since $X_i$'s are independent and each have zero mean, which means that the expectations of the cross terms are zero: for $i\neq j$, $E_{X_iX_j}[X_iX_j]=\int_{-\infty}^\infty\phi(x_i;0,\sigma^2)\phi(x_j;0,\sigma^2)x_ix_jdx_idx_j=0$.

$U(3)=0$ since each $X_i$ has mean and third moment zero.

I am confused when I get to $k=4$. The sum term in the expectation now looks like:

$$\left(\sum_{i=1}^n x_i\right)^4=\sum_{i=1}^n x_i\sum_{j=1}^n x_j\sum_{a=1}^n x_a\sum_{b=1}^n x_b$$

Since the cross terms are zero, I can group the sums inside the expectation as follows:

$$U(4)=\int_{-\infty}^\infty\cdots\int_{-\infty}^\infty\prod_{i=1}^n\phi(x_i;0,\sigma^2)\left(\sum_{i=1}^n x_i^2\sum_{j=1,j\neq i}^n x_j^2+\sum_{i=1}^n x_i^4\right)\prod_{i=1}^{n}dx_i=n^2\sigma^4+2n\sigma^4$$

However, I have a feeling that the above is not correct and that $U(4)=3n\sigma^2$... and that $U(k)=nE[X_i^k]$, but I am not sure how to get there...

• $U(k)=\mathbb{E}[(\sum X_i)^k]$ and you know the moments of the distribution of $\sum X_i$ – Stéphane Laurent Mar 13 '13 at 22:26
• The point is that the sum of independent normal random variables is normal. – Robert Israel Mar 13 '13 at 22:45
• Aha, now I see. Thank you! – HellRazor Mar 13 '13 at 22:49
• @StéphaneLaurent : Maybe you should make your comment into an answer. – Michael Hardy Mar 13 '13 at 22:53

We have $U(k)=\int f(x_1, \ldots, x_n)\mathrm{d}\mu(x_1,\ldots, x_n)$ where $f(x_1, \ldots, x_n)={(\sum_{i=1}^nx_i)}^k$ and $\mu$ is the law of $(X_1,\ldots,X_n)$. In other words $U(k)=\mathbb{E}\left[{(\sum_{i=1}^nX_i)}^k\right]$. Now the point is that the random variable $\sum_{i=1}^nX_i$ has a Gaussian distribution whose law is easy to determine and the moments of a Gaussian distribution are well-known.