Can anyone prove, or disprove with a counter-example, the following statement:
The value of $\sum_{k=1}^n kp_k$ with $\sum_{k=1}^np_k = 1,\,$ is minimized if $p_1 \ge p_2 \ge \cdots \ge p_n$, and maximized if $p_1 \le p_2 \le \cdots \le p_n$
This problem arises in the analysis of an algorithm to generate values from a discrete random variable, using the inverse transform method.
I can prove it for $n = 2$, but cannot get any further. Hardy, Littlewood, and Polya's, Inequalites, is beyond me. I have tested the statement empirically in Matlab and it seems to be true.
I have the awful feeling that this is a well-known result, but I'm not a mathematician and don't know how to find or prove the statement.