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?