Tutorials › Statistical Learning (Graduate) › Conditional CDFs and Quantile Functions as Estimands

Conditional Distribution Learning · Tutorial 620 of 989

Conditional CDFs and Quantile Functions as Estimands

Learn to move rigorously between a conditional law, its CDF, and its quantile function, including when the conditional distribution has atoms.

Advanced 10 min read

What You'll Learn

  • Define a conditional CDF from a regular conditional distribution and identify its version dependence.
  • Define conditional quantiles using the generalized inverse of the CDF.
  • Derive the quantile inequalities that remain valid when the conditional law has atoms.
  • Show how a conditional quantile function determines the full conditional distribution.
  • Interpret conditional medians, interquantile ranges, and upper-tail quantiles.

Three Representations of a Conditional Distribution

A conditional distribution can be described by its probabilities, its cumulative probabilities, or its quantiles. These representations answer related but different questions: the conditional law specifies probabilities for sets, the conditional CDF summarizes probabilities below thresholds, and the conditional quantile gives thresholds associated with specified probability levels. Treating these objects as estimands makes clear both what a distributional model is trying to recover and what can be learned from its different summaries.

Let \(X\) be a predictor and \(Y\) a real-valued response. In general, a conditional distribution at a predictor value \(x\) is not described by a density: it may have discrete masses, a continuous component, or both. Conditional CDFs and quantiles remain well-defined in all these cases.

Definition: A regular conditional distribution of \(Y\) given \(X\) is a probability kernel \(K\) such that \(K(x,\cdot)\) is a probability distribution on the real line for each \(x\), \(x\mapsto K(x,A)\) is measurable for each Borel set \(A\), and \(K(X,A)\) is a version of \(P(Y\in A\mid \sigma(X))\). For a chosen version of this kernel, the conditional CDF and the conditional quantile function are
$$ F_x(y)=K(x,(-\infty,y]), \qquad Q_x(\tau)=\inf\{y\in\mathbb{R}:F_x(y)\geq \tau\}, \quad 0<\tau<1. $$

Because \(X\) and \(Y\) are real-valued, such a regular conditional distribution exists. Its values are determined only up to sets of predictor values having \(P_X\)-probability zero. Thus, \(F_x\) and \(Q_x\) are generally identified as functions of \(x\) only \(P_X\)-almost surely. A pointwise interpretation at an individual \(x\) requires a specified version, and claims at predictor values outside the distribution of \(X\) may depend on modeling assumptions.

For each fixed \(x\), \(F_x\) is nondecreasing, right-continuous, and has limits 0 and 1 at negative and positive infinity. The definition of \(Q_x\) uses an infimum rather than an ordinary inverse so it applies when \(F_x\) has jumps or flat regions. In particular, no conditional density and no strict increase of the CDF are required.

Generalized Inversion, Including Atoms

For a real-valued distribution with CDF \(F\), define \(Q(\tau)=\inf\{y:F(y)\geq\tau\}\). The following properties explain exactly what this definition guarantees. They apply to \(F_x\) for each \(x\) at which a version of the conditional law is specified.

Theorem: For any CDF \(F\) on the real line and \(0<\tau<1\), the generalized inverse \(q=Q(\tau)\) is finite and satisfies
$$ F(q-)\leq \tau\leq F(q), \qquad Q(\tau)\leq y \ \Longleftrightarrow\ \tau\leq F(y), $$
where \(F(q-)=\lim_{z\uparrow q}F(z)\). The jump \(F(q)-F(q-)\) is the probability mass at \(q\). Consequently, if \(q\) is an atom, the quantile inequality generally cannot be replaced by \(F(q)=\tau\).

Proof. Since \(F(y)\) tends to 1 as \(y\) tends to positive infinity, the set \(S=\{y:F(y)\geq\tau\}\) is nonempty. Since \(F(y)\) tends to 0 as \(y\) tends to negative infinity, \(S\) is bounded below. Therefore its infimum \(q\) is finite. Choose \(z_n\in S\) with \(q\leq z_n<q+1/n\). Right-continuity and monotonicity give \(F(q)\geq\lim_{n\to\infty}F(z_n)\geq\tau\). For every \(z<q\), \(F(z)<\tau\), so taking the limit as \(z\) increases to \(q\) gives \(F(q-)\leq\tau\). If \(q\leq y\), monotonicity gives \(F(y)\geq F(q)\geq\tau\). Conversely, if \(F(y)\geq\tau\), then \(y\in S\), so \(q=\inf S\leq y\). Finally, \(F(q)-F(q-)=P(Y=q)\) under the distribution with CDF \(F\), by continuity of probability for increasing sets. This proves the claims. \(\square\)

In conditional form, the theorem gives \(F_x(Q_x(\tau)-)\leq\tau\leq F_x(Q_x(\tau))\). If there is an atom at the quantile, probability levels throughout the jump correspond to the same threshold. By contrast, if \(F_x\) is continuous and strictly increasing at the relevant range, the quantile is the ordinary inverse there and \(F_x(Q_x(\tau))=\tau\). That equality is a special case, not the general definition.

Worked Example: A Conditional Distribution With Three Atoms

Suppose that at a predictor value \(x\), the conditional response has probabilities \(0.2\), \(0.5\), and \(0.3\) at \(-1\), \(0\), and \(4\), respectively. The conditional CDF is

$$ F_x(y)= \begin{cases} 0, & y<-1,\\ 0.2, & -1\leq y<0,\\ 0.7, & 0\leq y<4,\\ 1, & y\geq 4. \end{cases} $$

For \(0<\tau\leq0.2\), the first point where the CDF reaches \(\tau\) is \(-1\), so \(Q_x(\tau)=-1\). For \(0.2<\tau\leq0.7\), it is \(0\), and for \(0.7<\tau<1\), it is \(4\). In particular, \(Q_x(0.7)=0\), although \(F_x(0)=0.7\); \(Q_x(0.8)=4\), and \(F_x(4)=1\), not \(0.8\). The jump at \(4\) covers every probability level above \(0.7\). Asking for an exact equality between the CDF at the quantile and the requested level would therefore give the wrong general rule.

The Quantile Function Determines the Law

A conditional CDF and its quantile function are not competing targets that retain unrelated information. The generalized inverse preserves the whole distribution, including its jumps. The next identity makes that precise.

Theorem: Let \(F\) be any CDF on the real line, and let \(Q(\tau)=\inf\{z:F(z)\geq\tau\}\) for \(0<\tau<1\). For every real \(y\),
$$ F(y)=\lambda\bigl(\{\tau\in(0,1):Q(\tau)\leq y\}\bigr), $$
where \(\lambda\) denotes length (Lebesgue measure) on \((0,1)\). Thus the quantile function, up to changes on a set of probability levels of length zero, determines the CDF and hence the law.

Proof. By the generalized-inverse equivalence, \(Q(\tau)\leq y\) holds exactly when \(\tau\leq F(y)\). The set of levels \(\tau\in(0,1)\) satisfying this condition is \((0,F(y)]\cap(0,1)\), whose length is \(F(y)\). This holds for every real \(y\), so the quantile function recovers the CDF everywhere. \(\square\)

Applying the identity to a conditional CDF shows that \(Q_x\) determines \(F_x\) for each specified \(x\). Equivalently, if \(U\) is uniform on \((0,1)\), then \(Q_x(U)\) has CDF \(F_x\): for any real \(y\),

$$ P(Q_x(U)\leq y)=P(U\leq F_x(y))=F_x(y). $$

This is a distributional representation, not a claim that a model must generate outcomes by first drawing an observed uniform variable. It shows why quantiles at all levels together encode the complete conditional law, while a small selection of quantiles provides only selected features of it.

Worked Example: A Continuous Component and an Atom

Suppose \(Y\mid X=x\) has probability \(0.8\) distributed uniformly on \([0,10]\) and probability \(0.2\) at \(12\). For \(0\leq y<10\), the CDF is \(0.8(y/10)=0.08y\). It equals \(0.8\) from \(y=10\) up to but not including 12, and jumps to 1 at 12. Therefore,

$$ F_x(y)= \begin{cases} 0, & y<0,\\ 0.08y, & 0\leq y<10,\\ 0.8, & 10\leq y<12,\\ 1, & y\geq12. \end{cases} \qquad Q_x(\tau)= \begin{cases} 12.5\tau, & 0<\tau\leq0.8,\\ 12, & 0.8<\tau<1. \end{cases} $$

For \(0<\tau\leq0.8\), solving \(0.08y=\tau\) gives \(y=12.5\tau\); at \(\tau=0.8\), this gives 10. For \(\tau>0.8\), the CDF remains below \(\tau\) until it reaches 1 at 12, so the quantile is 12. For example, the conditional median is \(Q_x(0.5)=6.25\), and the interquartile range is

$$ Q_x(0.75)-Q_x(0.25)=9.375-3.125=6.25. $$

The 90th percentile is \(Q_x(0.9)=12\), reflecting the atom in the upper tail. The jump in the quantile function above level \(0.8\) records the mass at 12; it is not evidence that the conditional law is missing information.

Location, Spread, and Tail Behavior

A conditional quantile at level \(\tau\) is a threshold on the response scale. For example, \(Q_x(0.5)\) is a conditional median under the stated generalized-inverse convention, and the conditional interquartile range \(Q_x(0.75)-Q_x(0.25)\) summarizes the spread of the central half of the distribution. These summaries describe different aspects of the law: a median is a location measure, while a difference between quantiles is a scale measure. Neither requires a conditional mean or variance to exist.

Upper-tail quantiles also have a direct probability interpretation. If \(q=Q_x(\tau)\), the theorem gives \(P(Y<q\mid X=x)\leq\tau\leq P(Y\leq q\mid X=x)\), for the chosen conditional law. When there is no atom at \(q\), these probabilities coincide at \(\tau\). When there is an atom, a threshold can include more than the requested probability level because the response cannot be divided at that point. The 90th percentile, for instance, is an upper-tail threshold associated with a nominal 10% exceedance level, but with an atom at the threshold the actual exceedance probability may be smaller than 10%.

The full curve \(\tau\mapsto Q_x(\tau)\) adds information beyond a location and a spread summary. Its lower levels describe the lower tail, its upper levels describe the upper tail, and changes in its slope across levels reflect how rapidly response values expand across probability ranges. A conditional CDF gives the corresponding threshold probabilities on the response scale. Since either complete function determines the conditional law, the choice between them is often guided by the scientific question and the form in which an answer will be used.

Worked Example: Conditional Quantiles Under a Normal Model

Suppose \(Y\mid X=x\sim N(2x,9)\), using the convention that the second argument is the variance. The conditional standard deviation is therefore \(3\). If \(\Phi\) is the standard normal CDF, then

$$ F_x(y)=\Phi\left(\frac{y-2x}{3}\right), \qquad Q_x(\tau)=2x+3\Phi^{-1}(\tau). $$

At \(x=1\), the conditional median is \(Q_1(0.5)=2+3(0)=2\). The central 90% quantile interval runs from \(Q_1(0.05)\) to \(Q_1(0.95)\). Using \(\Phi^{-1}(0.95)\approx1.6449\) and \(\Phi^{-1}(0.05)\approx-1.6449\), its endpoints are

$$ Q_1(0.05)=2-3(1.6449)\approx-2.9347, \qquad Q_1(0.95)=2+3(1.6449)\approx6.9347. $$

The interval is centered at the conditional median and has width about \(9.8694\). In this continuous model, the CDF at each quantile equals its probability level. That familiar inverse relationship holds here because the normal CDF is continuous and strictly increasing; it should not be carried over unmodified to conditional laws with atoms.

Why These Estimands Matter

A distributional analysis can target \(F_x\), \(Q_x\), or the conditional law \(K(x,\cdot)\), depending on the intended use. If a decision needs the probability that a response falls below a clinical threshold, \(F_x\) gives that quantity directly. If a decision needs a threshold associated with a specified risk level, \(Q_x\) is the natural summary. If many probability queries are needed, the whole conditional law provides the common object underlying both.

These are estimands: population-level quantities defined by the joint distribution of \((X,Y)\), rather than particular estimates produced by a fitted model. Their conditional nature matters. A marginal quantile of \(Y\) need not equal the conditional quantile at any particular \(x\), and averaging conditional quantiles across predictor values generally does not produce a marginal quantile. Each \(x\) indexes its own conditional distribution.

Common pitfall: Treating \(Q_x(\tau)\) as an ordinary inverse and asserting \(F_x(Q_x(\tau))=\tau\) for every conditional law. This fails at jumps: the CDF can overshoot \(\tau\), and a range of probability levels can share one quantile. Use \(F_x(Q_x(\tau)-)\leq\tau\leq F_x(Q_x(\tau))\); equality follows only under additional conditions such as continuity at the quantile.

Check Your Understanding

Use the definitions and results above to answer the following questions.

  1. For a conditional CDF with a jump at \(q\), what does \(F_x(q)-F_x(q-)\) represent?
  2. If \(Q_x(0.9)=q\), state the two inequalities that hold for \(F_x(q-)\) and \(F_x(q)\). Why might neither equal 0.9?
  3. Explain why knowing \(Q_x(\tau)\) for all \(0<\tau<1\) determines the conditional CDF.
  4. For the mixture distribution in the worked example, why is every quantile level above 0.8 equal to 12?
  5. What qualification is needed when interpreting a conditional CDF at a particular predictor value \(x\)?
Clinical Biostats