Continuous random variables
Continuous random variables
- A continuous random variable can take any value in a range, described by a probability density function $f(x)$:
$$f(x) \geq 0, \qquad \int_{-\infty}^{\infty} f(x)\,dx = 1$$
- A probability is an area under $f$: $P(a < X < b) = \displaystyle\int_a^b f(x)\,dx$.
- The mean is $E(X) = \displaystyle\int_{-\infty}^{\infty} x\,f(x)\,dx$.
Practice
A probability density function must satisfy ∫f(x)dx over all x equals what value?
The total area under a pdf is always 1.
Practice
For f(x) = ½x on 0 ≤ x ≤ 2, E(X) = ∫₀² x(½x) dx = [x³/6]₀². What is E(X)? (≈, 2 dp)
E(X) = ∫₀² ½x² dx = [x³/6]₀² = 8/6 = 4/3 ≈ 1.33.
Practice
For a continuous variable, P(a < X < b) is the area under f(x) between a and b.
Probabilities for a continuous variable are areas under the density function.
You've got it
Key idea
- a pdf has $f(x) \geq 0$ and total area $\int f = 1$
- a probability is the area under $f$ between the limits
- the mean $E(X) = \int x\,f(x)\,dx$