TITLE: How can I solve bins-and-balls problems?
QUESTION [11 upvotes]: Below is the problem that I wanted to solve

When there are $m$ balls and $n$ bins, balls are thrown into  bins where each ball is thrown into a bin uniformly at random. What is the expected number of bins that contain strictly more than 1 ball?

What I am understanding so far is that, each ball toss will be independent, and expected number of balls in each basket will be $m/n$. But this does not seem to help me solving the problem. 
I heard this is very similar to the birthday problem, but with different number of bins and arbitrary number of balls.
How should I approach solving this problem?

REPLY [4 votes]: For a particular bin the probability it has more than one ball is $1$ minus the probability it has no balls or one ball, i.e. $$1-\frac{(n-1)^m}{n^m} - \frac{m(n-1)^{m-1}}{n^m}.$$
The expected number of bins with more than one ball is $n$ times this, i.e. something like $$\frac{n^m-(n+m-1)(n-1)^{m-1}}{n^{m-1}}.$$