# 17 Quantile Functions

- The
*quantile function*fills in the following blank for a given \(p\in[0, 1]\): the \(100p\)th percentile is (blank). - For example, evaluating the quantile function at \(p=0.25\) outputs the 25th percentile.
- For a
*continuous*random variable^{1}with cdf \(F\), the**quantile function**\(Q:[0,1]\mapsto\mathbb{R}\) is the inverse of the cdf, \(Q(p) = F^{-1}(p)\).

**Example 17.1 **Recall Example 15.3 where the waiting time, measured continuously in hours, from now until the next earthquake (of any magnitude) occurs in southern CA is a continuous random variable \(X\) with an Exponential distribution with rate parameter 2. The cdf of \(X\) is

\[ F_X(x) = 1- e^{-2x}, \; x \ge0. \]

Evaluate and interpret \(Q_X(0.25)\).

Evaluate and interpret \(Q_X(0.5)\).

Find the quantile function of \(X\).

How can you use the quantile function to construct a spinner for \(X\) (like in Figure 15.1)?

Let \(U\) be a random variable with a Uniform(0, 1) distribution, and let \(Y = -0.5\log(1 - U)\). What is the distribution of \(Y\)? Explain without doing any calculations.

- The quantile function can be used to create a spinner for a distribution. Basically, the values on the outside boundary of the spinner are scaled based on the quantile function (which is determined by the cdf). Intervals corresponding to regions of higher density (“more likely”) values are stretched out on the spinner boundary; intervals corresponding regions of lower density (“less likely” values) are shrunk.
- The foundation of all spinners is the Uniform(0, 1) spinner.
**Universality of the Uniform (or “one**Let \(F\) be a cdf and \(Q\) its corresponding quantile function. Let \(U\) have a Uniform(0, 1) distribution and define the random variable \(X=Q(U)\). Then the cdf of \(X\) is \(F\).~~ring~~spinner to rule them all”).- Universality of the uniform might look complicated but all it basically says is that you can construct a spinner by putting the 25th percentile 25% of the way around, the 75th percentile 75% of the way around, etc.
- Actually, universality of the uniform says we don’t have to create a new spinner. We can just spin the Uniform(0, 1) spinner and transform each resulting value by plugging it into the quantile function.

**Example 17.2 **Let \(Q\) be the quantile function of a Normal(0, 1) distribution.

Use the empirical rule for Normal distributions (Section 7.4) to find the following values and identify how they are represented in the standard Normal spinner (Figure 7.3).

Find \(Q(0.025)\).

Find \(Q(0.16)\).

Find \(Q(0.25)\).

Find \(Q(0.5)\).

Find \(Q(0.75)\).

Find \(Q(0.84)\).

Find \(Q(0.975)\).

If the cdf is a continuous, strictly increasing function over the range of possible values, then the quantile function is the inverse cdf. But the inverse of a cdf might not exist, if the cdf has jumps or flat spots. In particular, the inverse cdf does not exist for discrete random variables. So in general, the quantile function corresponding to cdf \(F\) is defined as \(Q(p) = \inf\{u:F(u)\ge p\}\).↩︎