Continuous random variables (Further)
| English | Chinese | Pinyin |
|---|---|---|
| continuous variable | 连续变量 | lián xù biàn liàng |
| probability density function | 概率密度函数 | gài lǜ mì dù hán shù |
| expectation | 期望 | qī wàng |
| cumulative distribution function | 累积分布函数 | lěi jī fēn bù hán shù |
| median | 中位数 | zhōng wèi shù |
| percentile | 百分位数 | bǎi fēn wèi shù |
| quartile | 四分位数 | sì fēn wèi shù |
Probability as area
- For a continuous variable 连续变量 — a height, a waiting time — no single exact value has a probability; there are infinitely many.
- Instead, probability is the area under a curve, the probability density function 概率密度函数 $f(x)$. The whole area is $1$.
The density function and expectation 期望
- $P(a < X < b) = \displaystyle\int_a^b f(x)\,dx$, and the total area $\int f = 1$.
- The mean of any function of $X$:

Probabilities are areas under f(x); the total area over the whole range is exactly 1.
Continuous random variables
P(a < X < b) = ∫ f(x) dx
For a continuous variable, probability is the area under the density curve.
What must the total area under a probability density function equal?
A pdf integrates to 1 over its whole range.
The cumulative distribution function 累积分布函数
- The CDF accumulates probability from the left:
- It runs from $0$ to $1$, and differentiating recovers the density: $f(x) = F'(x)$.

The CDF $F(x)$ rises from 0 to 1; the median is read off where it reaches a height of 0.5
The cumulative distribution function F(x) gives:
F(x) = P(X ≤ x), the accumulated area up to x.
Differentiating the CDF gives the density: f(x) = F-______(x).
f(x) = F′(x): the density is the derivative of the CDF.
Worked example — the median 中位数
- The median $m$ splits the area in half: $F(m) = 0.5$.
- For $f(x) = \tfrac12 x$ on $[0, 2]$: $F(x) = \tfrac14 x^2$, so $\tfrac14 m^2 = 0.5$ gives $m = \sqrt2 \approx 1.41$.
Percentiles 百分位数 work the same way. The lower quartile 四分位数 solves $F(x) = 0.25$; the 90th percentile solves $F(x) = 0.9$. Always set $F$ equal to the fraction you want.
For f(x) = ½x on [0,2], F(x) = ¼x². The median solves ¼m² = 0.5. What is m? (2 dp)
¼m² = 0.5 → m² = 2 → m = √2 ≈ 1.41.
The median m of a continuous distribution satisfies:
The median splits the area in half: F(m) = 0.5.
Density is not probability
$f(x)$ can exceed 1. A density isn't a probability — only the area is. A tall narrow peak can have $f(x) > 1$ as long as the total area stays $1$.
- Use cumulative distribution functions (CDFs) to find probabilities and percentiles, and the CDF of a related variable.
A probability density f(x) can be greater than 1.
Only the area must be ≤ 1; the density itself can exceed 1 over a narrow interval.
You've got it
- probability = area under $f(x)$; total area $= 1$ (density itself can exceed 1)
- the CDF $F(x) = P(X \leq x) = \int f$, and $f = F'$
- the median solves $F(m) = 0.5$; percentiles solve $F(x) =$ that fraction