Continuous random variables (Further)
Continuous random variables
- A continuous variable $X$ has a probability density function $f(x)$ (may be piecewise).
- The mean of any function: $E(g(X)) = \displaystyle\int g(x)\,f(x)\,dx$.
- The cumulative distribution function $F(x) = P(X \leq x) = \displaystyle\int_{-\infty}^x f(t)\,dt$, and $f(x) = F'(x)$.
Practice
The cumulative distribution function F(x) is:
F(x) = P(X ≤ x) = ∫f; conversely f = F′.
Practice
The density function f(x) is the derivative of the cumulative distribution function F(x).
f(x) = F′(x); F is the running total (integral) of f.
Median and percentiles
- Use $F$ to find probabilities and percentiles.
- The median $m$ solves $F(m) = 0.5$.
- Example: $f(x) = \tfrac12 x$ on $[0,2]$ → $F(x) = \tfrac14 x^2$, so $\tfrac14 m^2 = 0.5$ gives $m = \sqrt2 \approx 1.41$.
Practice
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.
You've got it
Key idea
- the CDF $F(x) = P(X \leq x) = \int f$; and $f = F'$
- find percentiles from $F$; the median solves $F(m) = 0.5$
- $E(g(X)) = \int g(x) f(x)\,dx$