Let us introduce the random variables \(X_1\), \(\dots\), \(X_N\), such that \(X_i\), \(1\le i\le n\), has value \(1\) if box
\(i\) is empty, and value \(0\) otherwise. Clearly, \(X_1\), \(\dots\), \(X_{N}\) have the same distribution. The number of empty boxes, \(N_{\emptyset}\), is a random variable that satisfies
\begin{eqnarray}
N_{\emptyset}=X_1+X_2+\cdots+ X_N.
\end{eqnarray}
By linearity, its expectation satisfies
\begin{eqnarray}
\mathbb E\left[N_{\emptyset}\right]&=&\sum_{i=1}^N\mathbb E\left[X_i\right]=N\mathbb E\left[X_1\right].
\end{eqnarray}
Let us evaluate \(\mathbb E\left[X_1\right]\). Each ball is not placed into box \(1\) with probability \(\frac{N-1}N\). Since the ball placements are independent of each other, we have
\begin{eqnarray*}
\mathbb E\left[X_1\right]=\mathbb P\left(X_1=1\right)=\left(\frac{N-1}N\right)^N.
\end{eqnarray*}
We now obtain
\begin{eqnarray*}
\mathbb E\left[N_{\emptyset}\right]=\frac{(N-1)^N}{N^{N-1}}.
\end{eqnarray*}
The variance of \(N_{\emptyset}\) satisfies
\begin{eqnarray*}
\mbox{var}\left(N_{\emptyset}\right)&=&\mathbb E\left[N_{\emptyset}^2\right]-\mathbb E\left[N_{\emptyset}\right]^2\\
&=&\sum_{i=1}^N \mathbb E\left[X_i^2\right]+2\sum_{i < j}\mathbb E\left[X_iX_j\right]\\&&-\frac{(N-1)^{2N}}{N^{2N-2}}.
\end{eqnarray*}
The \(\binom{N}{2}\) terms in the second summation are all equal to \(\mathbb E\left[X_1X_2\right]\). Hence,
\begin{eqnarray*}
\mbox{var}\left(N_{\emptyset}\right)
&=&N\mathbb E\left[X_1^2\right]+2\cdot\binom N2\mathbb E\left[X_1X_2\right] -\frac{(N-1)^{2N}}{N^{2N-2}}.
\end{eqnarray*}
Since \(X_1\in\{0,1\}\), we have \(X_1^2=X_1\). On the other hand, \(X_1X_2\) has value \(1\) if and only if both \(X_1\) and \(X_2\) are equal to 1. Otherwise, \(X_1X_2=0\). The event \(\left\{X_1X_2=1\right\}\) occurs when both box \(1\) and box \(2\) are empty. Each ball is not placed into boxes \(1\) and \(2\) with probability \(\frac{N-2}N\). Since the ball placements are independent of each other, we have
\begin{eqnarray*}
\mathbb E\left[X_1X_2\right]=\left(\frac{N-2}N\right)^N.
\end{eqnarray*}
We finally obtain
\begin{eqnarray*}
\mbox{var}\left(N_{\emptyset}\right)&=&
\frac{(N-1)^N}{N^{N-1}}+\frac{(N-1)(N-2)^N}{N^{N-1}} -\frac{(N-1)^{2N}}{N^{2N-2}}.
\end{eqnarray*}