# 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.

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?

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.

• I know what linearity of expectation is and I can see how you go from the expectation to the answer. However, I have two questions first how do you figure out the probability that box i is empty? Next what is this indicator random variable? How did you come up with it? I'm asking because I'm only familiar with bernoulli, binomial, geometric, and poisson. Does this indicator random variable come from one of these? – Allan Feb 19 '17 at 18:36
• @Allan an "indicator random variable" is simply another name for a random variable which takes only the values of zero or one. It is also called a Bernoulli random variable. Now.. as for finding $Pr(X_1=1)$ I will add another paragraph above – JMoravitz Feb 19 '17 at 18:40
• @Allan added hint for calculation of $Pr(X_1=1)$ – JMoravitz Feb 19 '17 at 18:53
• thanks this is more clear now. I think I need to brush up on my Bernoulli random variables because this wasn't clear to me at first. Thanks for the help! – Allan Feb 19 '17 at 19:32

Probablity of a particuler box X is empty is$\dfrac{(r-1)^n}{r^n}$. Let $S_n=X_1+X_2+ \cdots +X_n$. Thus, $$E(S_n)=E(X_1)+E(X_2)+ \cdots +E(X_n),$$ which is equal to $$r × \frac{(r-1)^n}{r^n}.$$