Cambridge International AS & A Level · Topic 6.3
A-Level Maths 9709 / Topic 6.3 / AS & A Level

Probability as area.

Paper 6. A continuous random variable, such as a time or a length, can take any value in an interval, so single values have probability zero. Probability lives in the area under a density curve, and integration gives the mean, the variance and the median.

The key idea

A probability density function satisfies \(f(x) \ge 0\) and \(\displaystyle\int f(x)\,dx = 1\) over its domain. \(\text{P}(a < X < b) = \displaystyle\int_a^b f(x)\,dx\), \(\text{E}(X) = \displaystyle\int x f(x)\,dx\), \(\text{Var}(X) = \displaystyle\int x^{2} f(x)\,dx - \mu^{2}\), and the median \(m\) has half the area to its left.

12340 0.375 x f(x) 5/32 f(x) = (3/32)x(4 − x) total area = 1 mean = median = 2 by symmetry; variance 0.8
Fig. 1: the density f(x) = (3/32)x(4 − x) for 0 ≤ x ≤ 4, drawn to scale. The total area is 1 and the shaded area is P(X < 1) = 5/32
Section 01

What a density is.

For a continuous variable, \(f(x)\) is not a probability: it is a height, and probabilities are areas under it. The syllabus uses densities defined on one interval (possibly infinite) and zero elsewhere.

Worked example Finding the constant and a probability
\(X\) has density \(f(x) = kx(4 - x)\) for \(0 \le x \le 4\), and 0 otherwise. Find \(k\) and \(\text{P}(X < 1)\).
  1. \(\displaystyle\int_0^4 (4x - x^{2})\,dx = \left[2x^{2} - \tfrac{x^{3}}{3}\right]_0^4 = 32 - \tfrac{64}{3} = \tfrac{32}{3}\).
  2. Total area 1: \(k \times \tfrac{32}{3} = 1\), so \(k = \tfrac{3}{32}\).
  3. \(\text{P}(X < 1) = \tfrac{3}{32}\left[2x^{2} - \tfrac{x^{3}}{3}\right]_0^1 = \tfrac{3}{32} \times \tfrac{5}{3}\).
  4. \(= \tfrac{5}{32} = 0.15625\) (Fig. 1).
Answer: \(k = \tfrac{3}{32}\), \(\text{P}(X < 1) = \tfrac{5}{32} = 0.156\)
Worked example An infinite domain
\(f(x) = \dfrac{3}{x^{4}}\) for \(x \ge 1\), and 0 otherwise. Show that \(f\) is a density and find \(\text{P}(X > 2)\).
  1. \(f(x) > 0\) for \(x \ge 1\).
  2. \(\displaystyle\int_1^\infty 3x^{-4}\,dx = \left[-x^{-3}\right]_1^\infty = 0 - (-1) = 1\), so it is a density.
  3. \(\text{P}(X > 2) = \left[-x^{-3}\right]_2^\infty = 0 + \tfrac{1}{8}\).
Answer: \(\text{P}(X > 2) = \tfrac{1}{8} = 0.125\)
Examiner trap

\(f(2) = \tfrac{3}{8}\) is not \(\text{P}(X = 2)\). For a continuous variable that probability is 0; a value of \(f\) only becomes a probability after you integrate it over an interval.

Section 02

Mean and variance.

The formulas copy the discrete ones from Paper 5 with the sum replaced by an integral: \(\text{E}(X) = \int x f(x)\,dx\), \(\text{E}(X^{2}) = \int x^{2} f(x)\,dx\), \(\text{Var}(X) = \text{E}(X^{2}) - [\text{E}(X)]^{2}\). If the graph is symmetrical, the mean is on the line of symmetry.

Worked example A symmetrical density
For \(f(x) = \tfrac{3}{32}x(4 - x)\), \(0 \le x \le 4\), find \(\text{E}(X)\) and \(\text{Var}(X)\).
  1. The graph is symmetrical about \(x = 2\) (Fig. 1), so \(\text{E}(X) = 2\).
  2. \(\text{E}(X^{2}) = \tfrac{3}{32}\displaystyle\int_0^4 (4x^{3} - x^{4})\,dx = \tfrac{3}{32}\left[x^{4} - \tfrac{x^{5}}{5}\right]_0^4\).
  3. \(= \tfrac{3}{32}\left(256 - \tfrac{1024}{5}\right) = \tfrac{3}{32} \times \tfrac{256}{5} = 4.8\).
  4. \(\text{Var}(X) = 4.8 - 2^{2} = 0.8\).
Answer: \(\text{E}(X) = 2\), \(\text{Var}(X) = 0.8\)
Worked example Mean and variance on an infinite domain
For \(f(x) = \dfrac{3}{x^{4}}\), \(x \ge 1\), find \(\text{E}(X)\) and \(\text{Var}(X)\).
  1. \(\text{E}(X) = \displaystyle\int_1^\infty 3x^{-3}\,dx = \left[-\tfrac{3}{2}x^{-2}\right]_1^\infty = \tfrac{3}{2}\).
  2. \(\text{E}(X^{2}) = \displaystyle\int_1^\infty 3x^{-2}\,dx = \left[-3x^{-1}\right]_1^\infty = 3\).
  3. \(\text{Var}(X) = 3 - \left(\tfrac{3}{2}\right)^{2} = \tfrac{3}{4}\).
Answer: \(\text{E}(X) = 1.5\), \(\text{Var}(X) = 0.75\)
Your turn
\(f(x) = \tfrac{3}{8}x^{2}\) for \(0 \le x \le 2\). Find \(\text{E}(X)\).
Examiner trap

\(\text{Var}(X) = \int x^{2} f(x)\,dx\) is NOT the variance until you subtract \(\mu^{2}\). Leaving the answer as 4.8 above is the most frequent lost mark.

Stage 1 · Learn

Check your understanding

Four quick checks. Each correct answer earns XP and records this skill on your profile.

Quick check+10 XP

\(X\) is a continuous random variable. What is \(\text{P}(X = 2)\)?

Quick check+10 XP

\(f(x) = k\) for \(0 \le x \le 5\), and 0 otherwise. Find \(k\).

Quick check+10 XP

Which expression gives \(\text{E}(X)\) for a density \(f(x)\) on \(a \le x \le b\)?

Quick check+10 XP

The median \(m\) of a continuous distribution on \(a \le x \le b\) satisfies which equation?

Section 03

Median and percentiles.

The median \(m\) splits the area in half: \(\int_{\text{lower limit}}^{m} f(x)\,dx = 0.5\). Other percentiles work the same way, e.g. the upper quartile \(q\) has area 0.75 to its left. Solve the resulting equation and keep the root that lies in the domain.

Worked example Median and upper quartile
\(f(x) = \tfrac{x}{8}\) for \(0 \le x \le 4\). Find the median and the upper quartile.
  1. \(\displaystyle\int_0^m \tfrac{x}{8}\,dx = \tfrac{m^{2}}{16}\).
  2. Median: \(\tfrac{m^{2}}{16} = 0.5\), so \(m^{2} = 8\) and \(m = 2\sqrt{2}\) (the negative root is outside the domain).
  3. Upper quartile: \(\tfrac{q^{2}}{16} = 0.75\), so \(q^{2} = 12\) and \(q = 2\sqrt{3}\).
Answer: median \(2\sqrt{2} = 2.83\), upper quartile \(2\sqrt{3} = 3.46\)
Worked example Median on an infinite domain
For \(f(x) = \dfrac{3}{x^{4}}\), \(x \ge 1\), find the median.
  1. \(\displaystyle\int_1^m 3x^{-4}\,dx = \left[-x^{-3}\right]_1^m = 1 - m^{-3}\).
  2. \(1 - m^{-3} = 0.5\), so \(m^{3} = 2\).
Answer: \(m = \sqrt[3]{2} = 1.26\) (3 s.f.), less than the mean 1.5 because the tail stretches to the right
Examiner trap

The median is not half-way along the domain. For \(f(x) = \tfrac{x}{8}\) on \([0, 4]\) it is \(2.83\), not \(2\): more of the area sits on the right where the density is higher.

Stage 2 · Exam

Exam-style questions

Unlocks once the four checks above are done. Worth more XP, written to AS & A Level Paper 1 to 6 standard.

Finish the four checks above to unlock the exam questions
Exam style+20 XP

\(f(x) = kx^{2}\) for \(0 \le x \le 2\), and 0 otherwise. Find \(k\).

Exam style+20 XP

\(f(x) = \tfrac{3}{8}x^{2}\) for \(0 \le x \le 2\). Find \(\text{Var}(X)\).

Exam style+20 XP

\(f(x) = \tfrac{3}{8}x^{2}\) for \(0 \le x \le 2\). Find the median of \(X\).

Exam style+20 XP

\(f(x) = \dfrac{k}{x^{3}}\) for \(x \ge 2\), and 0 otherwise. Find \(\text{P}(X > 4)\).

Skill unlocked

Densities integrated.

This skill is now recorded on your profile. Keep the chain going.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
Properties, finding k, probabilities, mean and variance, a median from a quadratic, an infinite domain, and a repair-time model.