Probability distribution of randomly drawn summed ranks I have a sequence of N unique values which are ranked 1 to N.
A subset are those in positions 1 to n where n < N.
An ideal system of ordering would put the lowest ranks 1 to n in the first n positions.
e.g., N = 6, n = 3:  
best cases:  1, 2, 3, 4, 5, 6     or equally, e.g.,:  3, 2, 1, 6, 5, 4
worse cases: 6, 5, 4, 3, 2, 1    or equally, e.g.,: 4, 5, 6, 1, 2, 3  
As a way of scoring the success of the ordering, I can sum the positions 1 to n, with a lower score being a greater degree of success. The number of unique scores is, I believe, given by n x (N - n) + 1. For high values of N, where the number of unique values is also high, the probabilities of achieving the different scores from random ordering is, I believe, approximately normally distributed.
However, for lower values of N where a normal approximation is not accurate, do the score probabilities follow a known distribution? I can calculate probability using Monte Carlo methods, but is there a formula?
 A: Yes, this distribution is quite well known.
Imagine that you regard the first $n$ values as one sample and the remaining $m=N-n$ values as a second sample. Then your statistic is the sum of the ranks in the first sample.
This is one of the standard forms of the Wilcoxon rank sum test, and a linear shift of the Mann-Whitney test.
Not only can you find tables, but the distribution is built in to some packages.
For example, in R the functions dwilcox,pwilcox,qwilcox,rwilcox are available; they correspond to your statistic less the minimum possible value.
For example, with your $N=6,n=3$, to see the probability of getting a total $\leq7$, noting that $6$ is the smallest sum, you'd call pwilcox(7-6,3,3)
(the second and third arguments being the number in the first 'sample' and the remainder):
> pwilcox(7-6,3,3)
[1] 0.1

There are 20 (i.e. $6\choose 3$) combinations; two of them are $\leq 7$, which corresponds to the 0.1 there. (Another useful function in R is combn which will enumerate all the combinations or compute functions on them; for example table(combn(6,3,sum)) will count the number of combinations at each sum.)
Here's an example of the wilcox functions in R with larger numbers:

(after this point the normal approximation starts to become quite handy except perhaps for the last couple of values at each end, which can be calculated by hand)
