# Expectation Value of a Multiset

Imagine that I have $k$ balls randomly distributed (uniformly) among $n$ boxes. I.e., with repetition.

How could I calculate the expected number of balls in a randomly chosen box?

By symmetry. They must add up to $k$ for all $n$ boxes, and they're all the same, so they're $\frac kn$.

• Please have a look at my question: math.stackexchange.com/questions/1749063/…. Any idea where I'm going wrong would be much appreciated. You gave a very useful answer to my last question (5 years ago). Apr 21, 2016 at 22:58

The $i$-th ball goes into box $j$ with probablilty $1/n$ and not into box $j$ with probability $1-1/n$ independent of other balls. So, the number of balls in box $j$ is $Binom(k,1/n)$, so on average there are $k/n$ balls in box $j$.

Given that from a distribution point of view all boxes are identical, $E[box_1] = E[box_2] = \textit{...} = E[box_n]$.

Given that the probability of a ball falling in a box is $1/n$ (for all $k$ balls), you can calulate the expectation as it follows:

$E[box_z] = \sum^k_{i=1}{p_i} \cdot 1 = \sum^k_1{\frac{1}{n}} = \frac{k}{n}$

Note: Being a 0/1 problem, the ball is in the box (1) or not (0), the value $1$ in the formula represents when such ball falls into the box.