# Average of m weights equals the average of expected value

I'm reading a paper that says $max\{w_1,\sum_jM^j/m\} = max\{w_1,\sum_i w_i/m\}$.

There are $n$ weights $w_1 \dots w_n$ and $w_1$ is the max of the weights.

$M^j$ is defined as $\sum_i p^j_iw_i$.

$p_i^j$ are probabilities, so you can think of $M^j$ as the expected weight. Why does $\sum_jM^j/m = \sum_i w_i/m$?

-
Can you confirm if $\sum_j p^j_i = 1$? – Tom Nov 8 '13 at 2:17
yes, i can. They should sum to one. – larry Nov 8 '13 at 6:56

$$\sum_j M^j = \sum_j \left(\sum_i p_i^j w_i \right) = \sum_i \left( \sum_j p^j_i \right) w_i = \sum_i w_i$$ where the last equality comes from the fact that $$\sum_j p^j_i = 1$$