# How can this double summation be solved?

I have to calculate the following expectation

$$\mathbb{E}\left[\left(\frac1M\sum\limits_{i=1}^MX(i-n_1-M)\right)\left(\frac1M\sum\limits_{j=1}^MX(j-n_2-M)\right)\right]$$

where $M$, $n_1$ and $n_2$ are constant, known values, and $X(n)$ is a random white, Gaussian process that has zero mean and unitary variance.

So far what I did was

$$\frac{1}{M^2}\sum\limits_{i=1}^M\sum\limits_{j=1}^M\mathbb{E}\left[X(j-n_2-M)X(i-n_1-M)\right]=\frac{1}{M^2}\sum\limits_{i=1}^M\sum\limits_{j=1}^M\delta(i-j+n_1-n_2)$$

where $\delta(n)$ is the Dirac delta function, i.e.

$$\delta (n) = \left\{ \begin{array}{ll} 1 & \mbox{if } n= 0 \\ 0 & \mbox{if } n \neq 0 \end{array} \right.$$

I don't know how to solve that double summation to get something shorter, if possible. Any ideas?

• An idea: try to represent the summation creating a variable $m=i-j$. This is a work of combinatorics, every $m$ value have an amount of duplicities, i.e. a coefficient. What is $\delta$? – Masacroso Jul 3 '16 at 22:27
• @Masacroso $\delta$ is the delta of Dirac – Tendero Jul 3 '16 at 22:30