Expected number of zeros in multinomial vector When $X=(X_1,X_2,\ldots,X_K)$ follows a multinomial distribution with the size parameter $N$ and probability vector $p=(p_1,p_2,\ldots,p_K)$, what is the expected number of zero outcomes in $X$?
In R code, when $p_i=1/K$ for all $i$, zero outcomes can be simulated as
N <- 100
K <- 50
sum(rmultinom(1,N,rep(1/K,K))==0)

I would like to be able to predict the number of zeros from $N$, $K$, and $p=(p_1,p_2,\ldots,p_K)$. Or I want to know the distribution of the number of zeros. 
 A: The number of zeros in the vector is:
$$W \equiv \sum_{i=1}^K \mathbb{I}(X_i = 0).$$
Thus, since each $X_i \sim \text{Bin}(N,p_i)$, the expected number of zeros is:
$$\begin{equation} \begin{aligned}
\mathbb{E}(W) 
= \mathbb{E} \Bigg( \sum_{i=1}^K \mathbb{I}(X_i = 0) \Bigg)
&= \sum_{i=1}^K \mathbb{E} ( \mathbb{I}(X_i = 0) ) \\[6pt]
&= \sum_{i=1}^K \mathbb{P} (X_i = 0) \\[6pt]
&= \sum_{i=1}^K (1-p_i)^N. \\[6pt]
\end{aligned} \end{equation}$$
In the special case where each $p_i = 1/K$ you have:
$$\mathbb{E}(W) = K (1-1/K)^N = \frac{(K-1)^N}{K^{N-1}}.$$
This gives you the expected number of zeros in the general case, and the special case of uniform allocation.  The full distribution of the number of zeros is more complicated, owing to non-independence of the counts in the vector.
(If you would like to know the full distribution of the number of zeros in the case where the category probabilities are equal, this is closely related to the classical occupancy distribution; see e.g., O'Neill (2020).  The classical occupancy distribution gives the number of categories with non-zero counts, so it is simple to use this to get the distribution of the number of categories with zero counts.)
