Why Condition on a Rank Threshold?
A comparison such as “the second-smallest measurement in one group exceeds the smallest measurement in another” involves two random thresholds and two rank conditions. A useful strategy is to fix the value of one order statistic first. Once that threshold is fixed, the comparison becomes a counting problem in the other sample. Averaging that conditional probability over the threshold’s distribution gives the desired answer.
This method is especially useful when the samples are independent but their sizes, parent distributions, or ranks differ. The key is to keep two tasks separate: calculate the chance that one sample’s order statistic crosses a fixed threshold, then average over the random threshold from the other sample.
Conditioning on the Other Sample’s Order Statistic
Let \(X_{(r)}\) be the \(r\)th order statistic from one sample, and let \(Y_{(s)}\) be the \(s\)th order statistic from a second, independent sample. For a fixed threshold \(t\), the event \(X_{(r)}>t\) depends on how many observations in the first sample are at most \(t\). Define that count by \(N_t\). With continuous observations, \(X_{(r)}>t\) exactly when fewer than \(r\) observations are at most \(t\), or \(N_t\le r-1\).
Because the samples are independent, the first sample’s observations remain governed by their original distributions when we condition on \(Y_{(s)}=t\). Thus we can calculate \(P(X_{(r)}>t)\) and then average that quantity over the distribution of \(Y_{(s)}\).
The integral is effectively over the support of \(Y_{(s)}\). If the \(X_i\) are independent but not necessarily identically distributed, set \(p_i(t)=P(X_i\le t)\). The count \(N_t\) is then a sum of independent indicator variables with possibly different success probabilities. Its probability of being at most \(r-1\) is a Poisson-binomial probability:
Here \(A\) specifies the observations that are at most \(t\). If instead the first sample is iid with cumulative distribution function \(F\), the count is binomial, which gives the simpler expression below.
If the second sample consists of \(m\) iid observations from a continuous distribution with cumulative distribution function \(G\) and density \(g\), its \(s\)th order statistic has density
This density follows by considering a small interval around \(t\): one observation must fall in that interval, \(s-1\) must fall below it, and \(m-s\) must fall above it. The coefficient counts the ways to assign those roles. Multiplying the conditional crossing probability by this density and integrating completes the calculation.
Worked Comparisons
Worked Example: A Sample Maximum Compared with Another Sample Minimum
A hypothetical laboratory independently records two readings from each of two testing procedures. All four readings are iid \(U(0,1)\), measured in a normalized scale. What is the probability that the larger reading from the first procedure exceeds the smaller reading from the second? No interest rate or mortality assumption is involved; both samples have the stated continuous uniform distribution.
Method. Let \(X_{(2)}\) be the first sample’s maximum and \(Y_{(1)}\) the second sample’s minimum. Condition on \(Y_{(1)}=y\). The minimum of two iid \(U(0,1)\) observations has density \(2(1-y)\) for \(0<y<1\).
For the first sample’s maximum to be at most \(y\), both observations must be at most \(y\). Each has probability \(y\), and the observations are independent, so \(P(X_{(2)}\le y)=y^2\). Therefore,
Average over the conditioning minimum:
Check. The complementary event is that both readings from the first procedure are below both readings from the second. Among four iid continuous observations, each choice of which two observations occupy the lowest two ranks is equally likely. The first procedure occupies both lowest ranks with probability \(1/\binom42=1/6\), so the desired probability is \(1-1/6=5/6\), as calculated. The method also avoids confusing the minimum’s density, \(2(1-y)\), with the maximum’s density, \(2y\).
Worked Example: A Middle Rank Compared with a Sample Maximum
A hypothetical device produces three independent calibration errors \(X_1,X_2,X_3\), each distributed \(U(0,1)\). A separate device produces two independent errors \(Y_1,Y_2\) from the same distribution, independently of the first device. Find the probability that \(X_{(2)}>Y_{(2)}\). No interest rate or mortality assumption is involved; all five errors follow the stated continuous uniform model.
Method. Condition on \(Y_{(2)}=y\), the maximum of the second sample. Its density is \(2y\) for \(0<y<1\). The event \(X_{(2)}>y\) holds when at most one of the three \(X\) observations is at most \(y\). Equivalently, at least two exceed \(y\). The probability is the sum of the cases in which exactly two exceed and all three exceed:
Integrating against the maximum’s density gives
Check. The conditional probability is \(1\) at \(y=0\) and \(0\) at \(y=1\), consistent with the threshold’s endpoints. A common error is to count only the case in which exactly two \(X\) observations exceed \(y\), omitting the case in which all three exceed. That incorrect calculation gives
which is too small. The rank event is “at least two exceed,” not “exactly two exceed.”
Worked Example: Independent but Nonidentically Distributed Observations
In a hypothetical inspection, the first procedure produces two independent normalized measurements: \(X_1\sim U(0,1)\) and \(X_2\sim U(0,2)\). The second procedure independently produces two measurements, each distributed \(U(0,1)\). Find the probability that the first procedure’s maximum exceeds the second procedure’s minimum. No interest rate or mortality assumption is involved; the distributions and intervals are as stated.
Method. Condition on the second procedure’s minimum \(Y_{(1)}=y\). Since its two observations are iid \(U(0,1)\), the threshold density is \(2(1-y)\) on \(0<y<1\). For this range of \(y\), the individual probabilities of being at most \(y\) are \(P(X_1\le y)=y\) and \(P(X_2\le y)=y/2\). Independence gives
Thus \(P(X_{(2)}>y)=1-y^2/2\), and
Check. The result is close to one because \(X_2\) can reach values up to \(2\), while the conditioning minimum cannot exceed \(1\). The calculation correctly uses different threshold probabilities for \(X_1\) and \(X_2\); treating the first sample as identically distributed would give the wrong crossing probability.
A Reliable Calculation Sequence
Before integrating, identify exactly which sample supplies the random threshold and which sample is being tested against it. Then translate the tested rank event into a count. This prevents a frequent reversal: \(X_{(r)}>t\) means at most \(r-1\) observations are at or below \(t\), whereas \(X_{(r)}\le t\) means at least \(r\) are at or below \(t\).
Write the target event explicitly, such as \(X_{(r)}>Y_{(s)}\), and confirm that the two samples are independent.
Set \(Y_{(s)}=t\). For the first sample, express \(X_{(r)}>t\) as a count event and calculate that probability using a binomial or Poisson-binomial model as appropriate.
Use the distribution of \(Y_{(s)}\), not the density of a different rank from the same sample. Determine its support before writing the integral.
Average the conditional probability over the threshold density. Check the result is between zero and one and, when possible, verify it by considering the complementary event or rank symmetry.
The main exam trap is to get the correct order-statistic density but the wrong count event, or vice versa. Independence does not make observations within the same sample’s order statistics independent; instead, it allows the conditional crossing probability from one sample to be averaged over the other sample’s threshold distribution. If atoms are present, equal values can occur with positive probability, so the strict comparison and the treatment of ties require additional care.
Check Your Understanding
For each independent-sample comparison, identify the threshold rank, translate the other rank event into a count, and calculate the probability. All uniform variables below are continuous and independent as stated.
- Let \(X_1,X_2\) be iid \(U(0,1)\), and let \(Y\sim U(0,1)\) be independent. Find \(P(X_{(2)}>Y)\). (Answer: \(2/3=0.6667\))
- Let \(X_1,X_2\) be iid \(U(0,1)\), and let \(Y\sim U(0,1)\) be independent. Find \(P(X_{(1)}>Y)\). (Answer: \(1/3=0.3333\))
- Let \(X_1,X_2,X_3\) be iid \(U(0,1)\), and let \(Y_1,Y_2\) be iid \(U(0,1)\), independently. Find \(P(X_{(2)}>Y_{(1)})\). (Answer: \(7/10=0.7000\))
- Let \(X_1\sim U(0,1)\) and \(X_2\sim U(0,2)\) be independent, and let \(Y\sim U(0,1)\) be independent of both. Find \(P(\max(X_1,X_2)>Y)\). (Answer: \(5/6=0.8333\))
- Let three independent observations have distributions \(X_1\sim U(0,1)\), \(X_2\sim U(0,2)\), and \(X_3\sim U(0,3)\). Independently, let \(Y\sim U(0,1)\). Find \(P(X_{(2)}>Y)\). (Answer: \(3/4=0.7500\))