Conditional Stochastic Dominance with Nearest Observations

statisticsrandomization inference

Suppose we want to compare two outcome distributions at one covariate value. A growing sample supplies observations ever closer to that value, even if we retain only a fixed number of them. (Bugni, Canay, and Kim 2025) uses this observation to reduce conditional stochastic dominance to a finite-sample limit experiment.

1. The result

Observe independent i.i.d. samples from \((Y,Z)\) and \((X,Z)\). At distinct, fixed points \(z_1,\ldots,z_L\), the null is

\[ F_Y(t\mid z_\ell)\leq F_X(t\mid z_\ell) \quad\text{for every }t\in\mathbb R,\ \ell=1,\ldots,L. \]

Thus larger outcomes are preferred, and the null says that \(Y\) dominates \(X\). Keep fixed positive numbers \(q_y^\ell,q_x^\ell\) of outcomes whose covariates are nearest \(z_\ell\), breaking covariate ties by an outcome-independent rule. Write \(S_n^\ell\) for the resulting vector, with the \(Y\) observations first.

Theorem 1. Suppose every neighborhood of each target has positive probability in each sample, and the conditional cdfs are continuous at the target in the uniform norm:

\[ \sup_t|F_a(t\mid z)-F_a(t\mid z_\ell)|\longrightarrow0, \qquad z\to z_\ell,\quad a\in\{X,Y\}. \]

As both original sample sizes diverge, \((S_n^1,\ldots,S_n^L)\) converges jointly to independent vectors \((S^1,\ldots,S^L)\). The coordinates of \(S^\ell\) are independent, with the first \(q_y^\ell\) distributed as \(Y\mid Z=z_\ell\) and the remaining \(q_x^\ell\) as \(X\mid Z=z_\ell\).

The target may be an atom of the covariate distribution. What stays fixed is the number of retained outcomes; a growing retained sample would require additional control of the approximation.

2. Why the selected outcomes have this limit

First, the covariates get close. For a radius \(\varepsilon>0\), let \(B_n\) count observations within that radius of a target. If the neighborhood probability is \(p_\varepsilon>0\), then

\[ \mathbb P\{|Z_{[q]}-z_\ell|>\varepsilon\} \leq\mathbb P\{B_n<q\}\longrightarrow0, \qquad B_n\sim\operatorname{Binomial}(n,p_\varepsilon). \]

Once the ball contains enough observations, all retained neighbors lie inside it. The law of large numbers gives \(B_n/n\to p_\varepsilon\), whereas \(q/n\to0\), proving this for all retained positions at once.

Second, condition on the covariates. Selection now amounts to choosing fixed observation indices. Their outcomes are conditionally independent. For one target, the joint conditional cdf is therefore a product of terms such as \(F_Y(s_j\mid Z_{[j]})\). Uniform continuity replaces each term by \(F_Y(s_j\mid z_\ell)\). With finitely many factors, the total error is bounded by the sum of the factor errors.

Third, separate the targets. Finitely many distinct targets have pairwise disjoint neighborhoods. With probability tending to one, each neighborhood contains its target’s retained observations. Their index sets are then pairwise disjoint, so conditioning on the covariates gives the required product across targets.

3. Constructing the test

At one target, form the empirical cdfs from the retained observations and use

\[ T(S_n)\triangleq\sup_t(\widehat F_{n,Y}(t)-\widehat F_{n,X}(t)). \]

Large positive values contradict the null. Let \(U_1,\ldots,U_q\) be independent uniforms, where \(q=q_y+q_x\), and let \(c_\alpha(q_y,q)\) be the \((1-\alpha)\) quantile of the same statistic computed from these uniforms. Reject when \(T(S_n)>c_\alpha(q_y,q)\).

We still need to justify the uniform critical value for the composite dominance null. The least-favorable-distribution argument supplies that step, including the treatment of tied outcomes. Convergence of the selected vector by itself is insufficient.

For \(L\) targets, the joint limit permits the per-target level

\[ \alpha_L\triangleq1-(1-\alpha)^{1/L}. \]

Reject if any target rejects at level \(\alpha_L\). Independence in the limit gives an overall rejection probability at most \(1-(1-\alpha_L)^L=\alpha\). This correction uses the disjoint-neighborhood argument above, not an assumption that finite-sample tests are independent.

4. A quantitative look at the nearest-neighbor step

The binomial argument also shows what determines localization. For one sample let \(p(r)=\mathbb P(\|Z-z_0\|\leq r)\) and let \(R_{n,q}\) be the distance of the \(q\)th retained covariate. Whenever \(q\leq np(r)/2\), a binomial lower-tail bound gives

\[ \mathbb P(R_{n,q}>r) \leq\mathbb P\{B_n\leq np(r)/2\} \leq e^{-np(r)/8}. \]

For completeness, apply Markov’s inequality to \(e^{-tB_n}\):

\[ \mathbb P(B_n\leq np/2) \leq e^{tnp/2}(1-p+pe^{-t})^n \leq\exp(np(t/2+e^{-t}-1)). \]

Taking \(t=\log2\) makes the exponent at most \(-np/8\). This avoids any requirement that a covariate density exist.

If the stronger local-mass condition \(p(r)\geq cr^d\) holds for small \(r\), take \(r=M n^{-1/d}\). For sufficiently large \(M\), the displayed bound is at most \(\exp(-cM^d/8)\). Thus \(R_{n,q}=O_p(n^{-1/d})\) for fixed \(q\). This is a tightness statement: the bound becomes small as \(M\) increases, not necessarily as \(n\) increases with \(M\) fixed. It also shows the cost of conditioning on many continuously distributed covariates. The original theorem needs only convergence to the target, not this rate.

At a covariate atom the picture is simpler. If \(p_0=\mathbb P(Z=z_0)>0\), the number of exact matches is binomial with mean \(np_0\). With probability tending to one there are at least \(q\) exact matches, and all selected covariates equal \(z_0\). Conditional on their indices, their outcomes already have the desired product distribution. Outcome-independent tie breaking is essential: choosing the largest outcomes among the exact matches would change that distribution.

5. The product calculation behind asymptotic independence

To quantify the conditional product approximation, telescope the difference. For \(a_j,b_j\in[0,1]\),

\[ \prod_{j=1}^qa_j-\prod_{j=1}^qb_j =\sum_{j=1}^q(a_j-b_j) \left(\prod_{k<j}a_k\right) \left(\prod_{k>j}b_k\right). \]

Hence the absolute difference is no larger than \(\sum_j|a_j-b_j|\). Given all covariates, set \(a_j=F_Y(s_j\mid Z_{[j]})\) and \(b_j=F_Y(s_j\mid z_0)\), with the corresponding \(X\) factors appended. The conditional joint-cdf error is bounded by

\[ \sum_{j=1}^{q_y}\sup_t|F_Y(t\mid Z_{[j]})-F_Y(t\mid z_0)| +\sum_{j=1}^{q_x}\sup_t|F_X(t\mid Z_{[j]})-F_X(t\mid z_0)|. \]

Localization and continuity make each summand converge to zero in probability. Since the errors are bounded, their expectations also tend to zero. Taking expectations of the conditional product gives the limiting unconditional joint cdf at continuity points.

Conditional independence alone would not give unconditional independence. Here each conditional cdf approaches a fixed, nonrandom cdf, so the limiting product contains no shared mixing variable. Across targets, the event of overlapping selected index sets contributes at most its vanishing probability.

Suppose more quantitatively that each conditional cdf satisfies a local Hölder bound

\[ \sup_t|F_a(t\mid z)-F_a(t\mid z_0)|\leq L\|z-z_0\|^\beta \]

and the covariate small-ball probability is at least \(cr^d\). For a fixed total of \(q\) retained observations at this target, let \(R_n\) be their largest covariate distance. On \(R_n\leq r\), the product-cdf calculation bounds the conditional joint-cdf error by \(qLr^\beta\). On its complement the error is at most one. With two samples of size at least \(n\) and enough expected observations in each ball,

\[ \sup_{s\in\mathbb{R}^q}|F_{S_n}(s)-F_S(s)| \leq qLr^\beta+2e^{-cnr^d/8}. \]

Choosing \(r=(A\log n/n)^{1/d}\) makes the second term at most \(2n^{-cA/8}\) and the first of order \((\log n/n)^{\beta/d}\). This is an illustrative bound under stronger smoothness and local-mass conditions, not the rate asserted by the original fixed-\(q\) theorem.

A larger source sample improves the approximation to the target conditional laws. The limiting comparison still uses only \(q\) outcomes, so its sampling variability remains. Covariate dimension affects the localization rate even when the outcomes are scalar.

The joint-cdf bound controls lower rectangles. It does not directly control every rank event, particularly one sensitive to ties. The atom-preservation calculation completes that part of the validity proof.

6. What is actually computed, and what more data buy

To compute \(T\), sort the distinct retained outcomes \(v_1<\cdots<v_K\). Both empirical cdfs are constant between these values, so

\[ T=\max\left(0,\max_{1\leq k\leq K} \left[\frac{\#\{Y_j\leq v_k\}}{q_y} -\frac{\#\{X_j\leq v_k\}}{q_x}\right]\right). \]

All observations tied at \(v_k\) enter together. Breaking outcome ties by arbitrarily ordering labels computes a different statistic. The zero in the maximum accounts for thresholds below all observations and also makes the direction of the test clear.

The original sample size and the retained sample size play different roles. Increasing the former makes the selected conditional distributions closer to those at \(z_0\). It does not increase the number of outcomes used in the limiting comparison. Thus the limiting power at an alternative is the power of the fixed-\(q\) experiment, not automatically one. Increasing \(q\) might improve that experiment, but a theorem allowing \(q\) to increase must also control how far the additional observations lie from the target.

For multiple targets, let \(p_\ell\) be each limiting rejection probability after the tie argument in the companion note. Joint convergence to independent limit experiments gives

\[ \mathbb P(\text{at least one rejection})\longrightarrow 1-\prod_{\ell=1}^L(1-p_\ell) \leq1-(1-\alpha_L)^L. \]

Thus the level correction depends on fixed, prespecified targets and their independent limit experiments. Choosing targets from the observed outcomes would add a selection problem.

Bugni, Federico A., Ivan A. Canay, and Deborah Kim. 2025. “Testing Conditional Stochastic Dominance at Target Points.” arXiv. https://doi.org/10.48550/arXiv.2503.14747.

← All posts