Mathwords logoMathwords

Quantile Function — Definition, Formula & Example

The quantile function of a random variable takes a probability pp and returns the smallest cutoff value xx with at least pp of the distribution at or below it. It answers the question "how large must xx be for the probability of being at or below xx to reach pp?"

For a random variable with cumulative distribution function FF, the quantile function is Q:(0,1)→RQ:(0,1)\to\mathbb{R}, Q(p)=inf⁡{x∈R:F(x)≥p}Q(p) = \inf\{x \in \mathbb{R} : F(x) \ge p\}. When FF is continuous and strictly increasing, QQ is the ordinary inverse function F−1F^{-1}. The infimum version still works when FF has jumps or flat stretches, as it does for discrete distributions.

Key Formula

Q(p)=inf⁡{x∈R:F(x)≥p},0<p<1Q(p) = \inf\{x \in \mathbb{R} : F(x) \ge p\}, \quad 0 < p < 1
Where:
  • pp = A probability strictly between 0 and 1
  • F(x)F(x) = The cumulative distribution function, P(X≤x)P(X \le x)
  • Q(p)Q(p) = The smallest value xx whose cumulative probability reaches at least pp
  • inf⁡\inf = Infimum: the greatest lower bound of the set

Worked Example

Problem: The time between calls to a help line follows an exponential distribution with a mean of 10 minutes. Find the quantile function, then use it to find the 90th percentile of the waiting time.
Step 1: Write the CDF. An exponential distribution with mean 10 has rate λ=1/10\lambda = 1/10.
F(x)=1−e−x/10,x≥0F(x) = 1 - e^{-x/10}, \quad x \ge 0
Step 2: Set F(x)=pF(x) = p and solve for xx. This CDF is continuous and strictly increasing for x≥0x \ge 0, so the solution is the quantile function.
1−e−x/10=p  ⟹  e−x/10=1−p  ⟹  Q(p)=−10ln⁡(1−p)1 - e^{-x/10} = p \;\Longrightarrow\; e^{-x/10} = 1 - p \;\Longrightarrow\; Q(p) = -10\ln(1-p)
Step 3: Substitute p=0.9p = 0.9. Use −ln⁡(0.1)=ln⁡10-\ln(0.1) = \ln 10.
Q(0.9)=−10ln⁡(0.1)=10ln⁡10≈23.03Q(0.9) = -10\ln(0.1) = 10\ln 10 \approx 23.03
Answer: Q(p)=−10ln⁡(1−p)Q(p) = -10\ln(1-p). The 90th percentile is 10ln⁡10≈23.0310\ln 10 \approx 23.03 minutes, so 90% of the gaps between calls last about 23.03 minutes or less.

Why It Matters

In an intro statistics course, every critical value is a quantile. For example, z=1.96z = 1.96 is approximately Q(0.975)Q(0.975) for the standard normal distribution. In computer simulation, inverse transform sampling feeds uniform random numbers on (0,1)(0,1) into QQ to generate data from any distribution. Risk analysts use quantiles too: Value at Risk is a quantile of a loss distribution.

Common Mistakes

Mistake: Reading F−1(p)F^{-1}(p) as the reciprocal 1/F(p)1/F(p).
Correction: The superscript −1-1 here means inverse function, not reciprocal. When FF is continuous and strictly increasing, F−1(p)F^{-1}(p) is the input xx that gives output pp. Also note that FF takes values of xx as inputs, while F−1F^{-1} takes probabilities as inputs.

Related Terms