AS & A Level · Practice questions · PDFs, CDFs and percentiles

Integrate, then solve F = p.

Six original Cambridge-style questions on continuous random variables: valid pdfs, piecewise CDFs that join up, pdfs from CDFs, probabilities, the median, quartiles and percentiles, and the mode.

Original questions All questions on this page are original work, written in the Cambridge AS & A Level style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
The method

Area 1, build \(F\), then solve \(F = p\).

01
Recall
[3 marks]

The continuous random variable \(X\) has pdf \(f(x) = k(x + 1)\) for \(0 \le x \le 2\), and \(f(x) = 0\) otherwise.

(a) Find the value of \(k\).

(b) Find \(P(X < 1)\).

  • (a) \(\displaystyle\int_{0}^{2} k(x + 1)\,dx = k\Big[\tfrac{1}{2}x^{2} + x\Big]_{0}^{2} = 4k = 1\), so \(k = \tfrac{1}{4}\). ✓
  • (b) \(P(X < 1) = \tfrac{1}{4}\Big[\tfrac{1}{2}x^{2} + x\Big]_{0}^{1} = \tfrac{1}{4} \times \tfrac{3}{2} = \tfrac{3}{8}\). ✓
02
Calculation
[5 marks]

The continuous random variable \(X\) has cumulative distribution function

\[F(x) = \begin{cases} 0 & x < 0 \\ \tfrac{1}{3}x & 0 \le x < 1 \\ 1 - \tfrac{1}{6}(3 - x)^{2} & 1 \le x \le 3 \\ 1 & x > 3 \end{cases}\]

(a) Find the pdf of \(X\) and sketch it.

(b) State the mode of \(X\).

(c) Find \(P(X > 2)\).

  • (a) Differentiate each piece: \(f(x) = \tfrac{1}{3}\) for \(0 \le x < 1\), \(f(x) = \tfrac{1}{3}(3 - x)\) for \(1 \le x \le 3\), \(0\) otherwise. ✓
  • Sketch: a horizontal segment at height \(\tfrac{1}{3}\) from 0 to 1, a jump up to \(\tfrac{2}{3}\) at \(x = 1\), then a straight line down to \((3, 0)\). ✓
  • Check: \(F\) is continuous, since \(\tfrac{1}{3}(1) = 1 - \tfrac{1}{6}(2)^{2} = \tfrac{1}{3}\) at \(x = 1\). ✓
  • (b) \(f\) is greatest at \(x = 1\), where \(f = \tfrac{2}{3}\): the mode is \(1\). ✓
  • (c) \(P(X > 2) = 1 - F(2) = \tfrac{1}{6}(3 - 2)^{2} = \tfrac{1}{6}\). ✓
03
Calculation
[5 marks]

The continuous random variable \(X\) has pdf \(f(x) = \tfrac{2}{9}x\) for \(0 \le x \le 3\), and \(f(x) = 0\) otherwise.

(a) Find \(F(x)\) for all \(x\).

(b) Find the median and the interquartile range of \(X\).

(c) Find the 90th percentile of \(X\).

  • (a) \(F(x) = 0\) for \(x < 0\), \(F(x) = \tfrac{1}{9}x^{2}\) for \(0 \le x \le 3\), \(F(x) = 1\) for \(x > 3\). ✓
  • (b) Median: \(\tfrac{1}{9}m^{2} = \tfrac{1}{2} \Rightarrow m = \sqrt{4.5} = \tfrac{3}{\sqrt{2}} = 2.12\) (3 s.f.), taking the positive root. ✓
  • Quartiles: \(q^{2} = \tfrac{9}{4} \Rightarrow Q_{1} = 1.5\); \(q^{2} = \tfrac{27}{4} \Rightarrow Q_{3} = \tfrac{3\sqrt{3}}{2} = 2.598\). ✓
  • Interquartile range \(= 2.598 - 1.5 = 1.10\) (3 s.f.). ✓
  • (c) \(\tfrac{1}{9}q^{2} = 0.9 \Rightarrow q^{2} = 8.1 \Rightarrow q = 2.85\) (3 s.f.). ✓
04
Analysis
[6 marks]

The continuous random variable \(X\) has pdf

\[f(x) = \begin{cases} \tfrac{1}{2}x & 0 \le x \le 1 \\ \tfrac{1}{2} & 1 < x \le 2 \\ \tfrac{1}{2}(3 - x) & 2 < x \le 3 \\ 0 & \text{otherwise} \end{cases}\]

(a) Sketch the graph of \(f\).

(b) Find \(F(x)\) for all \(x\).

(c) Find the median and the 90th percentile of \(X\).

  • (a) A trapezium: up from \((0, 0)\) to \((1, \tfrac{1}{2})\), level to \((2, \tfrac{1}{2})\), down to \((3, 0)\); zero elsewhere. ✓
  • (b) \(0 \le x \le 1\): \(F(x) = \tfrac{1}{4}x^{2}\), so \(F(1) = \tfrac{1}{4}\). ✓
  • \(1 < x \le 2\): \(F(x) = \tfrac{1}{4} + \tfrac{1}{2}(x - 1) = \tfrac{1}{4}(2x - 1)\), so \(F(2) = \tfrac{3}{4}\). ✓
  • \(2 < x \le 3\): by the triangle to the right of \(x\), \(F(x) = 1 - \tfrac{1}{4}(3 - x)^{2}\). With \(F(x) = 0\) for \(x < 0\) and \(1\) for \(x > 3\). ✓
  • (c) \(F(1) = \tfrac{1}{4} < \tfrac{1}{2} < \tfrac{3}{4} = F(2)\), so the median is on the middle piece: \(\tfrac{1}{4}(2m - 1) = \tfrac{1}{2} \Rightarrow m = 1.5\) (as symmetry suggests). ✓
  • \(0.9 > F(2)\), so use the last piece: \((3 - q)^{2} = 0.4\), \(q = 3 - \sqrt{0.4} = 2.37\) (3 s.f.), rejecting \(3 + \sqrt{0.4}\), which is outside \([2, 3]\). ✓
05
Analysis
[5 marks]

The continuous random variable \(X\) has pdf \(f(x) = a + bx\) for \(0 \le x \le 2\), and \(f(x) = 0\) otherwise, where \(a\) and \(b\) are constants. It is given that \(P(X < 1) = \tfrac{1}{3}\).

(a) Find \(a\) and \(b\).

(b) Find the median of \(X\), giving your answer to 3 significant figures.

  • (a) Total area: \(\displaystyle\int_{0}^{2} (a + bx)\,dx = 2a + 2b = 1\). ✓
  • \(P(X < 1) = \displaystyle\int_{0}^{1} (a + bx)\,dx = a + \tfrac{1}{2}b = \tfrac{1}{3}\). ✓
  • From the first, \(a + b = \tfrac{1}{2}\); subtracting, \(\tfrac{1}{2}b = \tfrac{1}{6}\), so \(b = \tfrac{1}{3}\) and \(a = \tfrac{1}{6}\). Then \(f(x) = \tfrac{1}{6}(1 + 2x) \ge 0\) on \([0, 2]\). ✓
  • (b) \(F(x) = \tfrac{1}{6}(x + x^{2})\). Median: \(\tfrac{1}{6}(m + m^{2}) = \tfrac{1}{2} \Rightarrow m^{2} + m - 3 = 0\). ✓
  • \(m = \dfrac{-1 \pm \sqrt{13}}{2}\); only the positive root lies in \([0, 2]\): \(m = 1.30\) (3 s.f.). ✓
06
Analysis
[7 marks]

The time, \(T\) hours, that a technician takes to repair a machine is modelled by the pdf \(f(t) = k(9 - t^{2})\) for \(0 \le t \le 3\), and \(f(t) = 0\) otherwise.

(a) Show that \(k = \tfrac{1}{18}\) and state the mode of \(T\).

(b) Find the probability that a repair takes more than 2 hours.

(c) Show that the median repair time lies between 1 hour and 1.5 hours, and find it to 3 significant figures.

  • (a) \(\displaystyle\int_{0}^{3} (9 - t^{2})\,dt = \Big[9t - \tfrac{1}{3}t^{3}\Big]_{0}^{3} = 27 - 9 = 18\), so \(18k = 1\) and \(k = \tfrac{1}{18}\). ✓
  • \(f(t) = \tfrac{1}{18}(9 - t^{2})\) decreases on \([0, 3]\), so it is greatest at \(t = 0\): the mode is \(0\). ✓
  • (b) \(F(t) = \tfrac{1}{18}\big(9t - \tfrac{1}{3}t^{3}\big) = \dfrac{27t - t^{3}}{54}\), so \(P(T > 2) = 1 - \dfrac{54 - 8}{54} = \dfrac{8}{54} = \dfrac{4}{27}\). ✓
  • (c) \(F(1) = \tfrac{26}{54} = 0.481 < 0.5\) and \(F(1.5) = \dfrac{40.5 - 3.375}{54} = 0.6875 > 0.5\). \(F\) is continuous and increasing, so the median lies between 1 and 1.5. ✓
  • \(F(m) = \tfrac{1}{2}\) gives \(m^{3} - 27m + 27 = 0\); solving numerically in \((1, 1.5)\) gives \(m = 1.04\) hours (3 s.f.). ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.