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? 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 &quot;solution&quot;:
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&gt;0)$, i.e.
$$E(X|X&gt;0) = \sum_{x&gt;0} x P(X=x | X &gt;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&gt;0) = \frac{P(X=x)}{P(X &gt; 0)}$$
for $1 \le x \le 50$, and $P(X&gt;0) = 1- P(X=0) = 1 -.99^{50}$,
so
$$E(X|X&gt;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&gt;0) = \frac{0.50}{1-.99^{50}} = \boxed{1.26584}$$
The probability that any given child would not get any candy is (99/100)^50, about .6050, so 100*(1-.6050), 39.499, would get 1 or more: on average 50/34.999 or 1.26584.