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.

Practise this in the app: instant marking and a fix for every mistake. Free, no email needed to start.

Practise this lesson

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:

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.

Rangef(x)
0 ≤ x ≤ 2kx
2 < x ≤ 32k
otherwise0

Worked example

f(x) = kx2 for 0 ≤ x ≤ 3 and 0 otherwise. Find k and P(1 < X < 2).

  1. ∫ from 0 to 3 of kx2 dx = k[x3/3] = 9k = 1, so k = 1/9.
  2. P(1 < X < 2) = ∫ from 1 to 2 of x2/9 dx = [x3/27] from 1 to 2
  3. = (8 - 1)/27

Answer: k = 1/9 and P(1 < X < 2) = 7/27

Key idea: f(x) ≥ 0, total area 1, P(a < X < b) = ∫ f(x) dx from a to b, P(X = a) = 0.

Check yourself

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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).

Practise with instant feedback

Sources

Last updated 8 November 2026. Spotted a mistake? Tell us.