Introduction
A rank describes where an observation falls relative to the rest of a sample. Before seeing any data, every label in an iid continuous sample is equally likely to occupy any rank. But once we condition on one observation’s value, the possible ranks are no longer equally likely: a large value is more likely to rank near the top, and a small value near the bottom. The conditional law makes this change precise.
The key simplification is to count how many of the other observations fall below the specified value. Given that value, each of the other observations independently falls below it with probability \(F(x)\). Thus the rank is one plus a binomial count. The statement concerns the rank of a specified sample label, not the rank of an observation selected by its position after sorting.
Rank and Conditioning on a Value
The event \(X_i=x\) has probability zero for a continuous distribution, so ordinary event conditioning on that event is not defined by a ratio of probabilities. Instead, the conditional distribution given \(X_i=x\) is understood as a regular conditional distribution. In this setting it has a natural version: hold the specified value fixed at \(x\), and let the other \(n-1\) observations retain their iid distribution \(F\). The theorem below gives the resulting conditional law.
The formula is valid for every real \(x\) as a conditional-distribution kernel. If \(F(x)=0\), the rank is 1 with conditional probability 1; if \(F(x)=1\), the rank is \(n\) with conditional probability 1. Values outside the support are therefore covered by the same expression.
Why the Conditional Law Is Binomial
Fix a label \(i\) and a value \(x\). For each other label \(j\), define the indicator \(I_j(x)=\mathbf{1}\{X_j<x\}\). Under the conditional distribution given \(X_i=x\), the other observations remain independent and each has distribution function \(F\). Therefore, $$ P(I_j(x)=1\mid X_i=x)=P(X_j<x)=F(x), $$ where the last equality uses continuity of \(F\). The indicators are conditionally independent, so their sum is binomial with \(n-1\) trials and success probability \(F(x)\). Adding 1 converts the number below \(x\) into the ascending rank.
The following verifies this reasoning as a conditional-distribution statement, including the fact that conditioning on an exact value is being used in the regular-conditional sense. Let \(A\) be any Borel set of possible values for \(X_i\), and let \(r\in\{1,\ldots,n\}\). By independence, integrating over \(X_i\) first and then over the other observations gives $$ P(R_i=r,\ X_i\in A) =\int_A \binom{n-1}{r-1}F(x)^{r-1}\{1-F(x)\}^{n-r}\,dF(x). $$
Indeed, for a fixed \(x\), exactly \(r-1\) of the other observations must be below \(x\), and the remaining \(n-r\) must be above it. Each specified pattern of below/above outcomes has probability \(F(x)^{r-1}\{1-F(x)\}^{n-r}\), and there are \(\binom{n-1}{r-1}\) such patterns. Integrating this probability over \(x\in A\) yields the displayed identity. This identity is the defining integral property of the stated conditional distribution, proving the theorem. \(\square\)
Worked Example: A Specified Value at the Center of a Normal Distribution
Suppose \(X_1,\ldots,X_7\) are iid \(N(10,4)\), and consider the rank \(R_3\) conditional on \(X_3=10\). Find its conditional distribution, the probability that its rank is 4, and its conditional mean and variance.
The distribution is centered at 10, so \(F(10)=1/2\). There are six other observations. Hence $$ R_3\mid X_3=10\ \sim\ 1+\operatorname{Binomial}(6,1/2). $$
For rank 4, exactly three of those six observations must be below 10: $$ P(R_3=4\mid X_3=10) =\binom{6}{3}(1/2)^3(1/2)^3 =\frac{20}{64} =\frac{5}{16}. $$ The mean is \(1+6(1/2)=4\), and the variance is \(6(1/2)(1/2)=3/2\). These are conditional quantities: they describe the rank distribution after the value 10 is specified.
Worked Example: A Value at the Thirtieth Percentile
Let \(X_1,\ldots,X_5\) be iid uniform on \((0,1)\). Find the conditional probabilities of all possible ranks for observation 2 when \(X_2=0.3\), and calculate its conditional mean and variance.
For this distribution, \(F(0.3)=0.3\). There are four other observations, so $$ R_2\mid X_2=0.3\ \sim\ 1+\operatorname{Binomial}(4,0.3). $$
For each rank \(r\), use \(k=r-1\) successes, where a success means that another observation is below 0.3: $$ \begin{aligned} P(R_2=1\mid X_2=0.3)&=(0.7)^4=0.2401,\\ P(R_2=2\mid X_2=0.3)&=4(0.3)(0.7)^3=0.4116,\\ P(R_2=3\mid X_2=0.3)&=6(0.3)^2(0.7)^2=0.2646,\\ P(R_2=4\mid X_2=0.3)&=4(0.3)^3(0.7)=0.0756,\\ P(R_2=5\mid X_2=0.3)&=(0.3)^4=0.0081. \end{aligned} $$ The probabilities sum to \(0.2401+0.4116+0.2646+0.0756+0.0081=1\). The conditional mean and variance are $$ E[R_2\mid X_2=0.3]=1+4(0.3)=2.2,\qquad \operatorname{Var}(R_2\mid X_2=0.3)=4(0.3)(0.7)=0.84. $$ A value at the thirtieth percentile tends to have a relatively low rank, as these probabilities indicate.
Conditional Mean and Variance
These formulas can be derived directly from the indicators, which also clarifies what contributes to the variation in rank. Write \(R_i=1+\sum_{j\ne i}I_j(x)\) under the conditional distribution given \(X_i=x\). Each indicator has conditional mean \(F(x)\) and conditional variance \(F(x)\{1-F(x)\}\). Conditional independence makes every covariance between distinct indicators zero. Thus $$ E[R_i\mid X_i=x] =1+\sum_{j\ne i}E[I_j(x)\mid X_i=x] =1+(n-1)F(x), $$ and $$ \begin{aligned} \operatorname{Var}(R_i\mid X_i=x) &=\sum_{j\ne i}\operatorname{Var}(I_j(x)\mid X_i=x)\\ &\quad+2\sum_{\substack{j<k\\j,k\ne i}} \operatorname{Cov}(I_j(x),I_k(x)\mid X_i=x)\\ &=(n-1)F(x)\{1-F(x)\}. \end{aligned} $$ This proves both formulas. \(\square\)
Worked Example: An Exponential Sample
Suppose \(X_1,\ldots,X_4\) are iid exponential with rate 2, so \(F(x)=1-e^{-2x}\) for \(x\geq 0\). Find the conditional rank distribution for \(R_1\) when \(X_1=\frac{1}{2}\ln(4/3)\).
At the specified value, $$ F\left(\tfrac{1}{2}\ln(4/3)\right) =1-\exp\{-\ln(4/3)\} =1-\frac{3}{4} =\frac{1}{4}. $$ There are three other observations, giving $$ R_1\mid X_1=\tfrac{1}{2}\ln(4/3) \ \sim\ 1+\operatorname{Binomial}(3,1/4). $$
The probabilities for ranks 1 through 4 are, respectively, $$ \begin{aligned} P(R_1=1\mid X_1=x)&=(3/4)^3=27/64,\\ P(R_1=2\mid X_1=x)&=3(1/4)(3/4)^2=27/64,\\ P(R_1=3\mid X_1=x)&=3(1/4)^2(3/4)=9/64,\\ P(R_1=4\mid X_1=x)&=(1/4)^3=1/64, \end{aligned} $$ where \(x=\frac{1}{2}\ln(4/3)\). Their numerators sum to \(27+27+9+1=64\). The conditional mean is \(1+3/4=1.75\), and the conditional variance is \(3(1/4)(3/4)=9/16\).
Conditional and Unconditional Rank Are Different
The conditional rank distribution depends on the value through \(F(x)\). By contrast, under iid continuous sampling, the unconditional rank of a specified label is uniform on \(\{1,\ldots,n\}\), as follows from symmetry among the labels. These statements are compatible: the unconditional distribution averages the conditional binomial probabilities over the random value \(X_i\). A value with a low percentile tends to give a low rank; a value with a high percentile tends to give a high rank. Averaging over all percentiles restores symmetry.
The conditional law is useful whenever the question is about a label’s position relative to the sample after its observed value is known. It separates the role of the population distribution, through \(F(x)\), from the sample size, through the number \(n-1\) of comparisons. In particular, a value’s percentile determines the expected rank, while the binomial variance quantifies the remaining uncertainty in that rank.
Check Your Understanding
Use the shifted binomial form to answer each question, being careful to distinguish a conditional statement from an unconditional one.
- For an iid continuous sample of size \(n\), write the conditional distribution of \(R_i\) given \(X_i=x\), and identify its binomial success probability.
- If \(n=8\) and \(F(x)=0.4\), what is \(P(R_i=3\mid X_i=x)\)?
- For the same \(n\) and \(F(x)\), calculate the conditional mean and variance of \(R_i\).
- Why does conditioning on \(X_i=x\) require a conditional-distribution interpretation rather than the elementary ratio \(P(A\cap\{X_i=x\})/P(X_i=x)\)?
- Explain why an unconditional uniform rank distribution does not imply a uniform conditional rank distribution.