The CDF $F(x) = P(X \le x)$ works for every random variable. For a continuous one it is the area under the density to the left of $x$, and the first part of the Fundamental Theorem connects the two: the density is the CDF's rate of change.
Key idea
Why it works
Worked examples
Worked example: A CDF and its median
- For $0 \le x \le 1$: $F(x) = \int_{0}^{x} 2t\,dt = x^{2}$. Below 0, $F = 0$; above 1, $F = 1$.
- Median: $m^{2} = \frac{1}{2}$, so $m = \frac{1}{\sqrt{2}} \approx 0.707$.
- The 25th percentile solves $x^{2} = \frac{1}{4}$: $x = \frac{1}{2}$.
Answer: $F(x) = x^{2}$ on $[0, 1]$; median $\frac{1}{\sqrt{2}}$.
Worked example: A density in two pieces
- The whole left piece has area $\int_{0}^{1} x\,dx = \frac{1}{2}$.
- For $1 \le x \le 2$: $$F(x) = \frac{1}{2} + \int_{1}^{x} (2 - t)\,dt = \frac{1}{2} + 2x - \frac{x^{2}}{2} - \frac{3}{2} = -\frac{x^{2}}{2} + 2x - 1$$
- $F(1.5) = -\frac{9}{8} + 3 - 1 = \frac{7}{8}$. Check: $F(1) = \frac{1}{2}$ and $F(2) = 1$.
Answer: $F(1.5) = \frac{7}{8}$
Worked example: From the CDF back to the density
- $f(x) = F'(x) = \frac{1}{2}e^{-x/2}$ for $x > 0$.
- Median: $1 - e^{-m/2} = \frac{1}{2}$, so $e^{-m/2} = \frac{1}{2}$ and $m = 2\ln 2 \approx 1.386$.
Answer: $f(x) = \frac{1}{2}e^{-x/2}$; median $2\ln 2$.
Common mistake