Calculating expected value of non-empty chambers. What is wrong in my solution? Instering $5$ different balls to $12$  different chambers, all the options are equally probabable. Let $X$ be the number of non-empty chambers, calculate $\mathbb{E}[X]$
I know that $\mathbb{E}(X)=\sum_{t \in R_{X}} t \cdot \mathbb{P}(X=t)$ so I just need to calculate $\mathbb{P}(X=t)$ for every $1\leq t \leq 5$
$$\mathbb{P}(X=1)= \frac{1}{12^4}$$
$$\mathbb{P}(X=2)= \frac{11 \cdot 2^3}{12^4}$$
$$\mathbb{P}(X=3)= \frac{11\cdot 10\cdot 3^2}{12^4}$$
$$\mathbb{P}(X=4)= \frac{11\cdot 10 \cdot 9 \cdot4}{12^4}$$
$$\mathbb{P}(X=5)= \frac{11\cdot 10 \cdot 9 \cdot8}{12^4}$$
now I just substitute this values in the expression $$\mathbb{E}(X)=\sum_{t \in R_{X}} t \cdot \mathbb{P}(X=t)$$ but I am not getting the right answer. I assume I have mistake in develop the expressions above. The options are:
A. $\displaystyle \frac{161051}{20736}$
B. $\displaystyle \frac{161051}{248832}$
C. $\displaystyle \frac{87781}{20736}$
D. $\displaystyle \frac{87781}{248832}$
 A: Just to say, Linearity of expectation works well here.
The probability that a given chamber is non-empty is $$p=1-\left(\frac {11}{12}\right)^5=\frac {87781}{248832}$$.
As there are $12$ chambers, the answer is then $$12p=12\times \frac {87781}{248832}=\boxed {\frac {87781}{20736}}$$
A: If this is just a multiple choice question, then all those calculations are unnecessary. Namely, as $1\le X\le 5$, we have $1\le\mathbb E(X)\le 5$, which implies that the only solution that might be correct is C. Namely, A is bigger than $5$, and B and D are smaller than $1$.
A: You are undercounting. I presume the idea with:
$$\mathbb P(X=k)=\frac{12\cdot 11\cdot\ldots\cdot (12-k+1)\cdot k^{5-k}}{12^5}$$
is this: the first ball can go into one of $12$ chambers, the second goes into one of $11$ remaining etc. - until we fill the $k$ chambers - and then the remaining $5-k$ balls go freely into those already defined $k$ chambers.
This neglects the possibility that the first $k$ balls don't all go into different chambers. For example, for $k=2$, you can have the second ball go into the same chamber as the first - and only the third ball goes to a different chamber. This event is not counted.
As a result, your probabilities are smaller than needed and don't add up to $1$.
A: As have been already noted the probabilities you wrote down are not correct. The correct probability of $k$ from $n$ bins being non-empty after $m$ balls are placed into the bins is
$$
\mathsf P(X=k)=\frac{\binom nk {m \brace k}k!}{n^m}.
$$
Here the factor $\binom nk$ counts the number of ways to choose the $k$ non-empty bins, and the factor ${m \brace k}k!$ (where ${m \brace k}$ refers to Stirling number of the second kind) counts the number of ways to distribute $m$ distinct balls between these $k$ bins.
It is the factor ${m \brace k}$ which is missing in your solution. The origin of the error was (as explained in a previous answer) unduly fixed order of placing the balls into the bins.
