Skip to content
Cambridge AS & A Level9709

Continuous random variables

Mathematics 9709 Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Continuous random variables notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Continuous random variables notes as text: skim, search, and jump between subtopics.

~11 min read

1. The probability density function

A continuous random variable can take any value in a range. Its probabilities are given by areas under the graph of its probability density function f(x).

The area under the graph is 1, and f(x) is never negative. A domain may be infinite, for example 3/x⁴ for x geqslant 1.

To find an unknown constant such as k, integrate f(x) over the whole domain and equate it to 1.

int_-∞^(∞) f(x) dx = 1

f(x) geqslant 0 for all x

Examiner insight

“However, very few candidates stated f(x) ⩾ 0, which is also a requirement.” “As this was a ‘show that’ question, it was important that all relevant working was shown.”

Worked example 13 marks

A random variable X has probability density function given by f(x) = k(2x² - x³) for 0 leqslant x leqslant 2, and f(x) = 0 otherwise. Show that k = 3/4.

  1. 1

    area is 1: int₀² k(2x² - x³) dx = 1 [1]

  2. 2

    k[2x³/3 - x⁴/4]₀² = 1 [1]

  3. 3

    k × 4/3 = 1, so k = 3/4 [1]

2. Probabilities from the density function

A probability is an area under the graph. To find P(a < X < b), integrate the density function between a and b.

The limits must match the event. For P(X <c) the lower limit is the start of the domain. For P(X >c) the upper limit is the end of the domain, or use 1 minus the other probability.

P(a < X < b) = int_a^(b) f(x) dx

Examiner insight

“A few candidates used limits 1.2 to 3 but omitted to subtract their result from 1, which would have obtained the correct answer.” “It is important that candidates have an understanding of probability density functions and their graphs rather than just relying on formulae to find probabilities.”

Worked example 13 marks

A random variable X has probability density function given by f(x) = 1/18(9 - x²) for 0 leqslant x leqslant 3, and f(x) = 0 otherwise. Find P(X < 1.2).

  1. 1

    int₀^(1.2) 1/18(9 - x²) dx [1]

  2. 2

    = 1/18[9x - x³/3]₀^(1.2) [1]

  3. 3

    = 1/18(10.8 - 0.576) = 0.568 or 71/125 [1]

3. Mean and variance

The mean is found by integrating x times f(x) over the domain. The variance uses x² f(x), then subtracts the square of the mean.

Integrating f(x) alone gives the total area, which is 1. It is not the mean.

E(X) = int x f(x) dx

Var(X) = int x² f(x) dx - [E(X)]²

Examiner insight

“Some candidates integrated f(x) rather than xf(x) and some confused the mean and median.” “Candidates generally knew how to find Var(X) although some of them did not subtract the square of the mean.”

Worked example 13 marks

A random variable X has probability density function given by f(x) = 3/16(4x - x²) for 2 leqslant x leqslant 4, and f(x) = 0 otherwise. Given that E(X) = 11/4, find Var(X).

  1. 1

    E(X²) = int₂⁴ 3/16(4x³ - x⁴) dx = 3/16[x⁴ - x⁵/5]₂⁴ [1]

  2. 2

    = 39/5 or 7.8 [1]

  3. 3

    Var(X) = 39/5 - (11/4)² = 19/80 [1]

4. The median and other percentiles

The median m splits the area in half. Integrate the density function from the start of the domain to m and equate it to 0.5. A percentile works the same way: the lower quartile has area 0.25 to its left.

The limits must match the right-hand side. Integrating from m to the end of the domain also gives 0.5.

int_start^(m) f(x) dx = 0.5

Examiner insight

“It was necessary to integrate f(x) between the limits 0 and m and to equate the result to 0.5.” “Instead of integrating from 1 to 1.5 and equating to 0.5, the integral was incorrectly evaluated from 1 to 0.5 and equated to the median 1.5.”

Worked example 13 marks

A random variable X has probability density function given by f(x) = 1/18(9 - x²) for 0 leqslant x leqslant 3, and f(x) = 0 otherwise. The median of X is m. Show that m³ - 27m + 27 = 0.

  1. 1

    int₀^(m) 1/18(9 - x²) dx = 0.5 [1]

  2. 2

    1/18(9m - m³/3) = 0.5 [1]

  3. 3

    27m - m³ = 27, so m³ - 27m + 27 = 0 [1]

5. Symmetry and sketches

If the graph is symmetrical about a line x = c, the mean and the median are both c, and the area on each side of the line is 0.5.

Sketch the graph and label the areas before any integration. Equal areas give probabilities with no calculus.

symmetry about x = c ⇒ E(X) = c, P(X < c) = 0.5

Examiner insight

“Responses which used diagrams were often more logical and successful in their approach.” “A quicker and more straightforward method was to use the symmetry of the curve to deduce that q=p; use of a diagram could have helped candidates here.”

Worked example 12 marks

The graph of the probability density function of a random variable X is symmetrical about the line x = 4. Given that P(X < 5) = 20/27, find P(3 < X < 5).

  1. 1

    symmetry: P(X < 4) = 1/2, so P(4 < X < 5) = 20/27 - 1/2 [1]

  2. 2

    P(3 < X < 5) = 2(20/27 - 1/2) = 13/27 [1]

Recap

  • A continuous random variable has probabilities given by areas under its density function.
  • Total area under f(x) is 1, and f(x) geqslant 0.
  • P(a < X < b) = int_a^(b) f(x) dx.
  • E(X) = int x f(x) dx.
  • Var(X) = int x² f(x) dx - [E(X)]².
  • Median: integrate f(x) from the start to m and equate to 0.5.
  • Symmetry about x = c gives mean and median c. Sketch before integrating.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. A random variable X has probability density function f(x) = kx for 0 leqslant x leqslant 4, and f(x) = 0 otherwise. Find k.3 marks
    Answer
    1. Area is 1: int₀⁴ kx dx = 1.
    2. k[x²/2]₀⁴ = 8k = 1, so k = 1/8.

    Trap: Setting f(4) = 4k = 1 treats 1 as a height. The area under the graph is 1.

  2. A random variable X has probability density function f(x) = 3/8 x² for 0 leqslant x leqslant 2, and f(x) = 0 otherwise. Find P(X > 1).3 marks
    Answer
    1. P(X > 1) = int₁² 3/8 x² dx.
    2. = 1/8[x³]₁² = 1/8(8 - 1) = 7/8.

    Trap: Integrating from 0 to 1 gives P(X < 1) = 1/8, the opposite event.

  3. A random variable X has probability density function f(x) = k/x³ for x geqslant 1, and f(x) = 0 otherwise. Find k, then find P(X > 3).4 marks
    Answer
    1. int₁^(∞) kx⁻³ dx = k[-1/2x²]₁^(∞) = k/2 = 1, so k = 2.
    2. P(X > 3) = int₃^(∞) 2x⁻³ dx = [-1/x²]₃^(∞) = 0 + 1/9 = 1/9.

    Trap: A sign slip in [-1/x²]₃^(∞), writing 0 - 1/9, gives a negative probability.

  4. The waiting time, T minutes, of a customer has probability density function f(t) = 1/50(10 - t) for 0 leqslant t leqslant 10, and f(t) = 0 otherwise. Find E(T).3 marks
    Answer
    1. E(T) = int₀¹⁰ t × 1/50(10 - t) dt = 1/50[5t² - t³/3]₀¹⁰.
    2. = 1/50(500 - 1000/3) = 10/3 minutes.

    Trap: Integrating f(t) instead of t f(t) gives 1, the total area.

  5. A random variable X has probability density function f(x) = 3/8 x² for 0 leqslant x leqslant 2, and f(x) = 0 otherwise. Find Var(X).5 marks
    Answer
    1. E(X) = int₀² 3/8 x³ dx = 3/32× 16 = 3/2.
    2. E(X²) = int₀² 3/8 x⁴ dx = 3/40× 32 = 12/5.
    3. Var(X) = 12/5 - (3/2)² = 3/20.

    Trap: Leaving the answer as E(X²) = 12/5 forgets to subtract the square of the mean.

  6. The probability density function of X is symmetrical about the line x = 6. Given that P(X < 8) = 0.85, find P(4 < X < 8).3 marks
    Answer
    1. Symmetry: P(X < 6) = 0.5.
    2. P(6 < X < 8) = 0.85 - 0.5 = 0.35.
    3. By symmetry P(4 < X < 6) = 0.35, so P(4 < X < 8) = 0.7.

    Trap: Stopping at P(6 < X < 8) = 0.35 answers only half of the interval.

  7. A random variable X has probability density function f(x) = x/2 for 0 leqslant x leqslant 2, and f(x) = 0 otherwise. Find the median of X, giving an exact value.3 marks
    Answer
    1. int₀^(m) x/2 dx = m²/4 = 0.5.
    2. m² = 2, so m = √2 (the negative root is outside the domain).

    Trap: Taking the median as the midpoint of the domain, 1, ignores the shape of the graph.

  8. A random variable X has probability density function f(x) = cx for 0 leqslant x leqslant a, and f(x) = 0 otherwise, where a and c are positive constants. It is given that E(X) = 4. Find a and c, and hence find Var(X).6 marks
    Answer
    1. Area is 1: ca²/2 = 1, so c = 2/a².
    2. E(X) = int₀^(a) cx² dx = ca³/3 = 4, so 2a/3 = 4, giving a = 6 and c = 1/18.
    3. E(X²) = int₀⁶ x³/18 dx = 18.
    4. Var(X) = 18 - 4² = 2.

    Trap: Using only E(X) = 4 gives one equation for two unknowns. The area equals 1 gives the second.

  9. The time, T hours, for which a battery lasts has probability density function f(t) = k/t² for 1 leqslant t leqslant 4, and f(t) = 0 otherwise. Find k, E(T) and the median of T. Hence find the probability that a battery lasts between the median and the mean, giving your answer to 3 significant figures.10 marks
    Answer
    1. int₁⁴ kt⁻² dt = k[-1/t]₁⁴ = 3k/4 = 1, so k = 4/3.
    2. E(T) = int₁⁴ t×4/3t² dt = 4/3[ln t]₁⁴ = 4/3ln 4 = 1.848… hours.
    3. Median: int₁^(m) 4/3t² dt = 4/3(1 - 1/m) = 0.5, so 1/m = 5/8 and m = 1.6 hours.
    4. P(T < E(T)) = 4/3(1 - 3/(4ln 4)) = 4/3 - 1/(ln 4) = 0.61198…
    5. P(m < T < E(T)) = 0.61198 - 0.5 = 0.112.

    Trap: Integrating from 0 instead of from the start of the domain, 1, is a reported error, and here the integral from 0 does not even exist.

  10. The error, X mm, in the length of a machined rod has probability density function f(x) = k(4 - x²) for -2 leqslant x leqslant 2, and f(x) = 0 otherwise. Find k and Var(X). Rods with an error of more than 1 mm either way are rejected: find the proportion rejected. It is also known that 20% of rods have X < -a. Find P(0 < X < a), illustrating your method with a sketch.11 marks
    Answer
    1. Area is 1: k[4x - x³/3]₋₂² = 32k/3 = 1, so k = 3/32.
    2. The curve is symmetrical about x = 0, so E(X) = 0.
    3. E(X²) = 3/32[4x³/3 - x⁵/5]₋₂² = 3/32×128/15 = 4/5, so Var(X) = 4/5 - 0² = 4/5.
    4. P(X > 1) = 3/32[4x - x³/3]₁² = 3/32×5/3 = 5/32.
    5. By symmetry P(X < -1) = 5/32 too, so the proportion rejected is 10/32 = 5/16.
    6. Sketch: area 0.2 left of -a, so by symmetry area 0.2 right of a, and P(0 < X < a) = 0.5 - 0.2 = 0.3.

    Trap: Stopping at P(X > 1) = 5/32 answers one tail only: examiners reported candidates who found this part answer and did not answer the question posed.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
Integrate f(x) to find the mean.Integrate x times f(x) to find the mean.
Var(X) = int x² f(x) dxVar(X) = int x² f(x) dx - [E(X)]², subtracting the square of the mean
P(X < 1.2) = int_1.2³ f(x) dxP(X < 1.2) = int₀^(1.2) f(x) dx, or 1 minus the integral from 1.2 to 3
The mean is 2 because (1+3)/2 = 2.The mean is 2 by the symmetry of the curve.

Frequently asked questions

How do I find the constant k in a probability density function?
Integrate f(x) over the whole domain and equate the result to 1, because the area under the graph is 1. Also check that f(x) is never negative. For f(x) = k(2x² − x³) on 0 ≤ x ≤ 2, the integral gives k × 4/3 = 1, so k = 3/4.
How do I find a probability from a probability density function?
A probability is an area under the graph, so integrate f(x) between the limits: P(a < X < b) = ∫ from a to b of f(x) dx. The limits must match the event. For f(x) = (9 − x²)/18 on 0 ≤ x ≤ 3, P(X < 1.2) = 0.568, or 71/125.
How do I find the variance of a continuous random variable?
Integrate x² f(x) over the domain, then subtract the square of the mean: Var(X) = ∫x² f(x) dx − [E(X)]². For f(x) = 3/8 x² on 0 ≤ x ≤ 2, E(X) = 3/2 and E(X²) = 12/5, so Var(X) = 3/20.
How do I find the median of a continuous random variable?
Integrate f(x) from the start of the domain to m and equate the result to 0.5, because the median splits the area in half. For f(x) = x/2 on 0 ≤ x ≤ 2, the integral gives m²/4 = 0.5, so m = √2, since the negative root is outside the domain.
How can symmetry help with probabilities from a density function?
If the graph is symmetrical about x = c, the mean and median are both c, and P(X < c) = 0.5. Sketch the graph and label the areas before any integration. If the graph is symmetrical about x = 4 and P(X < 5) = 20/27, then P(3 < X < 5) = 13/27.
What is a common mistake when finding the mean from a density function?
Some candidates integrate f(x) rather than x f(x). Integrating f(x) alone gives the total area, which is 1, not the mean, so the working must use the integral of x times f(x) over the domain.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters