Given a random list of first $n$ integers what is the expectation of the fraction of numbers before the $m^{th}$ number less than $m$. A little context, I have a ranking model returns a list of ranks, I am interested in how good my ranking model is. One way to look at this is to look at what fraction of the top $m$ candidates the model picks are actually in the top $m$ candidates. The fraction I get is quite low ~20-30% as we vary m but we're bad at the task in question so it might still be useful. To get a grasp on this I want to know the corresponding fractions for a randomly sorted list. This is a combinatorics problem that I believe should have an analytical answer but I can't get my head around it.
The problem we want to solve is: Given a random list of first $n$ consecutive integers what is the expectation of the fraction of list entries before the $m^{th}$ entry that are less than $m$.
--edit
empirically the answer appears to be $\frac{m}{n}$ but I don't have a good grasp at how to arrive at this through combinatorics
 A: Question
Given $n, m \in \mathbb{Z}$, we need the expected value of the proportion of elements before the $m$th position (i.e. of the first $m-1$ numbers) which are smaller than $m$.
The cumbersome way
Let's say $k$ of the first $m-1$ elements are less than $m$, and the probability of this is $p(k)$. The goal is to get
$$E\left[\frac{k}{m-1}\right] = \sum\limits_{k=1}^{m-1}p(k)\frac{k}{m-1}$$
For $p(k)$, we have the following.
The number of ways to choose the $m-1$ elements before $m$ such that exactly $k$ are less than $m$ is
$$a = \binom{m - 1}{k}\binom{n - m + 1}{m - k - 1}$$
Given these choices, the number of permutations of the whole list such that the first $m-1$ elements are these chosen ones is (the number of permutations for the $m-1$ chosen elements multiplied by the permutations of the remaining elements)
$$b = (m - 1)!(n - m + 1)!$$
We divide $a \times b$ by $n!$ to get the total probability and substitute in the equation for the expected value to get our answer:
$$E\left[\frac{k}{m-1}\right] = \sum\limits_{k=1}^{m-1}\frac{ab}{n!}\frac{k}{m-1}$$
Apparently, this evaluates to $\frac{m-1}{n}$ according to wolframalpha, which is the same as @MikeEarnest's much more elegant calculation. I haven't tried to work out how to hand-simplify the equation since the answer matches what is expected, though it looks like a significant simplification of the equation should be possible.
