Suppose we have a matrix $H\in \mathbb{R}^{n\times n}$ such that $H 1_n = 0_n$ and another matrix
$$\mathcal{N}=\begin{bmatrix} 1-\frac{1}{n}&-\frac{1}{n}&\cdots&-\frac{1}{n} \\ -\frac{1}{n}&1-\frac{1}{n}&\cdots&-\frac{1}{n}\\ \vdots&\vdots&\ddots&\vdots \\ -\frac{1}{n}&-\frac{1}{n}&\cdots&1-\frac{1}{n} \end{bmatrix}\in \mathbb{R}^{n\times n}$$
Why is the expectation the following?
$$\mathbb{E}\{H^T\mathcal{N}H\} = \left(1 - \frac{1}{n} \right) \mathbb{E}\{H^TH\}$$
How could I get the $1-\frac{1}{n}$?
The document I found shows that expectation of $\mathbb{E}\{H^T\mathcal{N}H\}$ should be $\mbox{tr} (\mathcal{N})\mathbb{E}\{H^TH\}$, if it is, this expectation should be $(n-1)\mathbb{E}\{H^TH\}$, I wonder if there is anything wrong.