Difficulty: Intermediate | Prerequisites: expected value, p.d.f., c.d.f., basic integration, inverse functions.
The expected value tells you where a distribution sits on average, but it is sensitive to extreme values and does not always match what a "typical" outcome looks like. The median and, more broadly, quantiles give you alternative ways to pin down the location and shape of a distribution. This material bridges the gap between summary statistics (mean, median) and the full distributional information encoded in the c.d.f. You will need these concepts in hypothesis testing, confidence intervals, and risk measurement later in the course.
The median is the value m where half the probability mass falls at or below m. Quantiles generalise this idea: the α-quantile is the smallest value q where P(X ≤ q) ≥ α. For continuous distributions with a strictly increasing c.d.f., the α-quantile is simply the inverse c.d.f. evaluated at α.
Median, median(X)
A real number m such that P(X ≤ m) = 1/2. It splits the distribution into two halves of equal probability.
Think of it as: the "middle" outcome. Half the time X lands at or below m, half the time above.
Quantile, q(X, α)
The α-quantile of X is defined as q(X, α) = min{a ∈ ℝ : P(X ≤ a) ≥ α}. It is the smallest value at which the c.d.f. reaches or exceeds α.
In simple terms, it is the threshold below which a fraction α of the probability sits.
Percentile
The p-th percentile is q(X, p/100). So the 90th percentile is the α = 0.90 quantile.
Think of it as: percentiles are just quantiles rescaled from 0 to 100 instead of 0 to 1.
Quartiles
The three quartiles split the distribution into four equal-probability chunks: Q1 = 25th percentile (α = 0.25), Q2 = 50th percentile (the median), Q3 = 75th percentile (α = 0.75).
In simple terms, they are the "quarter marks" of the distribution.
Deciles
The nine deciles split the distribution into ten equal-probability segments: the 10th, 20th, ..., 90th percentiles.
Inverse c.d.f. (quantile function), F⁻¹(α)
For a continuous random variable with a strictly increasing c.d.f. on the interior of its support, the α-quantile equals F⁻¹(α), i.e. you solve F(q) = α for q.
In simple terms, you read the c.d.f. graph backwards: instead of going from x to probability, you go from probability to x.
The median m of a random variable X satisfies P(X ≤ m) = 1/2.
If the p.d.f. is symmetric around some point c, the median equals c (and so does the mean).
The median is not always unique. For a discrete distribution, any value in a "flat" region of the c.d.f. at the 1/2 level qualifies.
Example: let X be the result of rolling a fair die. The c.d.f. jumps from 1/2 at x = 3 to 4/6 at x = 4, so any number in (3, 4) could serve as the median.
Let X have p.d.f. f(x) = (4/9)x² on [0, 3], and 0 otherwise.
The expected value is E[X] = ∫₀³ t · (4/9)t² dt = (4/9) · ∫₀³ t³ dt = (4/9) · (81/4) = 81/36 = 9/4 = 2.25.
To find the median, first compute the c.d.f.: F(x) = ∫₀ˣ (4/9)t² dt = (4/27)x³.
Set F(m) = 1/2: (4/27)m³ = 1/2, so m³ = 27/8, giving m = 3/2 = 1.5.
The median (1.5) is less than the mean (2.25). This makes sense because the p.d.f. puts more weight toward higher values (it is right-skewed), pulling the mean above the median.
The α-quantile of X is q(X, α) = min{a ∈ ℝ : P(X ≤ a) ≥ α}.
For a continuously distributed random variable with a strictly increasing c.d.f. on the interior of the support, this simplifies to q(X, α) = F⁻¹(α).
The median is the special case α = 0.5.
Quartiles: α = 0.25, 0.50, 0.75 (Q1, Q2, Q3).
Deciles: α = 0.10, 0.20, ..., 0.90.
Percentiles: α = p/100 for any integer p from 1 to 99.
P(X \leq m) = \frac{1}{2} \quad \text{(median definition)}q(X, \alpha) = \min\{a \in \mathbb{R} : P(X \leq a) \geq \alpha\} \quad \text{(general quantile)}q(X, \alpha) = F_X^{-1}(\alpha) \quad \text{(continuous case, strictly increasing c.d.f.)}F_X(x) = \int_{-\infty}^{x} f_X(t) \, dt \quad \text{(c.d.f. from p.d.f.)}Median household income is the standard summary statistic for income distributions precisely because incomes are right-skewed, and the mean would be pulled up by a small number of very high earners. In finance, Value at Risk (VaR) is defined as a quantile of the loss distribution: "the 5th-percentile loss" means there is only a 5% chance of losing more than that amount.
Students often assume the median always equals the mean. They coincide only for symmetric distributions. For skewed distributions, the two diverge.
A common mistake is thinking the median must be one of the possible values of X. For a continuous distribution, any value satisfying F(m) = 1/2 works, and it may not be a "special" point.
Students sometimes confuse "percentile" and "quantile." They carry the same information, just on different scales (0 to 100 vs. 0 to 1).
When the c.d.f. has a flat stretch at the 1/2 level (or at any target α), the quantile is not unique. The formal definition picks the smallest qualifying value, but exams may ask you to identify the full range.
⚠️ Be prepared to compute the median from a given p.d.f.: integrate to get the c.d.f., set F(m) = 1/2, solve for m.
⚠️ Know the general quantile definition and be able to find q(X, α) for both continuous and discrete distributions.
⚠️ Understand when the median is not unique and be able to identify the set of valid medians for a discrete random variable.
⚠️ Be ready to compare the mean and median for a given distribution and explain why they differ (skewness).
True or false: The median of a symmetric distribution equals its mean.
True.
Fill in the blank: The 75th percentile is the α = ____ quantile.
0.75
True or false: For a fair six-sided die, the median is exactly 3.5.
True (any value in (3, 4) works, but 3.5 is the conventional choice and satisfies the definition).
If F(x) = x³ on [0, 1], what is the median?
Solve m³ = 1/2, so m = (1/2)^(1/3) ≈ 0.794.
True or false: The quantile function F⁻¹(α) is defined only for continuous random variables.
False. The general quantile definition q(X, α) = min{a : P(X ≤ a) ≥ α} works for any random variable. The inverse-c.d.f. shortcut requires a strictly increasing c.d.f., which is a continuous-distribution convenience.
Q: Let X have p.d.f. f(x) = 3x² on [0, 1]. Find the median.
A: The c.d.f. is F(x) = x³. Set m³ = 1/2, so m = (1/2)^(1/3) = 2^(-1/3) ≈ 0.794.
Q: For the same distribution, find Q1 and Q3.
A: Q1: solve x³ = 0.25, giving x = 0.25^(1/3) ≈ 0.630. Q3: solve x³ = 0.75, giving x = 0.75^(1/3) ≈ 0.909.
Q: Let X have p.d.f. f(x) = (4/9)x² on [0, 3]. Compute the mean and the median. Which is larger, and why?
A: Mean: E[X] = (4/9) · ∫₀³ t³ dt = (4/9)(81/4) = 2.25. Median: F(x) = (4/27)x³, so (4/27)m³ = 1/2 gives m³ = 27/8, m = 3/2 = 1.5. The mean (2.25) exceeds the median (1.5) because the distribution is right-skewed, concentrating more density at higher values.
Q: A discrete random variable takes values 1, 2, 3, 4 each with probability 1/4. What is the median? Is it unique?
A: F(2) = 1/2, so 2 qualifies. F(1) = 1/4 < 1/2, so 1 does not. Any value m in [2, 3) also satisfies P(X ≤ m) ≥ 1/2. The formal definition q(X, 0.5) = min{a : F(a) ≥ 0.5} gives m = 2, but the median is not unique in the broader sense.
Quantiles feed directly into box plots (which display Q1, median, Q3, and whiskers) and into non-parametric statistics, where rank-based methods rely on order statistics rather than the mean. In finance and risk management, quantiles underpin Value at Risk (VaR) and Expected Shortfall. The relationship between mean and median is also the starting point for discussions of skewness in later lectures.
Median, quantile, percentile, quartile, decile, inverse c.d.f., quantile function, F inverse, Q1, Q2, Q3, box plot, order statistics, Value at Risk, VaR, skewness, mean vs. median, c.d.f., cumulative distribution function, ANST 10141T, Analytical Statistics NYU.