Tutorials › Statistical Theory I - Probability and Distribution Theory › Increasing-Test-Function Characterization of Stochastic Order

Stochastic Orders and Comparisons · Tutorial 946 of 994

Increasing-Test-Function Characterization of Stochastic Order

Learn how increasing functions detect stochastic order, why the equivalence holds, and what integrability is needed for unbounded tests.

Advanced 9 min read

What You'll Learn

  • State usual stochastic order using tail probabilities and distribution functions.
  • Prove that test-function inequalities imply stochastic order using indicator functions.
  • Prove the reverse implication by representing bounded increasing functions through their level sets.
  • Handle both open and closed upper rays when comparing level-set probabilities.
  • Extend the result to unbounded increasing functions under explicit integrability conditions.
  • Recognize why comparing means alone does not establish stochastic order.

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.

Definition: For real-valued random variables \(X\) and \(Y\), \(X\le_{\mathrm{st}}Y\) (usual stochastic order) means $$ P(X>t)\le P(Y>t)\qquad\text{for every }t\in\mathbb{R}. $$ Equivalently, their distribution functions satisfy \(F_X(t)\ge F_Y(t)\) for every \(t\), since \(P(X>t)=1-F_X(t)\).

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.

Theorem: For real-valued random variables \(X\) and \(Y\), $$ X\le_{\mathrm{st}}Y \quad\Longleftrightarrow\quad E[g(X)]\le E[g(Y)] $$ for every bounded, measurable, increasing function \(g:\mathbb{R}\to\mathbb{R}\).

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

$$ P(X>t)=E[g_t(X)]\le E[g_t(Y)]=P(Y>t). $$

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

$$ A_u=\{x\in\mathbb{R}:g(x)>u\} $$

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:

$$ P(X\ge a) =\lim_{n\to\infty}P(X>a-1/n) \le \lim_{n\to\infty}P(Y>a-1/n) =P(Y\ge a). $$

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}\),

$$ g(z)=m+\int_m^M\mathbf{1}\{g(z)>u\}\,du. $$

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

$$ E[g(X)] =m+\int_m^M P(X\in A_u)\,du \le m+\int_m^M P(Y\in A_u)\,du =E[g(Y)]. $$

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

$$ E[g(X)]=0.7g(0)+0.3g(1),\qquad E[g(Y)]=0.4g(0)+0.6g(1), $$

so

$$ E[g(Y)]-E[g(X)] =0.3\bigl(g(1)-g(0)\bigr)\ge0. $$

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]\),

$$ E[g(Y)] =\frac12\int_0^1 y\,dy+\frac12\int_1^2 1\,dy =\frac12\left(\frac12+1\right) =\frac34. $$

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.

Extension: If \(X\le_{\mathrm{st}}Y\), \(g:\mathbb{R}\to\mathbb{R}\) is measurable and increasing, and $$ E[|g(X)|]<\infty,\qquad E[|g(Y)|]<\infty, $$ then \(E[g(X)]\le E[g(Y)]\).

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.
Key takeaway: Usual stochastic order is exactly the ordering detected by every bounded measurable increasing test function. Indicator tests recover the tail inequalities, and level-set integration proves the reverse implication.

Check Your Understanding

Try these questions using the definition and proof above.

  1. Which bounded increasing function recovers \(P(X>t)\) from an expectation?
  2. Why must a proof using upper level sets account for both \((a,\infty)\) and \([a,\infty)\)?
  3. If \(X\le_{\mathrm{st}}Y\) and both variables are integrable, what inequality follows by choosing \(g(x)=x\)?
  4. For the two-point \(X\) and constant \(Y\) in the third example, which threshold shows that \(X\not\le_{\mathrm{st}}Y\)?
  5. State the integrability conditions used to extend the result to an unbounded increasing function \(g\).