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.
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.
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.
Never negative: \(f(x) \ge 0\) for every \(x\). (It may be bigger than 1; only areas must be at most 1.)
Total area 1: \(\int f(x)\,dx = 1\) over the whole domain. This finds an unknown constant.
Single values: \(\text{P}(X = a) = 0\), so \(\text{P}(X < a)\) and \(\text{P}(X \le a)\) are the same.
Infinite domain: e.g. \(f(x) = \dfrac{3}{x^{4}}\) for \(x \ge 1\); evaluate the integral as \(x \to \infty\).
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)\).
\(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)\).
The graph is symmetrical about \(x = 2\) (Fig. 1), so \(\text{E}(X) = 2\).
\(\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.
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.