Why Quantiles Give a Coupling
Stochastic order compares distributions without requiring the random variables to have been defined together. A coupling supplies such a joint construction: it places variables with the specified marginal distributions on one probability space. For the usual stochastic order, the most useful construction comes from giving both variables the same uniform input and applying their quantile functions.
The central point is that the order between distributions becomes an ordinary pointwise inequality between quantiles. This connection is exact, including for discrete distributions with jumps and atoms. We develop the generalized inverse carefully so that endpoint conventions do not obscure the argument.
The infimum convention matters. If \(F\) jumps over a range of probability levels at an atom, the generalized inverse assigns every level in that range to the location of the jump. Thus a quantile function need not be continuous, and it is generally a step function for a discrete distribution.
The Uniform Quantile Construction
Let \(U\sim\operatorname{Uniform}(0,1)\). The key identity is that the quantile falls at or below \(x\) exactly when \(U\) falls at or below \(F(x)\). The CDF's right-continuity ensures that this remains true even when the infimum in the quantile definition is not initially known to be attained.
Proof. If \(u\leq F(x)\), then \(x\) belongs to the set \(\{z:F(z)\geq u\}\), so its infimum satisfies \(Q_F(u)\leq x\). Conversely, suppose \(Q_F(u)\leq x\). By the definition of an infimum, for every \(\varepsilon>0\) there is a \(z\) with \(F(z)\geq u\) and \(z<Q_F(u)+\varepsilon\leq x+\varepsilon\). Monotonicity gives \(F(x+\varepsilon)\geq F(z)\geq u\). Letting \(\varepsilon\) decrease to zero and using right-continuity yields \(F(x)\geq u\). This proves the equivalence.
The equivalence also shows that \(Q_F\) is measurable: each sublevel set \(\{u:Q_F(u)\leq x\}\) is the interval \(\{u:u\leq F(x)\}\), restricted to \((0,1)\). For a uniform \(U\), therefore, $$ P(Q_F(U)\leq x)=P(U\leq F(x))=F(x), $$ since \(F(x)\in[0,1]\). Thus \(Q_F(U)\) has CDF \(F\). \(\square\)
Quantiles Characterize Stochastic Order
For real-valued random variables, the usual stochastic order \(X\leq_{\mathrm{st}}Y\) means that \(Y\) is at least as large as \(X\) in distribution. In CDF form, this means \(F_X(t)\geq F_Y(t)\) for every real \(t\): the variable that tends to be larger has less probability accumulated below any given threshold. The result below makes this order equivalent to comparing the quantiles at every probability level.
- \(X\leq_{\mathrm{st}}Y\), meaning \(F_X(t)\geq F_Y(t)\) for every \(t\in\mathbb{R}\).
- \(Q_X(u)\leq Q_Y(u)\) for every \(u\in(0,1)\).
- There exists a joint distribution of variables with the same marginal distributions as \(X,Y\) for which the first variable is at most the second almost surely.
Proof. First suppose \(F_X(t)\geq F_Y(t)\) for all \(t\). For fixed \(u\in(0,1)\), define \(A_X=\{x:F_X(x)\geq u\}\) and \(A_Y=\{x:F_Y(x)\geq u\}\). The CDF inequality implies \(A_Y\subseteq A_X\). Taking infima gives \(Q_X(u)=\inf A_X\leq\inf A_Y=Q_Y(u)\). Thus the CDF order implies the pointwise quantile order.
Now suppose \(Q_X(u)\leq Q_Y(u)\) for every \(u\in(0,1)\). Put \(U\sim\operatorname{Uniform}(0,1)\) and define \(\widetilde X=Q_X(U)\), \(\widetilde Y=Q_Y(U)\). The lemma shows that these have CDFs \(F_X,F_Y\), respectively. The assumed inequality gives \(\widetilde X\leq\widetilde Y\) for every outcome with \(U\in(0,1)\), hence almost surely. In particular, whenever \(\widetilde Y\leq t\), we also have \(\widetilde X\leq t\). Therefore $$ F_X(t)=P(\widetilde X\leq t)\geq P(\widetilde Y\leq t)=F_Y(t) $$ for every \(t\), proving stochastic order.
This same construction proves that the quantile inequality implies the existence of an ordered coupling. Conversely, suppose some coupling \((\widetilde X,\widetilde Y)\) has the specified marginals and satisfies \(\widetilde X\leq\widetilde Y\) almost surely. Then \(\{\widetilde Y\leq t\}\) is contained, up to a probability-zero set, in \(\{\widetilde X\leq t\}\). Taking probabilities gives \(F_X(t)\geq F_Y(t)\) for every \(t\). Hence the coupling implies stochastic order, and the three statements are equivalent. \(\square\)
Worked Quantile Couplings
Worked Example: An Ordered Pair of Discrete Distributions
Let \(X\) have probability \(0.4\) at 0 and probability \(0.6\) at 2. Let \(Y\) have probability \(0.3\) at 1 and probability \(0.7\) at 3. Find their quantiles and construct an ordered coupling.
For \(X\), the CDF reaches \(0.4\) at 0 and reaches 1 at 2. For \(Y\), it reaches \(0.3\) at 1 and reaches 1 at 3. Using the generalized inverse, $$ Q_X(u)= \begin{cases} 0,&0<u\leq 0.4,\\ 2,&0.4<u<1, \end{cases} \qquad Q_Y(u)= \begin{cases} 1,&0<u\leq 0.3,\\ 3,&0.3<u<1. \end{cases} $$ For \(0<u\leq0.3\), the quantiles are 0 and 1. For \(0.3<u\leq0.4\), they are again 0 and 3. For \(0.4<u<1\), they are 2 and 3. In every case, \(Q_X(u)\leq Q_Y(u)\).
Take one \(U\sim\operatorname{Uniform}(0,1)\) and set \(\widetilde X=Q_X(U)\), \(\widetilde Y=Q_Y(U)\). The quantile lemma gives the required marginal probabilities, and the interval check shows \(\widetilde X\leq\widetilde Y\) almost surely. The jump locations are included as shown: for example, \(u=0.4\) still gives \(Q_X(u)=0\).
Worked Example: Coupling Exponential Distributions
Let \(X\sim\operatorname{Exponential}(2)\) and \(Y\sim\operatorname{Exponential}(1)\), where the parameter is the rate. For a rate \(\lambda>0\), the CDF is \(F(t)=1-e^{-\lambda t}\) for \(t\geq0\), and is zero for \(t<0\). Solve \(u=1-e^{-\lambda t}\) to obtain $$ Q_\lambda(u)=\frac{-\log(1-u)}{\lambda},\qquad 0<u<1. $$
Thus \(Q_X(u)=-\log(1-u)/2\) and \(Q_Y(u)=-\log(1-u)\). Since \(-\log(1-u)>0\) on \((0,1)\), \(Q_X(u)\leq Q_Y(u)\) at every level. With a shared uniform variable, \(\widetilde X=-\log(1-U)/2\) and \(\widetilde Y=-\log(1-U)\) have the desired exponential marginals and satisfy \(\widetilde X\leq\widetilde Y\) almost surely. For instance, at \(u=0.9\), the quantiles are \(\log(10)/2\approx1.151\) and \(\log(10)\approx2.303\).
Worked Example: Crossing Quantiles Rule Out Stochastic Order
Let \(X\) put probability \(0.5\) at 0 and \(0.5\) at 3. Let \(Y\) put probability \(0.5\) at 1 and \(0.5\) at 2. Their quantiles are $$ Q_X(u)= \begin{cases} 0,&0<u\leq0.5,\\ 3,&0.5<u<1, \end{cases} \qquad Q_Y(u)= \begin{cases} 1,&0<u\leq0.5,\\ 2,&0.5<u<1. \end{cases} $$ For \(u\leq0.5\), \(Q_X(u)<Q_Y(u)\), but for \(u>0.5\), \(Q_X(u)>Q_Y(u)\). Thus neither the required pointwise quantile inequality nor \(X\leq_{\mathrm{st}}Y\) holds.
The CDFs confirm the failure: at \(t=2\), \(F_X(2)=0.5\) while \(F_Y(2)=1\), contradicting the required inequality \(F_X(2)\geq F_Y(2)\). The reverse stochastic order also fails, since at \(t=0\), \(F_X(0)=0.5>0=F_Y(0)\). Therefore no coupling can make either variable almost surely at most the other. In fact, any such ordered coupling would force the corresponding CDF inequality, as the theorem proves.
What the Coupling Does—and Does Not—Say
A coupling is a joint construction, not a claim about how two variables in an existing model are related. The common-uniform construction deliberately chooses dependence that realizes the order. It establishes that a coupling with the required almost-sure inequality exists; it does not imply that variables sampled independently from the same marginals will be ordered.
For instance, in the first discrete example, an independent draw has probability \(P(X=2,Y=1)=0.6(0.3)=0.18\) of producing \(X>Y\). This does not conflict with \(X\leq_{\mathrm{st}}Y\): the stochastic order guarantees the existence of an ordered coupling, not that every joint distribution with those marginals has that property.
- Reversing the CDF inequality. The larger variable in stochastic order has the smaller CDF: \(X\leq_{\mathrm{st}}Y\) means \(F_X\geq F_Y\).
- Using an ordinary inverse without checking jumps. Discrete CDFs may not have ordinary inverses. The generalized inverse and its infimum convention handle atoms consistently.
- Checking only a few quantile levels. The characterization requires \(Q_X(u)\leq Q_Y(u)\) at every \(u\in(0,1)\). A crossing, even over part of the range, rules out this order.
- Assuming the original variables are ordered almost surely. Stochastic order is a comparison of marginal distributions. Almost-sure ordering is a property of a particular joint construction.
Check Your Understanding
Use the quantile definition and coupling theorem to answer the following.
- Why does the generalized inverse assign a quantile level \(u\) to the location of a CDF jump when \(u\) lies in the jump's probability range?
- For \(U\sim\operatorname{Uniform}(0,1)\), explain why \(P(Q_F(U)\leq x)=F(x)\).
- If \(F_X(t)\geq F_Y(t)\) for all \(t\), which quantile inequality follows, and why does inclusion of the threshold sets prove it?
- What does a shared uniform variable accomplish that independent draws need not accomplish?
- If two quantile functions cross, what can you conclude about stochastic order in either direction and about an almost-surely ordered coupling?