Suppose $n$ balls are distributed at random into $r$ boxes. Let $S$ be the num Suppose $n$ balls are distributed at random into $r$ boxes. Let $S$ be the number of empty boxes. Compute $E[S]$.
Hey guys so I'm having trouble with this problem. I don't even know how to approach it. It doesn't seem like a binomial or geometric random variable. In fact I'm confused as to what exactly is the experiment. Is it picking the balls or picking the boxes or is it both? Any help would greatly be appreciated.
 A: Hint:
Let $X_i$ be the indicator random variable $X_i=\begin{cases}1&\text{if box}~i~\text{is empty}\\0&\text{if box}~i~\text{is not empty}\end{cases}$
Then $S$, the number of empty boxes, could be rewritten as $S=\sum\limits_{i=1}^r X_i$
So, $E[S]=E[\sum\limits_{i=1}^r X_i]$
Can you continue from there?  Does the phrase "linearity of expectation" mean anything to you?  Do you know how to find the probability that box $1$ is empty?

Added hint:
To find the probability that $X_1=1$, i.e. the probability that box $1$ is empty, let $Y_{(i,k)}$ be the event that ball $k$ is box $i$ and let $\chi_i$ be the event that box $i$ is empty.
Then notice that $\chi_i=\bigcap\limits_{k=1}^n Y_{(i,k)}^c$.  That is to say in more words, the first box is empty if and only if every ball is individually in a box other than the first.
What is then $Pr(\chi_1) = Pr(\bigcap\limits_{k=1}^n Y_{(1,k)}^c)$?  Does the term "independent events" mean anything to you?

"I'm confused as to what exactly is going on in this experiment" - We have $n$ balls, each of which may be considered to be labeled to make matters easier.  Each ball we will place at random into one of the $r$ boxes, again it makes our life easier if we let the boxes be labeled as well.  Once all balls have been placed, we count how many boxes are empty and have no balls in them.
A: The probability of a particular box $X$ to be empty after the first ball is $\dfrac{r-1}{r}$ and the probability that it is still empty after $n$ trials is $\left(\dfrac{r-1}{r}\right)^n$. This is the expected probability for emptiness of a single box, the expectation for emptiness given $r$ boxes is $$r × \left(\frac{r-1}{r}\right)^n=\frac{(r-1)^n}{r^{n-1}}.$$
Examples:
$n=5, r=3$
number of expected empty boxes: 0.4
$n=5,r=30$
number of expected empty boxes: 25.3
