Hello:
I'm new to Mathematica, and I sense that this question will be trivial... but I've tried to find a solution without resorting to this appeal:
Suppose we observe x0. We then observe x1, x2, ..., xn. We append x0 to the list, creating {x0, x1, ..., xn}. What is the rank of x0 in the sorted list of {x0, x1, ..., xn}?
Where L is the sorted list of {x0,x1,...,xn}, I've tried using
SequencePosition[L,x0]
If the correct answer is 2, for example, this returns {{2, 2}}. So, I could then execute
Mean[Mean[SequencePosition[L,x0]]]
which would return the correct 2. But, this seems very clumsy. There must be a direct way.
I hope this is clear. Thanks for any help. Scott