Tutorials › Statistical Theory I - Probability and Distribution Theory › Generalized Inverses and Empirical Quantile Conventions

Ranks, Spacings, and Empirical Laws · Tutorial 489 of 994

Generalized Inverses and Empirical Quantile Conventions

Learn how generalized inverse definitions determine quantile values, and why empirical quantile conventions differ when the quantile level times the sample size is an integer.

Advanced 10 min read

What You'll Learn

  • Define lower and upper generalized inverses, including their endpoint behavior.
  • Distinguish an infimum from a point where a strict inequality is attained.
  • Derive empirical quantiles from ordered observations.
  • Resolve the index difference at integer multiples of the quantile level and sample size.
  • Recognize how ties affect values without changing the index formulas.
  • Separate inverse-CDF conventions from interpolation rules.

Why Quantile Conventions Need a Definition

A quantile is often described informally as a point at which a distribution reaches a specified probability level. That description can be ambiguous: a CDF may jump over the level, or it may remain constant across an interval. For empirical distributions, a further ambiguity appears when the probability level multiplied by the sample size is an integer. In that case, two natural inverse conventions can select adjacent order statistics.

The distinction is not merely notation. A quantile convention determines which sample value is reported, especially in small samples and at exact probability levels such as one-half. We begin with definitions that apply to any CDF, then derive their empirical forms.

Definition: Let \(F\) be a CDF on the real line. For \(0<u<1\), its lower generalized inverse is $$ F^{-1}_{\mathrm{L}}(u)=\inf\{x\in\mathbb{R}:F(x)\geq u\}, $$ and its upper generalized inverse is $$ F^{-1}_{\mathrm{U}}(u)=\inf\{x\in\mathbb{R}:F(x)>u\}. $$ The infimum is taken in the extended real line. For endpoint conventions, set \(F^{-1}_{\mathrm{L}}(0)=-\infty\), \(F^{-1}_{\mathrm{U}}(0)=\inf\{x:F(x)>0\}\), \(F^{-1}_{\mathrm{L}}(1)=\inf\{x:F(x)\geq1\}\), and \(F^{-1}_{\mathrm{U}}(1)=+\infty\). The endpoint values may be infinite.

The weak inequality in the lower inverse and the strict inequality in the upper inverse are both essential. An infimum is a greatest lower bound; it need not belong to the set whose infimum is being taken. In particular, the upper inverse is not necessarily a point where \(F(x)>u\).

Basic Properties of the Two Inverses

For \(0<u<1\), both inverse values are finite. The CDF tends to zero as \(x\) tends to \(-\infty\), and tends to one as \(x\) tends to \(+\infty\). Consequently, the sets in both definitions are nonempty and bounded below. The lower inverse is attained: \(F(F^{-1}_{\mathrm{L}}(u))\geq u\). The upper inverse need not be attained, although its value satisfies \(F(F^{-1}_{\mathrm{U}}(u))\geq u\).

Here are the attainment details. Write \(a=F^{-1}_{\mathrm{L}}(u)\). By the definition of infimum, for every positive integer \(m\), there is a point \(y_m\) with \(F(y_m)\geq u\) and \(a\leq y_m<a+1/m\). Monotonicity gives \(F(a+1/m)\geq u\); right-continuity then gives \(F(a)\geq u\). For \(b=F^{-1}_{\mathrm{U}}(u)\), choose \(z_m\) with \(F(z_m)>u\) and \(b\leq z_m<b+1/m\). Right-continuity and monotonicity imply \(F(b+1/m)\geq F(z_m)>u\), hence \(F(b)\geq u\). This last conclusion does not imply \(F(b)>u\).

Theorem: For every \(0<u<1\), \(F^{-1}_{\mathrm{L}}(u)\leq F^{-1}_{\mathrm{U}}(u)\). The inequality can be strict. At a point \(x\), the lower inverse is characterized by $$ F^{-1}_{\mathrm{L}}(u)\leq x \quad\Longleftrightarrow\quad F(x)\geq u. $$

To prove the inequality, note that \(\{x:F(x)>u\}\subseteq\{x:F(x)\geq u\}\). The infimum of the larger set cannot exceed the infimum of the smaller set. For the characterization, if \(F(x)\geq u\), then \(x\) belongs to the set defining the lower inverse, so its infimum is at most \(x\). Conversely, if the lower inverse is at most \(x\), its attainment and monotonicity give \(F(x)\geq u\). This proves the theorem. \(\square\)

The two inverses agree at many levels, but not all. A jump can make them differ at precisely the probability level reached by the jump: the lower inverse includes the point where the CDF first reaches that level, while the upper inverse seeks a location where the CDF exceeds it.

Worked Example: A Strict Inequality May Not Hold at the Infimum

Let \(X\) have the uniform distribution on \([0,1]\), whose CDF is \(F(x)=0\) for \(x<0\), \(F(x)=x\) for \(0\leq x\leq1\), and \(F(x)=1\) for \(x>1\). Find both inverses at \(u=0.5\).

For the lower inverse, \(F(x)\geq0.5\) exactly when \(x\geq0.5\). Thus \(F^{-1}_{\mathrm{L}}(0.5)=0.5\), and \(F(0.5)=0.5\).

For the upper inverse, \(F(x)>0.5\) exactly when \(x>0.5\). This set has no smallest point: if \(x>0.5\), then \((x+0.5)/2\) is still greater than \(0.5\) and is smaller than \(x\). Its infimum is nevertheless \(0.5\), so \(F^{-1}_{\mathrm{U}}(0.5)=0.5\). At that infimum, \(F(0.5)=0.5\), not a value strictly greater than \(0.5\).

Thus both inverse values are \(0.5\), even though the upper inverse is the infimum of a set that does not contain \(0.5\). The upper inverse is not “the first location where the CDF strictly exceeds \(u\).”

Worked Example: A Jump Separates the Inverses

Suppose \(P(X=0)=0.3\) and \(P(X=2)=0.7\). The CDF is zero for \(x<0\), equals \(0.3\) for \(0\leq x<2\), and equals one for \(x\geq2\). Find the inverses at \(u=0.3\).

The set \(\{x:F(x)\geq0.3\}\) is \([0,\infty)\), so \(F^{-1}_{\mathrm{L}}(0.3)=0\). The set \(\{x:F(x)>0.3\}\) is \([2,\infty)\), so \(F^{-1}_{\mathrm{U}}(0.3)=2\). Here the difference is genuine: the CDF reaches \(0.3\) at zero but does not exceed it until two.

Empirical Inverses and Order Statistics

Let \(X_1,\ldots,X_n\) be a sample, and write \(X_{(1)}\leq\cdots\leq X_{(n)}\) for the observations arranged in nondecreasing order. Repeated values are retained in this list. The empirical CDF is $$ F_n(x)=\frac{1}{n}\sum_{i=1}^{n}I(X_i\leq x), $$ where \(I(A)\) is one if \(A\) holds and zero otherwise. Its generalized inverses are defined by the same infimum rules as for a population CDF.

Theorem: For \(0<u\leq1\), the lower empirical inverse is \(F^{-1}_{n,\mathrm{L}}(u)=X_{(\lceil nu\rceil)}\). For \(0\leq u<1\), the upper empirical inverse is \(F^{-1}_{n,\mathrm{U}}(u)=X_{(\lfloor nu\rfloor+1)}\). At \(u=0\), the lower empirical inverse is \(-\infty\); at \(u=1\), the upper empirical inverse is \(+\infty\).

To prove the lower formula, let \(j=\lceil nu\rceil\). At \(X_{(j)}\), at least \(j\) observations are no larger than \(X_{(j)}\), so \(F_n(X_{(j)})\geq j/n\geq u\). For every \(x<X_{(j)}\), at most \(j-1\) observations are no larger than \(x\), so \(F_n(x)\leq(j-1)/n<u\). Therefore the infimum where \(F_n\geq u\) is \(X_{(j)}\).

For the upper formula, let \(r=\lfloor nu\rfloor+1\). At \(X_{(r)}\), at least \(r\) observations are no larger, and \(r>nu\), so \(F_n(X_{(r)})\geq r/n>u\). For every \(x<X_{(r)}\), at most \(r-1=\lfloor nu\rfloor\) observations are no larger, giving \(F_n(x)\leq\lfloor nu\rfloor/n\leq u\). Hence the first location in the sense of an infimum where \(F_n\) exceeds \(u\) is \(X_{(r)}\). The proof also covers ties: the count bounds remain valid for repeated order-statistic values. \(\square\)

When the Probability Level Times the Sample Size Is an Integer

If \(nu\) is not an integer, then \(\lceil nu\rceil=\lfloor nu\rfloor+1\), so the two empirical inverses select the same indexed order statistic. If \(nu=k\) is an integer with \(1\leq k<n\), the indices differ: $$ F^{-1}_{n,\mathrm{L}}(u)=X_{(k)} \qquad\text{and}\qquad F^{-1}_{n,\mathrm{U}}(u)=X_{(k+1)}. $$ This is the precise source of a common index ambiguity.

Worked Example: An Integer Index at the Median Level

Take the ordered sample \(2,4,7,10,13,18\), with \(n=6\), and set \(u=0.5\). Then \(nu=3\), an integer. At \(x=7=X_{(3)}\), \(F_n(x)=3/6=0.5\). At \(x=10=X_{(4)}\), \(F_n(x)=4/6=2/3\).

The lower inverse asks for the first location where \(F_n(x)\geq0.5\), giving \(F^{-1}_{n,\mathrm{L}}(0.5)=X_{(3)}=7\). The upper inverse asks for the infimum of locations where \(F_n(x)>0.5\), giving \(F^{-1}_{n,\mathrm{U}}(0.5)=X_{(4)}=10\). The strict inequality excludes the plateau value \(F_n(x)=0.5\) at \(x=7\).

A convention that reports the midpoint of these adjacent values would give \((7+10)/2=8.5\). That midpoint is a possible sample-quantile convention, but it is neither generalized inverse calculated above.

When \(nu\) is not an integer, the two inverse rules agree. For example, in the same sample, at \(u=0.4\), \(nu=2.4\), so both indices are three and both inverses equal \(X_{(3)}=7\). This comparison shows why it is useful to check \(nu\) before translating a probability level into an index.

Ties do not change the formulas, but they can make two different indices yield the same numerical value. For instance, if \(X_{(k)}=X_{(k+1)}\), the lower and upper inverse values at \(u=k/n\) are equal despite the difference in indices. The formulas describe positions in the ordered list; they do not guarantee distinct observed values.

Common Mistakes and Why the Convention Matters

  • Calling the upper inverse the first point where \(F(x)>u\). A strict-exceedance set need not have a smallest element. Define the upper inverse using an infimum, which may not be attained.
  • Using the same empirical index at an integer level. If \(nu=k\), the lower inverse uses \(X_{(k)}\) and the upper inverse uses \(X_{(k+1)}\), for \(1\leq k<n\).
  • Assuming distinct observations. The order-statistic formulas remain valid with ties; adjacent indexed order statistics may simply have the same value.
  • Treating interpolation as a generalized inverse. A midpoint or another interpolated value requires an additional convention. It does not follow from either infimum definition.

These distinctions matter whenever a quantile is reported from a finite sample, compared across software or studies, or used to describe a threshold. A report should state the convention when the exact choice can affect the result. The definition gives the rule; the integer case reveals where alternative rules can diverge.

Check Your Understanding

Use the definitions and index formulas to answer the following.

  1. For the uniform distribution on \([0,1]\), what are the lower and upper generalized inverses at \(u=0.7\)? Is the upper infimum attained by a point where \(F(x)>0.7\)?
  2. In a sample of size \(n=8\), which order-statistic indices do the lower and upper empirical inverses use at \(u=0.375\)?
  3. For \(n=10\) and \(u=0.4\), state both empirical inverse values in order-statistic notation and explain why their indices differ.
  4. Can ties make the lower and upper empirical inverse values equal when their indices differ? Explain.
  5. Why is the midpoint of two adjacent order statistics not automatically either generalized inverse?