expectation of squared summation

963 Views Asked by At

How does the expectation of this:

$$E\Bigg[ \bigg(\sum_{n=1}^{N} x_n \bigg)^2\Bigg]$$

Equal this:

$$E\Bigg[ \bigg(\sum_{n=1}^{N} x_n \bigg)^2\Bigg]=N(N\mu^2+\sigma^2)$$

I'm also told that x is Gaussian and i.i.d:

$$E[x] = \mu$$ $$E[x_n^2] = \mu^2 + \sigma^2I_{ij}$$

$$I_{ij} = \begin{cases} 1 & i=j\\ 0 & i\ne j \\ \end{cases}$$

$$\mu_{ML} = \frac{1}{M}\sum_{n=1}^{M}x_n$$

$$\sigma^2_{ML}=\frac{1}{M}\sum_{n=1}^{M}(x_n-\mu)^2$$

2

There are 2 best solutions below

1
On

You can write the square of the sum as a double sum. $$E (\sum_{n=1}^N x_n)^2 = E(\sum_{i=1}^N \sum_{j=1}^N x_i x_j) = \sum_{i=1}^N \sum_{j=1}^N E[x_i x_j]$$

Then note that $$E[x_i x_j] = \begin{cases} \mu^2 & i \ne j \\ \mu^2 + \sigma^2 & i = j \end{cases}$$

0
On

Two formulas about i.i.d. sums of variables (Gaussian or not): $$\newcommand{\E}{\operatorname{E}}\newcommand{\Var}{\operatorname{Var}} \E\,\!\left(\sum_{k=1}^nx_k\right)=n\E(X)\tag1 $$ $$ \Var\left(\sum_{k=1}^nx_k\right)=n\Var(X)\tag2 $$ The variance is the expectation of the squares minus the square of the expectation: $$ \Var\left(\sum_{k=1}^nx_k\right)=\E\,\!\left[\left(\sum_{k=1}^nx_k\right)^2\right]-\E\left(\sum_{k=1}^nx_k\right)^2\tag3 $$ Putting these together: $$ \E\,\!\left[\left(\sum_{k=1}^nx_k\right)^2\right]=n\Var(X)+n^2\E(X)^2\tag4 $$