Mean of a Random Distribution picking top n elements of m tests. I have a distribution that goes as follows.
$X $ has a value taken from several values, and all options are equiprobable.
$X \in \{x_1, x_2, ..., x_q\}$
Finding the mean of $X$ is easy: $E(X) = \sum x_i / q$
My problem is that we have now another random variable $Y(n,m)$.
$Y(n,m)$ consist in doing $m$ $X$ experiments,picking the $n$ maximum values we got and summing them.
Taking that into account, what would be $E(Y)$?
I tried to describe my question as accurately as I could, though will gladly clarify if needed.
 A: First we start by finding the expected maximum of $X$. To find the expected maximum of $X$ we will have to assume for our purposes that in the possible values of $X$, they will be ordered in such a way $x_i > x_j$ if $i > j$.
Now let $S_{k,l}$ denote the set of size $k$ that contain all the received values of the $k$ experiments. So $$S_{k,l} = \{ X_i| i \in\Bbb Z \space \& \space 0<i\le k \space \& \space X_i \in \{x_1,x_2,...,x_{l-1} \}\}$$
So the probability that $Max(S_{k,l}) = x_{j}$ will be $1 - p_j$ where $p_j$ is the probability that all $X_i \in S $, $X_i <x_{j}$. It can be shown that
$$p_j = (\frac{j-1}{l})^m$$. 
Now we can say $$E(Max(S_{k,l})) = \sum_{j=1}^k x_j(p_j) $$
Now that we have established this we know that if we were to remove the $Max(S_{k,l}) = x_{k_w}$ we will end up with a set $S_{k-1,k_w}$. Since we will be taking the $n$ largest elements and summing them to get $Y$, we can state
$$Y = Max(S_{m,q}) + Max(S_{(m-1),m_{w}}) + ... Max(S_{(m-n+1),(m-n+2)_{w}})$$
such that $k_i$ is the subscript of the $x$ such that $x_{k_i} = Max(S_{k,l})$ where $x_{k_i} \le x_l$.
$$E(Y) = E(\sum_{k=0}^n Max(S_{m-k,{(m-k+1)_w}}))$$
where $Max(S_{m+1})$ is defined to be $x_q$ and $k_w$ is defined such as $x_{k_w} = Max(S_k)$. So therefore we can conclued finally
$$E(Y) = \sum_{k=0}^n \sum_{j=1}^kx_j(\frac{j-1}{(m-k+1)_w})^m$$
