What is the probability of selecting exactly $N_1$ out of $N$ items with $K$ repetitive selections? Suppose there are $N$ boxes in front of you, randomly select one box each time for $K$ times (one box can be selected multiple times, so-called repetitive selection). What is the probability $P(N_1)$ that exactly $N_1$ boxes has been selected at least once?
So far I know, if $N_1>K$, $P(N_1)=0$. For example, the probability of selecting exactly $3$ ($N_1=3$) boxes at least once for each with $2$ ($K=2$) selections is $0$.
But what's probability when $N_1\leq K$?
Thank you very much for your help!  
 A: Consider any $N$ events $E_1,\dots,E_N.$ For $0\le j\le N$ define
$$S_j=\sum_{I\in\binom{[N]}j}P\left(\bigcap_{i\in I}E_i\right)$$
where $\binom{[N]}j$ is the set of all $j$-element subsets of the index set $[N]=\{1,\dots,N\}.$
For $0\le M\le N,$ the probability that exactly $M$ of the events $E_1,\dots,E_N$ occur is given by the formula
$$\sum_{j=M}^N(-1)^{M+j}\binom jMS_j.$$
This is the in-and-out formula, also known by the rather grandiose name "Principle of Inclusion and Exclusion"; the case $M=0$ is most familiar, but your problem requires the general form.
In your problem, $K$ boxes are selected with replacement from a set of $N$ boxes. Let $E_i$ be the event that the $i^\text{th}$ box is never selected; then
$$P\left(\bigcap_{i\in I}E_i\right)=\left(1-\frac{|I|}N\right)^K,$$
and so
$$S_j=\sum_{I\in\binom{[N]}j}P\left(\bigcap_{i\in I}E_i\right)=\sum_{I\in\binom{[N]}j}\left(1-\frac{|I|}N\right)^K=\binom Nj\left(1-\frac jN\right)^K.$$
Thus the probability that exactly $M$ boxes are never selected is
$$\sum_{j=M}^N(-1)^{M+j}\binom jM\binom Nj\left(1-\frac jN\right)^K$$
which, since $\binom jM\binom Nj=\binom NM\binom{N-M}{N-j},$ we can rewrite as
$$\binom NM\sum_{j=M}^N(-1)^{M+j}\binom{N-M}{N-j}\left(1-\frac jN\right)^K.$$
Finally, to get the probability that exactly $N_1$ boxes are selected at least once, we set $M=N-N_1$ and get
$$\boxed{\binom N{N_1}\sum_{j=N-N_1}^N(-1)^{N-N_1+j}\binom{N_1}{N-j}\left(1-\frac jN\right)^K}$$
which on substituting $r=N-j$ becomes
$$\boxed{\binom N{N_1}\sum_{r=0}^{N_1}(-1)^{N_1+r}\binom{N_1}r\left( \frac rN\right)^K}.$$
A: Label the boxes with numbers $1$ through to $N$. Let $N_1\leq N$ and $N_1\leq K$, for $K$ selections with replacement.
There are $C_{N_1}^N$ ways to select $N_1$ distinct boxes out of $N$ boxes. Consider a particular set of $N_1$ distinct boxes, say those numbered $1,2,3,...,N_1$. Now each of these $N_1$ boxes must appear at least once in $K$ selections. There are $C_{N_1}^K$ ways of placing $N_1$ boxes among $K$ selections. The rest of $K-N_1$ selections must have boxes from the same set $\{1,2,3,...,N_1\}$, and there are $N_1^{K-N_1}$ ways of doing it. Therefore there are $C_{N_1}^K\times N_1^{K-N_1}$ ways of selecting exactly $N_1$ boxes from the set $\{1,2,3,...,N_1\}$ in $K$ selections. Accounting for all possible distinct set of $N_1$ boxes, there are $C_{N_1}^N\times C_{N_1}^K\times N_1^{K-N_1}$ ways of achieving it.
Therefore:
\begin{align}
P(N_1)=\frac{C_{N_1}^N\times C_{N_1}^K\times N_1^{K-N_1}}{N^K},\quad N_1\leq\textbf{min}(K,N)
\end{align}
and zero otherwise. Using Stirling's approximation you may derive results for large values of parameters involved.
