# Average rank of a sequence of iid N(0,1) random variables.

Suppose we have $$X_1, ..., X_n$$ are iid N(0,1), and the rank is defined as below $$r(X_i) = \sum_{i \neq j} I(X_j \geq X_i)$$ What is the expected rank?

I get that it is $$(n-1)/2$$ but Mood in "On the Asymptotic Efficiency of Certain Nonparametric Two-Sample Tests" states it to be (n+1)/2.

Am I missing something here?

• As a clue the average of $0,1,2,\ldots,n-1$ has an average of $\frac{n-1}{2}$ while the average of $1,2,3,\ldots,n$ has an average of $\frac{n+1}{2}$ – Henry Jan 13 at 22:38

There are $$n$$ possible ranks, between $$0$$ and $$n-1$$. Hence the average rank is $$E[r(X_i)] = \sum_{i=0}^{n-1} \frac{i}{n} = \frac{n(n-1)}{2n} = \frac{n-1}{2}$$
• Could you explain why the following paper states it as $(n+1)/2$ researchgate.net/publication/… – math111 Jan 13 at 20:12
• @math111 in Mood's original paper a different definition of rank is used, which results in a rank between $1$ and $n$ (section 4 here projecteuclid.org/download/pdf_1/euclid.aoms/1177728719). I assume in your paper they are using this other definition – Jsevillamol Jan 13 at 20:45
• @math111 that section 4 has $m$ and $n$ observations "ranked from $1$ to $m+n$" – Henry Jan 13 at 22:36