Expected number of urns that are empty

probability

We have $n$ balls that are numbered $1,…,n$ and are put into $n$
urns also numbered 1 thru n in such way that ball $i$ is equally
likely to go into any of the urns $1,2,…,n$. Find the expected
number of urns that are empty. Also, find the probability that none of
urns are empty.

Attempt

Im confused as to how we place the balls into the urns. What is the convention in such problems? Because for instance, I don't know whether an urn can have at most one ball, or can hold more than one ball. This is my confusion, but my idea is to let $X$ be the number of empty urns and then define

$$ X_i = \begin{cases} 1, \; \; \; urn \; i \; empty \\ 0, \; \; \; otherwise \end{cases}$$

So that $X = \sum_{i=1}^n X_i$. Now, since we want $E(X) $ and $E(X)= \sum^{n} E(X_i)$, then we just need to care about $E(X_i) = P(X_i=1)$. SO, in other words, the problem reduces to find the probability that the ith urn is empty.

my Assumption: an urn can contain any number of balls

Assuming this, then the sample space is $n^n$ and the number of ways an urn is empty is just $n!$ since to have the ith urn empty all the other $n$ balls must go into remaining $n-1$ urns. Therefore $E(X_i) = \frac{n!}{n^n} $ and thus

$$ E(X) = n \frac{n!}{n^n} = \frac{n!}{n^{n-1} } $$

Now, if we want none of the urn empty, we just have to count in how many ways can all $n$ balls be placed in $n$ urns so that no urn is empty, well this is just $n!$. Threfore

$$ P(no \; urn \; empty) = \frac{n!}{n^n} $$

is my approach correct?

Best Answer

Standard probability assumptions say that urns have unlimited capacity and/or balls have zero volume (wow!). Your ideas seem to be on the right track, although some of the calculations are off. $P(X_i = 1)$ is the probability that every single ball misses the $i$th bin. Each ball is independent and each is equally likely to land in every bin, so this is just $\left(\frac{n-1}{n}\right)^n$. Then you would apply linearity of expectation in much the same manner as you do above.

The solution for the second problem seems fine.