First marked item in a random permutation (source code)

= First marked item in a random permutation
{title2=$\Pr(K=k)=\binom{N-k}{m-1}/\binom Nm$}

When $m\ge1$ items among $N$ are marked, inspect a uniformly random permutation until the first marked item. For its first position to be $k$, the other $m-1$ marked positions must lie among the last $N-k$ slots. This yields the displayed law with support $1\le k\le N-m+1$. It is the first-success form of <sampling without replacement>. For one marked item the position is uniform, while its conditional success chance after $r$ failures increases to $1/(N-r)$.