Why Increasing Tests Characterize Order
Usual stochastic order compares two distributions at every threshold: one variable is smaller in this order when its upper-tail probabilities are no larger. The increasing-test-function characterization expresses the same comparison in terms of expectations. It is useful because many quantities of interest are increasing functions of a random outcome: if one distribution is stochastically smaller, every bounded increasing assessment of that outcome has no larger expectation.
The key point is that this is an equivalence, not just a consequence in one direction. Indicator functions recover each tail probability from the test-function inequalities. In the other direction, the upper level sets of an increasing function are upper rays, so their probabilities can be compared using the tail inequalities.
The Increasing-Test-Function Characterization
A function \(g:\mathbb{R}\to\mathbb{R}\) is increasing here if \(x\le y\) implies \(g(x)\le g(y)\); it need not be strictly increasing. Monotone real-valued functions are measurable, and we state measurability explicitly in the theorem.
Proof. First suppose that \(E[g(X)]\le E[g(Y)]\) for every bounded, measurable, increasing \(g\). For a fixed \(t\in\mathbb{R}\), choose \(g_t(x)=\mathbf{1}\{x>t\}\). This function is bounded, measurable, and increasing. Therefore
This holds for every \(t\), so \(X\le_{\mathrm{st}}Y\).
For the reverse implication, suppose \(X\le_{\mathrm{st}}Y\), and fix a bounded, measurable, increasing \(g\). Choose finite constants \(m\) and \(M\) such that \(m\le g(x)\le M\) for every \(x\). For each \(u\in[m,M]\), the set
is an upper set: if \(x\in A_u\) and \(y>x\), then \(g(y)\ge g(x)>u\), so \(y\in A_u\). Every upper set in \(\mathbb{R}\) is empty, all of \(\mathbb{R}\), or an upper ray of the form \((a,\infty)\) or \([a,\infty)\). For an open upper ray, its probability comparison follows directly from the definition of stochastic order. For a closed upper ray, use continuity of probability from above:
The empty and full sets also have equal probabilities under both variables. Thus \(P(X\in A_u)\le P(Y\in A_u)\) for every \(u\in[m,M]\).
Pointwise, for any \(z\in\mathbb{R}\),
Taking expectations and interchanging expectation and integration is valid by Tonelli's theorem: the indicator integrand is nonnegative and measurable, and the interval \([m,M]\) has finite length. Hence
This proves the reverse implication and completes the theorem. \(\square\)
Worked Comparisons
Worked Example: Two Bernoulli Variables
Let \(X\sim\operatorname{Bernoulli}(0.3)\) and \(Y\sim\operatorname{Bernoulli}(0.6)\), so each variable takes values 0 and 1. Verify their stochastic order and calculate the expectation difference for an arbitrary bounded increasing \(g\).
For \(t<0\), both upper-tail probabilities equal 1. For \(0\le t<1\), \(P(X>t)=0.3\) and \(P(Y>t)=0.6\). For \(t\ge1\), both probabilities equal 0. Thus \(P(X>t)\le P(Y>t)\) for every \(t\), and \(X\le_{\mathrm{st}}Y\).
For any bounded increasing \(g\), direct calculation gives
so
The inequality follows because \(g(1)\ge g(0)\). This calculation illustrates how the expectation comparison depends on the increase in \(g\), not on its absolute level.
Worked Example: Comparing Two Uniform Distributions
Let \(X\) be uniform on \([0,1]\) and \(Y\) uniform on \([0,2]\). Check the order using distribution functions, then compare expectations for the bounded increasing function \(g(x)=\min(\max(x,0),1)\).
For \(0\le t\le1\), \(F_X(t)=t\) and \(F_Y(t)=t/2\), so \(F_X(t)\ge F_Y(t)\). For \(1\le t\le2\), \(F_X(t)=1\ge t/2=F_Y(t)\). For \(t<0\), both distribution functions equal 0; for \(t>2\), both equal 1. Thus \(F_X(t)\ge F_Y(t)\) everywhere, which means \(X\le_{\mathrm{st}}Y\).
On the support of \(X\), \(g(X)=X\), so \(E[g(X)]=1/2\). For \(Y\), the function equals \(y\) on \([0,1]\) and 1 on \([1,2]\). Using the density \(1/2\) on \([0,2]\),
Therefore \(E[g(X)]=1/2\le3/4=E[g(Y)]\), as the characterization requires.
Worked Example: Equal Means Do Not Establish Stochastic Order
Let \(X\) equal 0 or 2 with probability \(1/2\) each, and let \(Y=1\) with probability 1. Both means equal 1. Determine whether either variable is smaller in stochastic order, and find a bounded increasing test that detects the failure.
At \(t=1\), \(P(X>1)=1/2\), whereas \(P(Y>1)=0\). Thus \(X\le_{\mathrm{st}}Y\) fails. The reverse order fails at \(t=0\): \(P(Y>0)=1\), while \(P(X>0)=1/2\), so \(Y\not\le_{\mathrm{st}}X\).
The bounded increasing function \(g(x)=\mathbf{1}\{x>1\}\) gives \(E[g(X)]=1/2\) and \(E[g(Y)]=0\), contradicting the test inequality in the direction \(X\le_{\mathrm{st}}Y\). For the reverse direction, \(h(x)=\mathbf{1}\{x>0\}\) gives \(E[h(Y)]=1>E[h(X)]=1/2\). Equal means therefore do not determine the stochastic order.
Unbounded Increasing Tests
The theorem is stated for bounded tests so that all expectations exist automatically. It also applies to unbounded increasing functions when both expectations are well-defined and finite in absolute value.
To verify the extension, define \(g_M(x)=\max(-M,\min(g(x),M))\) for \(M>0\). This is bounded, measurable, and increasing, so the theorem gives \(E[g_M(X)]\le E[g_M(Y)]\). As \(M\to\infty\), \(g_M(X)\to g(X)\) and \(g_M(Y)\to g(Y)\) pointwise. Also \(|g_M(X)|\le|g(X)|\) and \(|g_M(Y)|\le|g(Y)|\). The assumed integrability and the dominated convergence theorem allow passage to the limit in both expectations, proving the claim.
In particular, if \(X\) and \(Y\) are integrable, the function \(g(x)=x\) gives \(E[X]\le E[Y]\). This is a consequence of stochastic order, not a sufficient condition for it. More generally, for any unbounded test, check that its expectations exist before interpreting an expectation inequality; an expression involving an undefined difference of infinite quantities is not a valid comparison.
Common Pitfall and Key Takeaway
- Reversing the logical direction. Starting by assuming \(X\le_{\mathrm{st}}Y\) and applying \(g_t(x)=\mathbf{1}\{x>t\}\) proves that stochastic order implies the test inequality for those indicators. It does not prove that test inequalities imply stochastic order. For that converse, start by assuming the inequalities for every bounded increasing \(g\), then apply them to each \(g_t\).
- Checking only a few tests. A comparison for the identity function, or for a selected collection of increasing functions, does not establish stochastic order. The characterization requires all bounded measurable increasing tests; indicator tests at every threshold recover the full tail comparison.
- Ignoring endpoints of level sets. An increasing function can have a level set \([a,\infty)\), not just \((a,\infty)\). The closed-ray comparison follows by taking thresholds increasing to \(a\) and using continuity of probability from above.
Check Your Understanding
Try these questions using the definition and proof above.
- Which bounded increasing function recovers \(P(X>t)\) from an expectation?
- Why must a proof using upper level sets account for both \((a,\infty)\) and \([a,\infty)\)?
- If \(X\le_{\mathrm{st}}Y\) and both variables are integrable, what inequality follows by choosing \(g(x)=x\)?
- For the two-point \(X\) and constant \(Y\) in the third example, which threshold shows that \(X\not\le_{\mathrm{st}}Y\)?
- State the integrability conditions used to extend the result to an unbounded increasing function \(g\).