There are $n$ marbles and $r$ boxes. One at a time, each marble is selected and randomly (uniformly) placed in one of the $r$ boxes. Let $S$ be the number of empty boxes. Compute $E(S)$ and $Var(S )$.
Here is my work:
Let $X$ = the box is empty
This gives me:
\begin{equation} X_i = \begin{cases} 1 \text{ if box is empty} \\ 0 \text{ if box is not empty} \end{cases} \end{equation}
This means that $S = \sum_i^rX_i$
This leads me to:
\begin{equation} E(S) = E(X_1 + X_2 + ...X_r) \end{equation} \begin{equation} E(S) = E(X_1) + E(X_2) + ...E(X_r) \end{equation} \begin{equation} E(S) = r p \quad \text{ $p$ is the probability that box is empty} \end{equation}
so I need to figure out $p$ which I said is simpy $\frac{r-n}{r}$
Therefore \begin{equation} E(S) = r\frac{r-n}{r} = r-n \end{equation}
Am I correct? Or am I missing something?
I'm also stuck in variance at
\begin{equation} Var(S) = Var(X_1 + X_2 + ... X_r) \end{equation}