If I want to distribute 50 identical candies to 100 children, what is the expected number of candies a child with at least one candy has?
For example, if I give 24 candies to child A and 26 candies to child B, and don't give any candy to other 98 children, since only two children has nonzero candies, if this way the only way how I can distribute 50 identical candies to 100 children, the quantity I'm looking for would be 25.
I tried for an hour, and in the end came up with the following "solution":
Let $Q(k)$ be the average number of candies a child with at least one candy has provided that we distribute the candies only to $k$ children. Then I assumed that the average number of candies a child from this set has $50/k$, and there are $\binom{100}{k}$ different ways of selecting these set of children, so doing a weighted average, I got
$$ \frac{ \sum_{k=1}^{50} 50*(100!) / (k * (k!) * (100-k)!)} { \sum_{k=1}^{50} 100! / ((k!) * (100-k)!)} \approx 1.08481. $$
Is my solution correct? If not, could you provide me with an detailed answer about how you solved it?
Pick any child, and let's say the number of candies he receives is $X$, so we want to find $E(X|X>0)$, i.e. $$E(X|X>0) = \sum_{x>0} x P(X=x | X >0)$$
Evidently $X$ has a Binomial distribution with $n=50$ and $p = 0.01$, so $$P(X = x) = \binom{50}{x} 0.01^x 0.99^{50-x}$$ for $0 \le x \le 50$. Now $$P(X=x | X>0) = \frac{P(X=x)}{P(X > 0)}$$ for $1 \le x \le 50$, and $P(X>0) = 1- P(X=0) = 1 -.99^{50}$, so $$E(X|X>0) = \sum_{x=1}^{50} \frac{x \binom{50}{x} 0.01^x 0.99^{50-x}}{1-.99^{50}}$$ We also have $$\sum_{x=1}^{50} x \binom{50}{x} 0.01^x 0.99^{50-x} = \sum_{x=0}^{50} x \binom{50}{x} 0.01^x 0.99^{50-x}$$ which is the expected value of a Binomial distribution, so the sum is $np = 50 \cdot 0.01 = 0.50$. Hence $$E(X | X>0) = \frac{0.50}{1-.99^{50}} = \boxed{1.26584}$$