Expectation and Variance of Moran's I under the Null Moran's I is a statistic used to measure spatial autocorrelation. For a set of $N$ spatial units where we get measurements $\mathbf{x} = (x_1, x_2, \cdots, x_N)^T$, and a weight matrix between the spatial units $W =[W_{i,j}]_{i,j=1}^{N}$, Moran's I is defined as
\begin{align}
I &= \frac{N}{w} \frac {\sum_i \sum_j W_{ij}(x_i-\bar x) (x_j-\bar x)} {\sum_i (x_i-\bar x)^2}
&= \frac{N}{\mathbf{1}^T W \mathbf{1}} \frac{(\mathbf{x} - \bar {x} \mathbf{1})^T W(\mathbf{x} - \bar {x} \mathbf{1})}{\| \mathbf{x} - \bar {x} \mathbf{1}\|^2}
\end{align}
where $\mathbf{I}$ is the all one's vector of length $N$, $\bar{x} = \frac{1}{N} \sum_{i=1}^{N}x_i$, and $w = \sum_{i=1}^N \sum_{j=1}^N W_{i,j}$.
Under the null hypothesis, the wikipedia article claims that,
$$\mathbb{E}[I]=-\frac{1}{N-1}.$$
However, I do not seem to be able to prove this (or the variance expression claimed in the wiki page). The exact null model assumed to prove the expectation and the variance is unclear to me.
I was wondering if there was any documentation wrt the derivation of the expectation and the variance of Moran's I under the null (there does not seem to be derivation on googling around).
 A: It looks like the null model that the expectation is taken over makes this easily proved. The null model is that one picks a random permutation $\pi$ from the set of all permutations uniformly at random and the null model is
$$\mathbb{E}_{\pi} [I] = \frac{N}{w} \frac {\sum_i \sum_j W_{ij}(({\pi x})_i-\bar {\pi x}) (({\pi x})_j-\bar {\pi x})} {\sum_i (({\pi x})_i-\bar {\pi x})^2}$$
We have that
$$\bar {\pi x} =  \bar {x},$$
$$\sum_i (({\pi x})_i-\bar {\pi x})^2 = \sum_i (x_i-\bar x)^2$$
Further,
$$\begin{eqnarray} 
\mathbb{E}_{\pi}[(({\pi x})_i-\bar {\pi x}) (({\pi x})_j-\bar {\pi x})] &= \mathbb{E}_{\pi}[(({\pi x})_i-\bar {x}) (({\pi x})_j-\bar {x})],\\
&= \frac{1}{N(N-1)} \sum_{i \ne j} (x_i - \bar {x})(x_j - \bar {x}),\\
&=  \frac{1}{N(N-1)} [ (\sum_r x_r - \bar {x})^2 - \sum_r (x_r - \bar {x})^2 ],\\
&=  \frac{-\sum_r (x_r - \bar {x})^2}{N(N-1)} 
\end{eqnarray}$$
Thus
$$\begin{eqnarray}
 \mathbb{E}_{\pi} [I] &= \frac{N}{w} \frac {(\sum_i \sum_j W_{ij})(\frac{-\sum_r (x_r - \bar {x})^2}{N(N-1)})} {\sum_i (x_i-\bar x)^2},\\
&= \frac{-1}{N-1}.
\end{eqnarray}$$
