Suppose a distribution places equal mass at two points:
\begin{align*}
\mathbb P(X=0)=\frac{1}{2}, \qquad \mathbb P(X=1)=\frac{1}{2}.
\end{align*}
Its distribution function jumps from $0$ to $1/2$ at $0$, then from $1/2$ to $1$ at $1$; if we try to define the inverse distribution function by solving $F(x)=p$, the equation has no solution for most $p \in (0,1)$ and has competing interpretations at a jump.
Yet percentiles are meant to exist for this distribution. A random sample should be obtainable by feeding a uniform random number into an inverse CDF, and the median should be meaningful even though the graph of $F$ has a jump. The quantile function fixes the problem by asking when the distribution has accumulated enough mass, not when it has taken an exact value.
[example: A Jump Where Ordinary Inversion Fails]
Let $X\sim\operatorname{Ber}(1/2)$, so $\mathbb P(X=0)=1/2$ and $\mathbb P(X=1)=1/2$. From $F(x)=\mathbb P(X\le x)$, the distribution function is
\begin{align*}
F(x)=0 \quad \text{for } x<0,
\end{align*}
because neither possible value of $X$ is at most $x$ when $x<0$. For $0\le x<1$, only the value $0$ is counted, so
\begin{align*}
F(x)=\mathbb P(X=0)=\frac12.
\end{align*}
For $x\ge1$, both possible values are counted, so
\begin{align*}
F(x)=\mathbb P(X=0)+\mathbb P(X=1)=\frac12+\frac12=1.
\end{align*}
For $p=1/4$, the equation $F(x)=p$ has no solution: the only values taken by $F$ are $0$, $1/2$, and $1$, and $1/4$ is not one of them. The quantile rule asks instead for the first $x$ with $F(x)\ge1/4$. Since $F(x)=0<1/4$ for $x<0$ and $F(0)=1/2\ge1/4$, we get
\begin{align*}
F^{-1}\left(\frac14\right)=0.
\end{align*}
For $p=3/4$, we have $F(x)\le1/2<3/4$ for every $x<1$, while $F(1)=1\ge3/4$, hence
\begin{align*}
F^{-1}\left(\frac34\right)=1.
\end{align*}
More generally, if $0<p\le1/2$, then $F(x)=0<p$ for $x<0$ and $F(0)=1/2\ge p$, so $F^{-1}(p)=0$. If $1/2<p<1$, then $F(x)\le1/2<p$ for $x<1$ and $F(1)=1\ge p$, so $F^{-1}(p)=1$. Thus the generalized inverse exists at probability levels where ordinary inversion fails, and it records the first point where enough mass has accumulated.
[/example]
The example explains why the notation $F^{-1}$ is useful but potentially misleading. The quantile function behaves like an inverse when $F$ is continuous and strictly increasing, while in general it is an infimum construction. This chapter treats that generalized inverse as a mathematical object in its own right.
## Definition
The distribution function gives the amount of mass to the left of each point, but a percentile asks the reverse question: for a requested mass level $p$, where is the first point by which that much mass has accumulated? Ordinary inversion asks for equality $F(x)=p$, which fails at jumps and plateaux. Quantile inversion instead asks for the first threshold at which the accumulated mass reaches or exceeds $p$.
[definition: Quantile Function]
Let $F:\mathbb R\to[0,1]$ be a distribution function. The quantile function associated with $F$ is the map $F^{-1}:(0,1)\to\mathbb R$ defined by
\begin{align*}
F^{-1}(p):=\inf\{x\in\mathbb R:F(x)\ge p\}.
\end{align*}
[/definition]
For a Borel probability measure $\mu$ with distribution function $F_\mu$, the quantile function of $\mu$ is $F_\mu^{-1}$. For a real-valued [random variable](/page/Random%20Variable) $X$, the quantile function of $X$ is $F_X^{-1}$. Many texts call this object the generalized inverse, the left-continuous inverse, or the inverse distribution function.
To use this quantile construction for measures or random variables, we still need the cumulative function that supplies the input $F$. The next definition fixes that source of $F$: it records how much mass has accumulated in each closed left ray $(-\infty,x]$, a convention whose right-continuity makes a jump at $a$ represent the atom $\mu(\{a\})$.
[definition: Distribution Function]
Let $\mu$ be a Borel probability measure on $\mathbb R$. The distribution function of $\mu$ is the map $F_\mu:\mathbb R\to[0,1]$ defined by
\begin{align*}
F_\mu:\mathbb R\to[0,1], \qquad x\mapsto \mu((-\infty,x]).
\end{align*}
If $X:(\Omega,\mathcal F,\mathbb P)\to\mathbb R$ is a real-valued random variable, its distribution function is the map $F_X:\mathbb R\to[0,1]$ defined by
\begin{align*}
F_X:\mathbb R\to[0,1], \qquad x\mapsto \mathbb P(X\le x).
\end{align*}
[/definition]
Once $F$ is known to come from a measure or a random variable, the quantile definition applies exactly as above. The distribution function is the cumulative record; the quantile function is the threshold table read in the opposite direction.
Some probability levels receive special names because they summarize a distribution in a stable way. The level $1/2$ is central: it asks for a point by which at least half the mass has appeared and before which no more than half the mass lies.
[definition: Median]
Let $F:\mathbb R\to[0,1]$ be a distribution function. A median of $F$ is a point $m\in\mathbb R$ such that $F(m)\ge1/2$ and $\lim_{x\uparrow m}F(x)\le1/2$.
[/definition]
The quantile value $F^{-1}(1/2)$ is the leftmost median. A distribution can have many medians; the quantile convention selects one of them without pretending uniqueness.
Continuous distributions show the friendly case first. When the distribution function has no jumps and no flat pieces on its effective support, threshold inversion agrees with the inverse familiar from calculus.
[example: Uniform and Exponential Quantiles]
Let $X\sim\operatorname{Unif}(a,b)$ with $a<b$. Its distribution function is
\begin{align*}
F_X(x)=0 \quad \text{for } x<a,
\end{align*}
\begin{align*}
F_X(x)=\frac{x-a}{b-a} \quad \text{for } a\le x\le b,
\end{align*}
and
\begin{align*}
F_X(x)=1 \quad \text{for } x\ge b.
\end{align*}
For $0<p<1$, the condition $F_X(x)\ge p$ cannot hold when $x<a$, because then $F_X(x)=0<p$. On $[a,b]$, it becomes
\begin{align*}
\frac{x-a}{b-a}\ge p.
\end{align*}
Since $b-a>0$, multiplying by $b-a$ preserves the inequality:
\begin{align*}
x-a\ge (b-a)p.
\end{align*}
Adding $a$ gives
\begin{align*}
x\ge a+(b-a)p.
\end{align*}
Thus the first point where $F_X(x)\ge p$ is
\begin{align*}
F_X^{-1}(p)=a+(b-a)p.
\end{align*}
Let $Y\sim\operatorname{Exp}(\lambda)$ with $\lambda>0$. Its distribution function is $F_Y(y)=0$ for $y<0$ and
\begin{align*}
F_Y(y)=1-e^{-\lambda y} \quad \text{for } y\ge0.
\end{align*}
For $0<p<1$, the inequality $F_Y(y)\ge p$ is impossible when $y<0$, because $F_Y(y)=0<p$. For $y\ge0$, it is
\begin{align*}
1-e^{-\lambda y}\ge p.
\end{align*}
Subtracting $1$ gives
\begin{align*}
-e^{-\lambda y}\ge p-1.
\end{align*}
Multiplying by $-1$ reverses the inequality:
\begin{align*}
e^{-\lambda y}\le 1-p.
\end{align*}
Since $0<1-p<1$ and the logarithm is increasing on $(0,\infty)$, this is equivalent to
\begin{align*}
-\lambda y\le \log(1-p).
\end{align*}
Dividing by $-\lambda<0$ reverses the inequality again:
\begin{align*}
y\ge -\frac{1}{\lambda}\log(1-p).
\end{align*}
Therefore
\begin{align*}
F_Y^{-1}(p)=-\frac{1}{\lambda}\log(1-p).
\end{align*}
As $p\uparrow1$, we have $1-p\downarrow0$, so $\log(1-p)\to-\infty$ and hence $F_Y^{-1}(p)\to\infty$; the exponential quantile records the unbounded upper tail.
[/example]
## Geometry of the Generalized Inverse
### Threshold Sets
The graph of a distribution function moves upward from $0$ to $1$, with possible horizontal plateaux and vertical jumps. The graph of the quantile function reads the same information in the perpendicular direction: at height $p$, it records the left edge of the region where the graph has reached that height.
This picture predicts an order property. A higher probability level cannot be reached earlier than a lower probability level, because the set of points where $F(x)\ge q$ is contained in the set of points where $F(x)\ge p$ when $p\le q$.
[quotetheorem:8345]
Monotonicity is the reason quantiles organize the distribution from left tail to right tail. It also gives the quantile function one-sided limits at every point, so discontinuities can be studied by intervals instead of arbitrary oscillation.
For estimates, it is rarely enough to know the definition alone. We need a dictionary translating statements about $F^{-1}$ into statements about $F$, because probability computations are usually phrased in terms of $F(x)$.
[quotetheorem:8346]
This theorem is often the most useful form of the definition. It says that sublevel sets of the quantile function are encoded exactly by values of the distribution function.
[example: Reading an Atom from a Quantile Plateau]
Let $\mu$ have mass $1/3$ at $-1$ and mass $2/3$ at $2$, so the distribution function is $F(x)=\mu((-\infty,x])$. If $x<-1$, then neither atom lies in $(-\infty,x]$, hence
\begin{align*}
F(x)=0.
\end{align*}
If $-1\le x<2$, then $-1\in(-\infty,x]$ but $2\notin(-\infty,x]$, so
\begin{align*}
F(x)=\mu(\{-1\})=\frac13.
\end{align*}
If $x\ge2$, then both atoms lie in $(-\infty,x]$, and therefore
\begin{align*}
F(x)=\mu(\{-1\})+\mu(\{2\})=\frac13+\frac23=1.
\end{align*}
We now compute $F^{-1}(p)=\inf\{x\in\mathbb R:F(x)\ge p\}$. For $0<p\le1/3$, every $x<-1$ satisfies $F(x)=0<p$, while
\begin{align*}
F(-1)=\frac13\ge p.
\end{align*}
Thus the first point where $F(x)\ge p$ is $-1$, so
\begin{align*}
F^{-1}(p)=-1.
\end{align*}
For $1/3<p<1$, every $x<2$ satisfies $F(x)\le1/3<p$, while
\begin{align*}
F(2)=1\ge p.
\end{align*}
Thus the first point where $F(x)\ge p$ is $2$, so
\begin{align*}
F^{-1}(p)=2.
\end{align*}
The plateau on which $F^{-1}(p)=-1$ is $(0,1/3]$, whose length is $1/3-0=1/3$, matching the mass at $-1$. The plateau on which $F^{-1}(p)=2$ is $(1/3,1)$, whose length is $1-1/3=2/3$, matching the mass at $2$.
[/example]
### Jumps and Gaps
The previous example reverses the usual picture: jumps in $F$ become flat intervals in $F^{-1}$. The converse phenomenon is just as important. If the measure gives no mass to a whole interval, the distribution function is flat there, and the quantile function jumps across the gap.
[example: A Gap in the Support]
Let $\mu$ be the probability measure that gives total mass $1/2$ uniformly to $[0,1]$ and total mass $1/2$ uniformly to $[3,4]$. Its distribution function $F(x)=\mu((-\infty,x])$ is
\begin{align*}
F(x)=0 \quad \text{for } x<0.
\end{align*}
For $0\le x\le1$, the interval $(-\infty,x]$ captures length $x$ inside $[0,1]$ and no mass from $[3,4]$, so
\begin{align*}
F(x)=\frac12\cdot x=\frac{x}{2}.
\end{align*}
For $1\le x<3$, all of $[0,1]$ has been counted and none of $[3,4]$ has been counted, hence
\begin{align*}
F(x)=\frac12.
\end{align*}
For $3\le x\le4$, all mass from $[0,1]$ is counted, and the portion of $[3,4]$ counted has length $x-3$, so
\begin{align*}
F(x)=\frac12+\frac12(x-3)=\frac{x-2}{2}.
\end{align*}
Finally,
\begin{align*}
F(x)=1 \quad \text{for } x\ge4.
\end{align*}
We compute $F^{-1}(p)=\inf\{x\in\mathbb R:F(x)\ge p\}$. If $0<p\le1/2$, then $F(x)=0<p$ for $x<0$. On $[0,1]$, the inequality $F(x)\ge p$ becomes
\begin{align*}
\frac{x}{2}\ge p.
\end{align*}
Multiplying by $2$ gives
\begin{align*}
x\ge2p.
\end{align*}
Because $0<p\le1/2$, we have $0<2p\le1$, so the first point where $F(x)\ge p$ is $2p$. Thus
\begin{align*}
F^{-1}(p)=2p \quad \text{for } 0<p\le\frac12.
\end{align*}
If $1/2<p<1$, then $F(x)\le1/2<p$ for every $x<3$. On $[3,4]$, the inequality $F(x)\ge p$ becomes
\begin{align*}
\frac{x-2}{2}\ge p.
\end{align*}
Multiplying by $2$ gives
\begin{align*}
x-2\ge2p.
\end{align*}
Adding $2$ gives
\begin{align*}
x\ge2p+2.
\end{align*}
Because $1/2<p<1$, we have $3<2p+2<4$, so the first point where $F(x)\ge p$ is $2p+2$. Therefore
\begin{align*}
F^{-1}(p)=2p+2 \quad \text{for } \frac12<p<1.
\end{align*}
As $p\uparrow1/2$ from below, $F^{-1}(p)=2p$ approaches $1$; as $p\downarrow1/2$ from above, $F^{-1}(p)=2p+2$ approaches $3$. The quantile function skips the interval $(1,3)$, recording the gap in the support of the distribution.
[/example]
A common pitfall is to expect $F(F^{-1}(p))=p$. That identity requires more regularity than a distribution function usually has. The correct replacement is a pair of threshold inequalities at the crossing point.
[quotetheorem:8347]
The two inequalities say that the level $p$ is crossed at $q$, possibly by a jump. If $p$ lies inside the jump interval $(F(q-),F(q)]$, then the left inequality is strict: the distribution has not yet reached level $p$ immediately before $q$, and the atom at $q$ carries it past the requested percentile. When the distribution has no atom at $q$, the two sides coincide at $p$ whenever $p$ belongs to the range of the continuous part.
## Distributional Reconstruction
### Inverse Transform Sampling
The deepest reason quantile functions matter in probability is that they turn uniform randomness into arbitrary one-dimensional randomness. A single source of randomness, uniformly distributed on $(0,1)$, can be reshaped into any prescribed real distribution by applying the quantile function.
This construction is useful enough to name. It is the formal version of [inverse transform sampling](/theorems/1139) used in simulation, and it also underlies coupling arguments where several distributions are built from the same probability level.
[definition: Quantile Transform]
Let $F:\mathbb R\to[0,1]$ be a distribution function. The quantile transform associated with $F$ is the map
\begin{align*}
Q_F:(0,1)\to\mathbb R
\end{align*}
defined by
\begin{align*}
Q_F(p):=F^{-1}(p).
\end{align*}
[/definition]
A transform deserves this name only if it transports the uniform distribution to the desired law. The inverse inequalities provide exactly the measurability and distribution calculation needed to make this precise.
[quotetheorem:8348]
The theorem explains why the quantile function is constructive, not merely descriptive. It gives a canonical representative of every real distribution on the probability space $((0,1),\mathcal B((0,1)),\mathcal L^1)$.
[example: Simulating a Discrete Law]
Suppose $\mathbb P(X=-2)=1/4$, $\mathbb P(X=0)=1/2$, and $\mathbb P(X=5)=1/4$. Its distribution function $F(x)=\mathbb P(X\le x)$ is determined by which atoms have been counted. If $x<-2$, then no atom is at most $x$, so $F(x)=0$. If $-2\le x<0$, then only the atom at $-2$ is counted, so
\begin{align*}
F(x)=\mathbb P(X=-2)=\frac14.
\end{align*}
If $0\le x<5$, then the atoms at $-2$ and $0$ are counted, so
\begin{align*}
F(x)=\mathbb P(X=-2)+\mathbb P(X=0)=\frac14+\frac12=\frac34.
\end{align*}
If $x\ge5$, all three atoms are counted, and
\begin{align*}
F(x)=\frac14+\frac12+\frac14=1.
\end{align*}
We compute the quantile function from $F^{-1}(p)=\inf\{x\in\mathbb R:F(x)\ge p\}$. For $0<p\le1/4$, every $x<-2$ satisfies $F(x)=0<p$, while
\begin{align*}
F(-2)=\frac14\ge p.
\end{align*}
Hence
\begin{align*}
F^{-1}(p)=-2.
\end{align*}
For $1/4<p\le3/4$, every $x<0$ satisfies $F(x)\le1/4<p$, while
\begin{align*}
F(0)=\frac34\ge p,
\end{align*}
so
\begin{align*}
F^{-1}(p)=0.
\end{align*}
For $3/4<p<1$, every $x<5$ satisfies $F(x)\le3/4<p$, while
\begin{align*}
F(5)=1\ge p,
\end{align*}
and therefore
\begin{align*}
F^{-1}(p)=5.
\end{align*}
Now let $U\sim\operatorname{Unif}(0,1)$ and define $Y=F^{-1}(U)$. The event $\{Y=-2\}$ is exactly $\{0<U\le1/4\}$, so
\begin{align*}
\mathbb P(Y=-2)=\mathbb P\left(0<U\le\frac14\right)=\frac14.
\end{align*}
Similarly,
\begin{align*}
\mathbb P(Y=0)=\mathbb P\left(\frac14<U\le\frac34\right)=\frac34-\frac14=\frac12,
\end{align*}
and
\begin{align*}
\mathbb P(Y=5)=\mathbb P\left(\frac34<U<1\right)=1-\frac34=\frac14.
\end{align*}
Thus applying the quantile function to a uniform random variable reproduces the original discrete law: the probability intervals have exactly the same lengths as the atom masses.
[/example]
### Monotone Couplings
Once all real distributions can be built from the same uniform input, it becomes natural to compare two distributions by comparing their equal-percentile representatives. This gives the increasing coupling used in one-dimensional transport.
[definition: Quantile Coupling]
Let $F$ and $G$ be distribution functions of Borel probability measures on $\mathbb R$. On the probability space $((0,1),\mathcal B((0,1)),\mathcal L^1)$, the quantile coupling of $F$ and $G$ is the pair of random variables
\begin{align*}
X:(0,1)\to\mathbb R, \qquad Y:(0,1)\to\mathbb R
\end{align*}
defined by
\begin{align*}
X(p):=F^{-1}(p), \qquad Y(p):=G^{-1}(p).
\end{align*}
[/definition]
Quantile coupling should preserve order when one distribution is systematically shifted to the right of another, but the correct comparison is easy to state backwards. If $G$ lies to the right of $F$, then at each spatial point less $G$-mass has accumulated on the left, so the distribution functions and their quantiles point in opposite directions. The formal order criterion below fixes this direction and connects stochastic dominance with the coupled quantile variables.
[quotetheorem:8349]
The direction can feel reversed at first. A larger distribution function means more mass has accumulated on the left, so the corresponding quantiles are smaller.
## Atoms, Intervals, and Continuity
### One-Sided Regularity
A distribution function is always nondecreasing and right-continuous. Its quantile function has the complementary one-sided regularity. Understanding this regularity prevents mistakes at endpoints and jump levels.
The key point is that the convention $F(x)\ge p$ makes quantiles stable when the probability level is approached from below. Jumps in the quantile occur when the level is crossed from the other side.
[quotetheorem:8350]
An atom is the simplest place where the previous regularity still leaves visible structure. At a jump point, many probability levels are swallowed at once by the same spatial value, so ordinary pointwise intuition does not say which levels should map there. The useful question is to identify precisely the interval of probability levels that the quantile function collapses to that atom.
[quotetheorem:8351]
This theorem gives a visual diagnostic: a long flat piece of the quantile plot means a large atom in the original law. Continuous distributions have no positive-length plateaux at a single value, although their quantile functions may still have jumps if the support has gaps.
[example: Medians Need Not Be Unique]
Let $F(x)=\mu((-\infty,x])$. Since each interval has length $1$ and total mass $1/2$, the mass density on each of $[-2,-1]$ and $[1,2]$ is $1/2$. Thus, for $-2\le x\le -1$, the counted part of the first interval has length $x-(-2)=x+2$, so
\begin{align*}
F(x)=\frac12(x+2).
\end{align*}
For $-1\le x<1$, all of $[-2,-1]$ and none of $[1,2]$ has been counted, hence
\begin{align*}
F(x)=\frac12.
\end{align*}
For $1\le x\le2$, all of $[-2,-1]$ has been counted and the counted part of $[1,2]$ has length $x-1$, so
\begin{align*}
F(x)=\frac12+\frac12(x-1)=\frac{x}{2}.
\end{align*}
If $m\in[-1,1]$, then $F(m)=1/2$. Also, every $x<m$ satisfies $F(x)\le1/2$, so
\begin{align*}
\lim_{x\uparrow m}F(x)\le\frac12.
\end{align*}
Therefore every $m\in[-1,1]$ is a median. Conversely, if $m<-1$, then $F(m)<1/2$, and if $m>1$, then for all $x$ sufficiently close to $m$ from the left one has $F(x)>1/2$, so $\lim_{x\uparrow m}F(x)>1/2$. Hence the set of medians is exactly $[-1,1]$.
Now compute the quantile median. For $x<-1$, either $F(x)=0$ or $F(x)=\frac12(x+2)$ with $x+2<1$, so in both cases
\begin{align*}
F(x)<\frac12.
\end{align*}
At $x=-1$,
\begin{align*}
F(-1)=\frac12.
\end{align*}
Thus the first point where the distribution function reaches level $1/2$ is $-1$, and
\begin{align*}
F^{-1}\left(\frac12\right)=-1.
\end{align*}
The quantile convention selects the leftmost median, while the median itself is a whole interval in this distribution.
[/example]
### Stability Under Distributional Convergence
Quantiles are often estimated from approximating distributions: empirical measures approximate a law, numerical schemes approximate a limiting random variable, and limit theorems replace complicated distributions by simpler ones. The natural question is whether percentile values move continuously under these approximations. The answer is yes at probability levels where the limiting quantile has no jump.
[quotetheorem:8352]
This theorem is the quantile version of convergence in distribution. It also explains why atoms and gaps require care: at a jump of $Q$, nearby approximating distributions may choose different sides of the same empty interval in the support, so the percentile need not converge at that exact level without an additional convention.
### Tail Levels
Endpoint behaviour is easier to understand after atoms and gaps have been separated. The quantile function is defined on $(0,1)$ so that degenerate endpoint issues do not obscure the main theory, but the limits as $p$ approaches $0$ or $1$ still record the support.
[remark: Endpoint Limits of Quantiles]
Let $F$ be the distribution function of a Borel probability measure $\mu$ on $\mathbb R$. Then $\lim_{p\downarrow0}F^{-1}(p)=\inf\operatorname{supp}\mu$ and $\lim_{p\uparrow1}F^{-1}(p)=\sup\operatorname{supp}\mu$, where the infimum and supremum are taken in $\mathbb R\cup\{-\infty,\infty\}$.
[/remark]
The remark explains why unbounded distributions have quantiles tending to infinite endpoints. This behaviour records tail unboundedness in percentile coordinates.
[example: A Loss Percentile with an Atom]
Let $L$ be a loss random variable with $\mathbb P(L=0)=0.95$ and $\mathbb P(L=100)=0.05$. Its distribution function $F_L(x)=\mathbb P(L\le x)$ is determined by which possible losses have been counted. If $x<0$, then neither $0$ nor $100$ is at most $x$, so
\begin{align*}
F_L(x)=0.
\end{align*}
If $0\le x<100$, then the loss $0$ is counted and the loss $100$ is not, hence
\begin{align*}
F_L(x)=\mathbb P(L=0)=0.95.
\end{align*}
If $x\ge100$, both possible losses are counted, and
\begin{align*}
F_L(x)=\mathbb P(L=0)+\mathbb P(L=100)=0.95+0.05=1.
\end{align*}
Using $F_L^{-1}(p)=\inf\{x\in\mathbb R:F_L(x)\ge p\}$, take first $p=0.95$. For every $x<0$,
\begin{align*}
F_L(x)=0<0.95.
\end{align*}
At $x=0$,
\begin{align*}
F_L(0)=0.95\ge0.95.
\end{align*}
Therefore the first point where the distribution function reaches level $0.95$ is $0$, so
\begin{align*}
F_L^{-1}(0.95)=0.
\end{align*}
Now let $0.95<p<1$. For every $x<100$, either $F_L(x)=0$ or $F_L(x)=0.95$, so in both cases
\begin{align*}
F_L(x)\le0.95<p.
\end{align*}
At $x=100$,
\begin{align*}
F_L(100)=1\ge p.
\end{align*}
Thus the first point where $F_L(x)\ge p$ is $100$, and
\begin{align*}
F_L^{-1}(p)=100 \quad \text{for every } p\in(0.95,1).
\end{align*}
The atom at $0$ fills the probability interval $(0,0.95]$, while the atom at $100$ fills $(0.95,1)$; moving the confidence level just above $0.95$ crosses from the no-loss atom to the full-loss atom.
[/example]
## Integration and Rearrangement
### Integrating in Quantile Coordinates
Quantiles are not only labels for distributional position. They also provide a coordinate system for integrals. If a random variable is reconstructed from a uniform variable, expectations can be computed by integrating its quantile function over probability levels.
The cleanest identity holds for nonnegative random variables. It turns the expected value into the area under the quantile curve, including the possibility that both sides are infinite.
[quotetheorem:8353]
For integrable real-valued random variables, the same formula applies to positive and negative parts separately. This is often the most compact way to compute means from tabulated percentile data.
[example: Mean from a Quantile Table]
Let
\begin{align*}
Q(p):=F_X^{-1}(p).
\end{align*}
The table says that $Q$ is constant with value $1$ on $(0,1/4]$, constant with value $3$ on $(1/4,3/4]$, and constant with value $7$ on $(3/4,1)$. These intervals have lengths
\begin{align*}
\mathcal L^1((0,1/4])=\frac14,
\end{align*}
\begin{align*}
\mathcal L^1((1/4,3/4])=\frac34-\frac14=\frac12,
\end{align*}
and
\begin{align*}
\mathcal L^1((3/4,1))=1-\frac34=\frac14.
\end{align*}
Thus the quantile table represents masses $1/4$, $1/2$, and $1/4$ at $1$, $3$, and $7$ respectively.
Now split the integral over the three intervals on which $Q$ is constant:
\begin{align*}
\int_0^1 F_X^{-1}(p)\,d\mathcal L^1(p)=\int_{(0,1/4]}1\,d\mathcal L^1+\int_{(1/4,3/4]}3\,d\mathcal L^1+\int_{(3/4,1)}7\,d\mathcal L^1.
\end{align*}
Since the integral of a constant $c$ over a measurable set $A$ is $c\,\mathcal L^1(A)$, this becomes
\begin{align*}
\int_0^1 F_X^{-1}(p)\,d\mathcal L^1(p)=1\cdot\frac14+3\cdot\frac12+7\cdot\frac14.
\end{align*}
Putting the terms over denominator $4$ gives
\begin{align*}
1\cdot\frac14+3\cdot\frac12+7\cdot\frac14=\frac14+\frac64+\frac74=\frac{14}{4}=\frac72.
\end{align*}
The direct expectation from the corresponding masses is
\begin{align*}
\mathbb E[X]=1\cdot\frac14+3\cdot\frac12+7\cdot\frac14=\frac72,
\end{align*}
so integrating the quantile function gives the same mean as summing value times mass.
[/example]
### Rearrangement of Functions
Quantile functions also appear in analysis under the name rearrangement. The idea is to forget where a function lives and remember only how much measure lies above each height.
A rearrangement should list the values of a function from largest to smallest while preserving the measure of every superlevel set. This leads to the following decreasing analogue of the quantile function.
[definition: Decreasing Rearrangement]
Let $(E,\mathcal E,\mu)$ be a finite [measure space](/page/Measure%20Space) with $0<\mu(E)<\infty$, and let $f:E\to[0,\infty)$ be a measurable function. The distribution function of $f$ is $\lambda_f:[0,\infty)\to[0,\mu(E)]$ defined by
\begin{align*}
\lambda_f(t):=\mu(\{x\in E:f(x)>t\}).
\end{align*}
The decreasing rearrangement of $f$ is the function $f^*:(0,\mu(E))\to[0,\infty)$ defined by
\begin{align*}
f^*(s):=\inf\{t\ge0:\lambda_f(t)\le s\}.
\end{align*}
[/definition]
This finite-measure convention keeps the endpoint bookkeeping separate from the main idea. Rearrangement theory on $\sigma$-finite spaces uses the same threshold formula, but infinite-measure and genuinely extended-valued cases require additional endpoint conventions.
The definition is designed so that $f^*$ has the same superlevel-set sizes as $f$. Without that preservation property, rearrangement would only be a sorting procedure and would not control integrals or norms. The issue is that $f^*$ lives on an interval rather than on the original space $E$, so one must verify that passing to the rearranged function has not changed the measure of any superlevel set.
[quotetheorem:8354]
Equimeasurability says that $f$ and $f^*$ have the same distribution of values. Therefore every integral depending only on the value distribution, such as an $L^p$ norm, is preserved.
[example: Rearranging a Step Function]
Let $E=[0,4]$ with [Lebesgue measure](/page/Lebesgue%20Measure) and define $f(x)=5$ for $0\le x<1$, while $f(x)=2$ for $1\le x<4$; the value at $x=4$ does not affect any Lebesgue measure or integral. For $0\le t<2$, every point of $[0,4)$ has $f(x)>t$, so
\begin{align*}
\lambda_f(t)=\mathcal L^1([0,4))=4.
\end{align*}
For $2\le t<5$, the inequality $f(x)>t$ holds exactly on $[0,1)$, hence
\begin{align*}
\lambda_f(t)=\mathcal L^1([0,1))=1.
\end{align*}
For $t\ge5$, no point has $f(x)>t$, so
\begin{align*}
\lambda_f(t)=0.
\end{align*}
Using $f^*(s)=\inf\{t\ge0:\lambda_f(t)\le s\}$, if $0<s<1$, then $\lambda_f(t)>s$ for every $t<5$, while $\lambda_f(5)=0\le s$, so
\begin{align*}
f^*(s)=5.
\end{align*}
If $1\le s<4$, then $\lambda_f(t)=4>s$ for $0\le t<2$, while $\lambda_f(2)=1\le s$, so
\begin{align*}
f^*(s)=2.
\end{align*}
Thus the decreasing rearrangement lists the value $5$ on an interval of length $1$ and the value $2$ on an interval of length $3$, with the endpoint convention at $s=1$ irrelevant for integration.
For $p\ge1$, split the rearranged integral over the two constant pieces:
\begin{align*}
\int_0^4 |f^*(s)|^p\,d\mathcal L^1(s)=\int_{(0,1)}5^p\,d\mathcal L^1(s)+\int_{[1,4)}2^p\,d\mathcal L^1(s).
\end{align*}
Since the integral of a constant $c$ over a measurable set $A$ is $c\,\mathcal L^1(A)$, this gives
\begin{align*}
\int_0^4 |f^*(s)|^p\,d\mathcal L^1(s)=5^p\mathcal L^1((0,1))+2^p\mathcal L^1([1,4)).
\end{align*}
The interval lengths are $\mathcal L^1((0,1))=1$ and $\mathcal L^1([1,4))=4-1=3$, so
\begin{align*}
\int_0^4 |f^*(s)|^p\,d\mathcal L^1(s)=5^p\cdot1+2^p\cdot3.
\end{align*}
The original function has the same constant values on sets of the same lengths:
\begin{align*}
\int_0^4 |f(x)|^p\,d\mathcal L^1(x)=\int_{[0,1)}5^p\,d\mathcal L^1(x)+\int_{[1,4)}2^p\,d\mathcal L^1(x).
\end{align*}
Therefore
\begin{align*}
\int_0^4 |f(x)|^p\,d\mathcal L^1(x)=5^p\cdot1+2^p\cdot3.
\end{align*}
Hence
\begin{align*}
\int_0^4 |f^*(s)|^p\,d\mathcal L^1(s)=\int_0^4 |f(x)|^p\,d\mathcal L^1(x).
\end{align*}
The rearrangement changes where the values occur, but it preserves the measure occupied by each value and therefore preserves these $L^p$ integrals.
[/example]
## Beyond and Connected Topics
Quantile functions sit at the meeting point of real analysis, probability, statistics, and measure theory. In elementary analysis, they provide a disciplined way to speak about inverse functions when monotone functions have jumps; this connects naturally with monotone convergence, continuity from the left and right, and the construction of measures from distribution functions in [Cambridge IA Analysis Notes](/page/Cambridge%20IA%20Analysis%20Notes) and [Cambridge IB Analysis and Topology](/page/Cambridge%20IB%20Analysis%20and%20Topology).
In probability, quantiles are the backbone of [inverse transform sampling](/theorems/2000) and of first-order stochastic dominance. The quantile transform gives a canonical way to realize any real distribution on the unit interval, which makes it a standard tool for couplings, convergence in distribution, and comparison inequalities.
In analysis of functions, decreasing rearrangement is the quantile viewpoint applied to function values rather than random outcomes. This leads to layer-cake representations, rearrangement inequalities, Lorentz norms, and compactness tools; it is a natural continuation of measure-theoretic material in [Cambridge II Analysis of Functions](/page/Cambridge%20II%20Analysis%20of%20Functions).
In geometric measure theory and BV theory, distribution functions of level sets appear through coarea and layer-cake formulas. Quantile-style rearrangements do not remember geometry, but they preserve enough size information to compare norms and level-set measures; this provides a useful bridge toward [Geometric Measure Theory III: BV Functions and Sets of Finite Perimeter](/page/Geometric%20Measure%20Theory%20III%3A%20BV%20Functions%20and%20Sets%20of%20Finite%20Perimeter).
## References
Androma, [Cambridge IA Analysis Notes](/page/Cambridge%20IA%20Analysis%20Notes).
Androma, [Cambridge IB Analysis and Topology](/page/Cambridge%20IB%20Analysis%20and%20Topology).
Androma, [Cambridge II Analysis of Functions](/page/Cambridge%20II%20Analysis%20of%20Functions).
Androma, [Geometric Measure Theory III: BV Functions and Sets of Finite Perimeter](/page/Geometric%20Measure%20Theory%20III%3A%20BV%20Functions%20and%20Sets%20of%20Finite%20Perimeter).
Billingsley, *Probability and Measure* (1995).
Bogachev, *Measure Theory* (2007).
Shorack, *Probability for Statisticians* (2000).
Quantile Function
Also known as: Generalized inverse, Inverse distribution function, Percentile function, Quantile map, Distribution quantile, Left-continuous inverse