What is the expected number of full holes out of $b$ holes if I randomly throw $f$ balls The question in the title is answered in two different places that give out different results and I if someone could explain why the results differ it would be great.
The first approach is from here:
Solution conflict: Expected number of distinct birthdays for $100$ people
Basically answering how many distinct holes will be chosen. For f and b its:
$$E = b*\left(1-\frac{b-1}{b}^{f}\right)$$
For the first approach with 8 people and 8 holes I get:
$$E = 8*\left(1-\frac{7}{8}^{8}\right)=5.25$$
The other approach is here:
Put 13 identical balls in 8 different holes. What is the probability that there's one empty hole?
This is the probability of having k empty holes out of b which is given by:
$P_{\text{empty}}(i) =\binom{m}{i}\binom{k-1}{m-i-1}$ now the expectation of full holes is:
$\sum_{i=0}^{m}(m-i)\binom{m}{i}(P_{\text{empty}}(i))$
where we have $k$ balls and $m$ holes
For the second approach for 8 people and 8 holes I get:$\sum_{i=0}^{8}(8-i)\binom{8}{i}(P_{\text{empty}}(i)) = 4.267$
Both try to answer the same thing, what is the average of full holes but the result is different. Is it because of underlying assumptions made? Or something else? Clarification would be appreciated.
 A: The first computes the weighted average (weighted accoording to probability of occurrence), whereas the second is a simple average of all possible arrangements of full holes.
Added over comment
Consider a simple case, $4$ balls put in $3$ boxes
(I): Akin to a $3$ faced die thrown $4$ times, $3^4 = 81$ cases
$4-0-0:\; \Large\binom{4}{4,0,0}\frac{3!}{1!2!}=3$
$3-1-0:\; \Large\binom{4}{3,1,0}\frac{3!}{1!1!1!} = 24$
$2-2-0:\; \Large\binom{4}{2,2,0}\frac{3!}{2!1!} = 18$
$2-1-1:\; \Large\binom{4}{2,1,1}\frac{3!}{1!2!}= 36$
Average number of boxes filled $= \Large\frac{3\cdot1+24\cdot 2 + 18\cdot2 +36\cdot3}{81} = \frac{195}{81}$
$[II]: Using\, stars\, and\, bars,\, \Large\binom{4+3-1}{3-1}=15\;$cases
Average boxes filled $= \Large\frac{3\cdot1+ 6\cdot2+ 3\cdot2+3\cdot3}{15} = \frac{30}{15}=2$
A: The expected number of full holes out of b holes when throwing f balls is given by the formula:
E(X) = f * (1 - (b-1)/b)^f
Where X is the number of full holes, f is the number of balls thrown, and b is the number of holes.
This formula assumes that the probability of a ball landing in a hole is independent of the other balls, and that all holes are equally likely to be filled.
It can also be understood as the probability of all other holes except one to be empty after throwing f balls.
If you want to calculate the expected number of full holes for a specific number of balls and holes, you can substitute the values into the formula.
For example, if you throw 10 balls at a target with 20 holes, the expected number of full holes would be:
E(X) = 10 * (1 - (20-1)/20)^10 = 7.34
So, you can expect around 7 full holes out of 20 if you randomly throw 10 balls.
