Choosing a Calculation That Matches the Rank Event
Order-statistic problems often become manageable once the event is stated precisely. A threshold event such as “the second-smallest observation is at most \(t\), but the third-smallest is greater than \(t\)” is a count: exactly two observations are at most \(t\). A density question about an iid sample, by contrast, calls for the order-statistic density. These are related calculations, but they use different representations.
The distinction between identical and nonidentical distributions matters. Independent observations with different distributions do not have interchangeable ranks. In an iid continuous sample, symmetry gives a particularly simple density formula, and a strictly increasing parent cdf transforms all observations to iid uniforms without changing their order.
Threshold Events for Independent, Nonidentical Observations
Suppose \(X_1,\ldots,X_n\) are independent, continuous random variables, but their distributions need not be the same. At a fixed threshold \(t\), define \(p_i=F_i(t)=P(X_i\le t)\), where \(F_i\) is the cdf of \(X_i\). The indicators \(I_i=1_{\{X_i\le t\}}\) are independent Bernoulli variables with success probabilities \(p_i\), which may differ.
The event \(X_{(k)}\le t<X_{(k+1)}\) means exactly \(k\) observations are at most \(t\). Its probability is found by summing over all subsets of \(k\) observations that could fall at or below \(t\). Each term multiplies the probabilities for those observations by the probabilities that all remaining observations exceed \(t\).
This subset formula is a Poisson-binomial calculation: it is the probability of exactly \(k\) successes among independent Bernoulli trials with potentially unequal success probabilities. For the more general event \(X_{(k)}\le t\), at least \(k\) observations must be at or below \(t\), so the probabilities for exactly \(k,k+1,\ldots,n\) observations are added.
Worked Example: Exactly Two Observations Below a Threshold
Let \(X_1\sim U(0,5)\), \(X_2\sim U(0,2)\), and \(X_3\sim U(0,1.25)\) be independent. Find \(P(X_{(2)}\le1<X_{(3)})\). Identify the method and the mistake it avoids.
Method: count observations at the threshold. The event says exactly two of the three observations are at most 1. The probabilities are \(p_1=P(X_1\le1)=1/5=0.2\), \(p_2=P(X_2\le1)=1/2=0.5\), and \(p_3=P(X_3\le1)=1/1.25=0.8\). The corresponding probabilities of exceeding 1 are \(0.8,0.5,0.2\).
There are three possible pairs of observations that can be at most 1:
Both \(X_1\) and \(X_2\) are at most 1, while \(X_3\) exceeds 1: \(0.2(0.5)(0.2)=0.02\).
Both \(X_1\) and \(X_3\) are at most 1, while \(X_2\) exceeds 1: \(0.2(0.8)(0.5)=0.08\).
Both \(X_2\) and \(X_3\) are at most 1, while \(X_1\) exceeds 1: \(0.5(0.8)(0.8)=0.32\).
Adding the mutually exclusive cases gives \(0.02+0.08+0.32=0.42\). Thus \(P(X_{(2)}\le1<X_{(3)})=0.4200\) to four decimal places. As a check, the probabilities of exactly zero, one, two, and three observations below 1 are \(0.08,0.42,0.42,0.08\), which sum to 1.
Mistake avoided: treating the three observations as identically distributed and using a binomial probability. Their threshold probabilities differ, so the binomial model does not apply.
Order-Statistic Density for an Iid Continuous Sample
Now suppose \(X_1,\ldots,X_n\) are iid from a continuous distribution with cdf \(F_X\) and density \(f_X\). The density of \(X_{(k)}\) at \(x\) is obtained by selecting which observation lies near \(x\), requiring exactly \(k-1\) observations below it, and requiring the remaining \(n-k\) observations above it.
The formula requires identical distributions as well as independence. It does not apply unchanged to independent observations with different cdfs; a particular rank in a nonidentical sample may instead require summing over identities or integrating over possible values, as in the next example.
Why the Iid Density Formula Holds
For a small interval from \(x\) to \(x+dx\), one specified observation has probability approximately \(f_X(x)\,dx\) of falling in that interval. For it to be the \(k\)th-smallest, exactly \(k-1\) of the other \(n-1\) observations must be below \(x\), and the other \(n-k\) must be above \(x\). Independence gives the product of those probabilities.
There are \(n\) choices for which observation falls in the small interval. Multiplying the expression by \(n\) and dividing by \(dx\) gives the density. The coefficient is \(n\binom{n-1}{k-1}=n!/((k-1)!(n-k)!)\). This argument depends on the iid assumption: if the observations have different distributions, the probability of being below \(x\) depends on which observations were selected.
Transforming Iid Ranks Through the Parent Cdf
If \(F_X\) is continuous and strictly increasing on the support of \(X\), then \(U_i=F_X(X_i)\) is uniform on \((0,1)\). For an iid sample, the \(U_i\) are also independent. Because a strictly increasing function preserves order, \(U_{(k)}=F_X(X_{(k)})\). Thus rank calculations can be made on the uniform scale.
For \(n\) iid uniform observations, the density of \(U_{(k)}\) is
This is a Beta density with parameters \(k\) and \(n-k+1\). Returning to the original scale uses the density transformation \(f_{X_{(k)}}(x)=f_{U_{(k)}}(F_X(x))f_X(x)\), which agrees with the iid order-statistic density above. The strictly increasing condition matters for rank preservation. If different cdfs \(F_i\) are applied to nonidentical observations, the transformed variables may each be uniform, but applying different transformations need not preserve comparisons between the original observations.
Worked Example: An Exponential Sample on the Uniform Scale
Let \(X_1,\ldots,X_4\) be iid exponential random variables with rate 1, so \(F_X(x)=1-e^{-x}\) and \(f_X(x)=e^{-x}\) for \(x\ge0\). Find the density of \(X_{(2)}\) at \(x=\ln 2\), and find \(P(X_{(2)}\le\ln 2)\). State the method and the trap avoided.
Density calculation. At \(x=\ln2\), \(e^{-x}=1/2\), so \(F_X(x)=1/2\) and \(f_X(x)=1/2\). For \(n=4\) and \(k=2\), the coefficient in the order-statistic density is \(4!/((2-1)!(4-2)!)=24/(1\cdot2)=12\). Therefore
Threshold probability by cdf transformation. Since \(F_X\) is continuous and strictly increasing, \(U_i=F_X(X_i)\) are iid uniform, and \(X_{(2)}\le\ln2\) is equivalent to \(U_{(2)}\le1/2\). This means at least two of the four uniforms are at most \(1/2\). Their count is binomial with parameters 4 and \(1/2\), so
The density is \(0.75\) per unit of \(x\), and the probability is \(0.6875\). The probability is a useful check: it is also the cdf at \(\ln2\), not the density there. Trap avoided: a density value is not a point probability; a continuous random variable has probability zero of equaling any single specified value.
A Rank Calculation With Nonidentical Supports
For a nonidentical sample, a specified ordering can be calculated by conditioning on one observation’s value and integrating the probabilities that the others fall in the required ranges. The limits of integration and the cdfs or densities must match the identities of the observations.
Worked Example: Probability of a Specified Full Ordering
Let \(X_1\sim U(0,1)\), \(X_2\sim U(0,2)\), and \(X_3\sim U(0,3)\) be independent. Find the probability that \(X_1\) is smallest, \(X_2\) is second, and \(X_3\) is largest. Give the method and identify the common mistake it avoids.
Method: condition on the smallest value \(X_1=x\). Its density is 1 for \(0<x<1\). For the required ordering, \(X_2=y\) must lie between \(x\) and 2, and \(X_3\) must exceed \(y\). On \(0\le y\le2\), the density of \(X_2\) is \(1/2\), and \(P(X_3>y)=1-y/3\). Independence therefore gives
Evaluate the inner integral: \(\int_x^2(1-y/3)\,dy=(2-x)-(4-x^2)/6=(8-6x+x^2)/6\). Multiplying by \(1/2\), the inner result is \((8-6x+x^2)/12\). Thus
The answer is \(0.4444\) to four decimal places. As a check, \(X_1\) is the smallest with probability \(\int_0^1(1-x/2)(1-x/3)\,dx=23/36\), which is greater than \(4/9=16/36\), as it must be: the specified full ordering is only one way for \(X_1\) to be smallest. Mistake avoided: assigning probability \(1/6\) to each ordering by symmetry. That symmetry applies to iid continuous observations, not to these three different uniform distributions.
Practical Checks Before You Calculate
Rank problems reward careful event translation. Before calculating, decide whether the event is about a count below a threshold, a particular identity occupying a rank, or the value of an iid order statistic. Then check the assumptions and the direction of any transformation.
- For independent nonidentical observations, use the relevant \(F_i(t)\) values or integrate using the individual densities. Do not use a binomial count unless the threshold probabilities are equal.
- For an iid continuous sample, the order-statistic density includes both the parent density \(f_X(x)\) and the below/above factors involving \(F_X(x)\).
- For an iid sample transformed by one common strictly increasing cdf, ranks are preserved. Applying different transformations to nonidentical observations does not generally preserve ranks.
- When an event says “exactly \(k\) are below \(t\),” count the subset possibilities. When it says “the \(k\)th is at most \(t\),” include all counts of \(k\) or more.
These representations are useful well beyond uniform or exponential examples: the threshold method depends only on the individual cdf values, while the iid density formula applies across continuous parent distributions. Matching the method to the event is the central step in a reliable rank calculation.
Check Your Understanding
For each problem, choose a count, density, transformation, or conditional-integration method before calculating.
- Four independent measurements have probabilities \(0.1,0.3,0.6,0.8\), respectively, of being at most a specified calibration level. Find the probability that exactly two measurements are at most that level. (Answer: 0.4544)
- For five iid continuous observations, find the density of the third order statistic after transforming each observation through its parent cdf, evaluated at \(u=0.4\). (Answer: 1.7280)
- Three iid exponential lifetimes have rate 2. Find the probability that their maximum is at most \((\ln 2)/2\). (Answer: 0.1250)
- Let \(X_1\sim U(0,2)\), \(X_2\sim U(0,1)\), and \(X_3\sim U(0,3)\) be independent. Find the probability that \(X_1\) is the largest. (Answer: \(11/36\))
- For four iid observations from a continuous, strictly increasing parent cdf, let \(q(p)\) satisfy \(F_X(q(p))=p\). Find \(P(q(0.25)<X_{(3)}\le q(0.75))\). (Answer: \(11/16=0.6875\))