# Ensemble averaging in a random graph (or network) in the large $N$ limit [closed]

I have a random graph/network described by the adjacency matrix $$(a_{ij})_{N\times N}$$ where $$a_{ij}=1$$ with probability $$p$$. Each node in the graph is associated with a continuous quantity $$\eta_i=\sum_j a_{ij}\eta_j$$ in $$\mathbb{R}$$. In this framework the ensemble average of $$\eta_i$$, denoted by $$\bar{\eta}$$ is just $$\mathrm{E}[\eta_i]$$. Similarly, $$\overline{\eta^2} = \mathrm{E}[\eta_i^2]$$. I want to understand the derivation for

$$\overline{\sum_j a_{ij}\eta_j} = Np\bar{\eta}$$

and

$$\overline{\sum_j a_{ij}\eta_j-Np\bar{\eta})^2} = Np(\overline{\eta^2} - p\bar{\eta})\quad\quad\quad\quad\quad$$ (*)

The first formula (correct me if I am wrong, please) should come from the reasoning that

$$\mathrm{E[\sum_j a_{ij}\eta_j]} = \sum_j \mathrm{E[a_{ij}]}\mathrm{E}[\eta_j] = \bar{\eta}\sum_jp = Np\bar{\eta}$$

But for the second formula I cannot find a correct derivation. I actually obtain $$\overline{\sum_j a_{ij}\eta_j-Np\bar{\eta})^2} = Np(\overline{\eta^2} - \bar{\eta})$$, and I cannot figure out where the $$p$$ factor inside the parenthesis in (*) comes from. Should I opt for a typo (*). Or is anyone that can provide a correct derivation?

• Instead of downvoting, comment please and be more constructive – maurizio May 24 at 19:21

Ok, it seems that this section of StackExchange is really made for you to figure out your own answer... After some lengthy frustrating trial and error, there is no typo in the given solution. The mistake I was doing was in the calculation of $$\mathrm{E}[(\sum_ja_{ij}\eta_j)^2]$$. In the development of this multinomial square, you need to be careful when you compute the expectation of the mixed terms. In fact:
$$\mathrm{Var}[\sum_ja_{ij}\eta_j] = \mathrm{E}[(\sum_ja_{ij}\eta_j - Np\bar{\eta})^2] = \mathrm{E}[(\sum_ja_{ij}\eta_j)^2] - N^2p^2\bar{\eta}^2$$
$$=\mathrm{E}[\sum_ja_{ij}^2\eta_j^2] + \mathrm{E}[\sum_ja_{ij}\eta_j\sum_{k,k\ne i}a_{ik}\eta_k] - N^2p^2\bar{\eta}^2 = Np\cdot \overline{\eta^2} + Np\cdot(N-1)p\cdot \bar{\eta}^2 - N^2p^2\bar{\eta}^2$$
$$=pN(\overline{\eta^2}-p\bar{\eta}^2)$$