Isolated vertices in the Erdős-Rényi model (source code)

= Isolated vertices in the Erdős-Rényi model

Let $N$ be the number of isolated vertices in $G(n,p)$. Indicator variables give
$$
\mathbb EN=n(1-p)^{n-1}
$$
and, because a specified pair is simultaneously isolated precisely when the $2n-3$ incident edges are absent,
$$
\mathbb E(N^2)=n(1-p)^{n-1}
+n(n-1)(1-p)^{2n-3}.
$$