All subjects · Mathematics · WST02 Statistics 2
Continuous random variables and probability density functions
Edexcel IAL Mathematics · WST02 Statistics 2
A continuous random variable can take any value in a range, such as a time or a length. Probabilities are areas under a curve called the probability density function.
Discrete and continuous
A discrete variable takes separate values (0, 1, 2, ...). A continuous random variable takes any value in an interval. Because there are infinitely many values, the probability of any single exact value is zero: P(X = a) = 0, so P(X < a) = P(X ≤ a).
The probability density function
A continuous random variable X is described by a probability density function (pdf) f(x) with:
- f(x) ≥ 0 for all x;
- the total area is 1: ∫ f(x) dx = 1 over all x;
- P(a < X < b) = ∫ from a to b of f(x) dx.
In S2, f(x) is a simple polynomial, possibly defined piecewise, and is 0 outside a stated range. f(x) itself is not a probability, so it can be bigger than 1.
Finding a constant
If f(x) = kx2 for 0 ≤ x ≤ 3 (and 0 otherwise), then ∫ from 0 to 3 of kx2 dx = 9k = 1, so k = 1/9. For a piecewise pdf, add the integrals over each piece and set the total to 1. Simple shapes (triangles, rectangles) can be done by area, which examiners accept; for anything else, integrate, and show the substitution of the limits.
| Range | f(x) |
|---|---|
| 0 ≤ x ≤ 2 | kx |
| 2 < x ≤ 3 | 2k |
| otherwise | 0 |
Worked example
f(x) = kx2 for 0 ≤ x ≤ 3 and 0 otherwise. Find k and P(1 < X < 2).
- ∫ from 0 to 3 of kx2 dx = k[x3/3] = 9k = 1, so k = 1/9.
- P(1 < X < 2) = ∫ from 1 to 2 of x2/9 dx = [x3/27] from 1 to 2
- = (8 - 1)/27
Answer: k = 1/9 and P(1 < X < 2) = 7/27
Check yourself
- f(x) = kx2 for 0 ≤ x ≤ 3 and 0 otherwise is a pdf. Find k. Give your answer as a fraction in its simplest form.
Show answer
1/9. ∫ from 0 to 3 of kx2 dx = 9k = 1.
- f(x) = x2/9 for 0 ≤ x ≤ 3 and 0 otherwise. Find P(1 < X < 2). Give your answer as a fraction in its simplest form.
Show answer
7/27. [x3/27] from 1 to 2 = 8/27 - 1/27 = 7/27.
- f(x) = x2/9 for 0 ≤ x ≤ 3 and 0 otherwise. Find P(X > 2.5). Give your answer to 3 significant figures.
Show answer
0.421. 1 - [x3/27] from 0 to 2.5 = 1 - 15.625/27 = 0.4213.
- A pdf is f(x) = kx for 0 ≤ x ≤ 2, f(x) = 2k for 2 < x ≤ 3, and 0 otherwise. Find k. Give your answer as a fraction in its simplest form.
Show answer
1/4. Area = ∫ from 0 to 2 of kx dx + 2k × 1 = 2k + 2k = 4k = 1.
- f(x) = k(4 - x) for 1 ≤ x ≤ 3 and 0 otherwise is a pdf. Find k. Give your answer as a fraction in its simplest form.
Show answer
1/4. ∫ from 1 to 3 of (4 - x) dx = [4x - x2/2] = 7.5 - 3.5 = 4, so 4k = 1.
- Which of these could be a probability density function on 0 ≤ x ≤ 2 (and 0 otherwise)?
- f(x) = x
- f(x) = x - 1
- f(x) = 1
- f(x) = x/2
Show answer
f(x) = x/2. x/2 is never negative on 0 to 2 and its area is [x2/4] = 1.
- X is a continuous random variable with pdf f(x) = x/2 for 0 ≤ x ≤ 2. What is P(X = 1)?
- 0.5
- 0
- 0.25
- 1
Show answer
0. For a continuous variable, a single value has zero probability (no area).
Sources
Last updated 8 November 2026. Spotted a mistake? Tell us.