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.
text
admin
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.
text
admin
[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]
example
admin
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.
text
admin
## Definition
h2
admin
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$.
text
admin
[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]
definition
admin
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.
text
admin
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\})$.
text
admin
[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]
definition
admin
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.
text
admin
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.
text
admin
[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]
definition
admin
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.
text
admin
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.
text
admin
[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]