The shape of the lesson
By the end of the lesson, learners can
- What makes a valid pdf: For a continuous random variable \(X\), probability is area under the pdf: \(P(a < X < b) = \displaystyle\int_{a}^{b} f(x)\,dx\).
- From pdf to CDF and back: The CDF is the running total of area: \(F(x) = P(X \le x) = \displaystyle\int_{-\infty}^{x} f(t)\,dt\).
- Median, percentiles and the mode: The median \(m\) splits the area in half: \(F(m) = 0.5\).
- Check the pdf: every piece non-negative, total area 1 (this finds \(k\)).
- Build F piece by piece, adding the area already collected so the pieces join; state \(F = 0\) below and \(F = 1\) above the range.
- Probabilities: \(P(a < X < b) = F(b) - F(a)\), using the correct piece for each value.
- Percentiles: find \(F\) at the boundaries to choose the piece, solve \(F(q) = p\) and keep the root inside that interval.
- Mode: the greatest value of \(f\), from \(f'(x) = 0\), an endpoint or a jump; pdf from CDF: \(f = F'\).
One picture every idea returns to
A pdf \(f\) satisfies \(f(x) \ge 0\) everywhere and \(\displaystyle\int f(x)\,dx = 1\) over its whole range. The CDF is \(F(x) = P(X \le x) = \displaystyle\int_{-\infty}^{x} f(t)\,dt\), so \(f(x) = F'(x)\). Then \(P(a < X < b) = F(b) - F(a)\), and the \(p\)th percentile is the value \(q\) with \(F(q) = p\) (the median solves \(F(m) = 0.5\)). The mode is where \(f\) is greatest.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open with the question in the title, Area under f, height of F.. A probability density function describes a continuous random variable by area; its cumulative distribution function \(F(x) = P(X \le x)\) adds that area up as you move to the right. Put the figure on the board: it is the one picture every idea in the lesson returns to. | Whole class, then pairs |
| 5 to 13 min | Teach and check: What makes a valid pdf | For a continuous random variable \(X\), probability is area under the pdf: \(P(a < X < b) = \displaystyle\int_{a}^{b} f(x)\,dx\). Model the worked example Find k, then a probability on the board, one line at a time. Your turn: \(X\) has pdf \(f(x) = k(x + 1)\) for \(0 \le x \le 2\), and \(0\) otherwise. Find \(k\). | Whole class, then pairs |
| 13 to 21 min | Teach and check: From pdf to CDF and back | The CDF is the running total of area: \(F(x) = P(X \le x) = \displaystyle\int_{-\infty}^{x} f(t)\,dt\). Model the worked example CDF of the piecewise pdf in Fig. 1 on the board, one line at a time. Your turn: \(X\) has CDF \(F(x) = \tfrac{1}{27}x^{3}\) for \(0 \le x \le 3\) (with \(0\) below and \(1\) above). Find \(f(x)\) and \(P(X > 2)\). | Pairs |
| 21 to 30 min | Teach and check: Median, percentiles and the mode | The median \(m\) splits the area in half: \(F(m) = 0.5\). Model the worked example Median and quartiles of a piecewise pdf on the board, one line at a time. Your turn: \(X\) has pdf \(f(x) = \tfrac{3}{8}x^{2}\) for \(0 \le x \le 2\). Find the 90th percentile. | Frayer Model |
| 30 to 36 min | Check | The four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong. | Individual, then whole class |
| 36 to 43 min | Plenary | The exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording. | Individual, random call |
| 43 to 45 min | Exit and homework | Set the worksheet below (6 questions, 31 marks). Learners self-assess against the objectives before they leave. | Individual |
Protect the parts that carry the learning
The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.
Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.
Cut first if the build overruns: the last check in Median, percentiles and the mode, never the check or the plenary.
In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.
Frayer Model
Pairs fill a four-box grid for the key term: definition, characteristics, examples and non-examples. The non-examples box is where the misconceptions surface, so give it the most time.
The full structure, with its PIES check and a worked example for every subject, is on the cooperative-learning page, one of fifteen structures there.
What to head off, and how
| Trap learners fall into | Teaching move that pre-empts it |
|---|---|
| Area 1 is not enough. \(f(x) = x - \tfrac{1}{2}\) on \(0 \le x \le 2\) has total area exactly 1, but it is negative for \(0 \le x < \tfrac{1}{2}\), so it is NOT a pdf. | Always check the sign of every piece as well as the area. |
| Do not restart each piece of \(F\) from zero. | Integrating \(\tfrac{1}{2}\) on its own gives \(\tfrac{1}{2}x\), and then \(F(3) = \tfrac{3}{2}\): impossible for a probability. Check that adjacent pieces agree at the boundary and that \(F\) equals 1 at the top of the range. |
| The median solves \(F(m) = 0.5\), NOT \(f(m) = 0.5\): the height of the pdf is not a probability. | And when you solve a quadratic for a percentile, reject the root outside the interval of the piece you used, even if it is positive. |
PDFs, CDFs and percentiles: worksheet
6 questions, 31 marks. Written in the style of the papers; no past paper question is reproduced.
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)\).
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)\).
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\).
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\).
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.
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.
Answer key and marking notes
- (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}\).
- (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}\).
- (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.).
- (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]\).
- (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.).
- (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.).
8 multiple-choice questions on this lesson
From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.
\(X\) has pdf \(f(x) = k(x^{2} + 1)\) for \(0 \le x \le 3\), and \(f(x) = 0\) otherwise. Find the value of \(k\).
- A\(k = \tfrac{1}{12}\)
- B\(k = \tfrac{1}{9}\)
- C\(k = \tfrac{1}{10}\)
- D\(k = \tfrac{1}{30}\)
\(X\) has CDF \(F(x) = \tfrac{1}{10}(x^{3} + x)\) for \(0 \le x \le 2\), with \(F(x) = 0\) for \(x < 0\) and \(F(x) = 1\) for \(x > 2\). Find \(P(X > 1.5)\).
- A\(0.5125\)
- B\(0.4875\)
- C\(0.225\)
- D\(0.775\)
\(X\) has CDF \(F(x) = \tfrac{1}{12}(x^{2} - 4)\) for \(2 \le x \le 4\), with \(F(x) = 0\) for \(x < 2\) and \(F(x) = 1\) for \(x > 4\). Which is the pdf of \(X\) for \(2 \le x \le 4\)?
- A\(f(x) = \tfrac{1}{12}x\)
- B\(f(x) = \tfrac{1}{6}(x - 2)\)
- C\(f(x) = \tfrac{1}{6}x\)
- D\(f(x) = \tfrac{1}{36}(x^{3} - 12x)\)
\(X\) has pdf \(f(x) = \tfrac{1}{8}x\) for \(0 \le x \le 4\), and \(f(x) = 0\) otherwise. Find the median of \(X\).
- A\(\tfrac{8}{3}\)
- B\(2\)
- C\(2\sqrt{2}\)
- D\(4\)
\(X\) has pdf \(f(x) = kx\) for \(0 \le x \le 1\), \(f(x) = k\) for \(1 < x \le 3\), and \(f(x) = 0\) otherwise. Find the median of \(X\).
- A\(1.5\)
- B\(1.75\)
- C\(2\)
- D\(1.25\)
\(X\) has CDF \(F(x) = 1 - \dfrac{1}{x^{2}}\) for \(x \ge 1\), and \(F(x) = 0\) for \(x < 1\). Find the 90th percentile of \(X\), correct to 3 significant figures.
- A\(1.31\)
- B\(10.0\)
- C\(3.16\)
- D\(1.05\)
\(X\) has pdf \(f(x) = \tfrac{4}{27}x(3 - x)^{2}\) for \(0 \le x \le 3\), and \(f(x) = 0\) otherwise. Find the mode and the median of \(X\) (median to 3 s.f.).
- Amode \(3\), median \(1.16\)
- Bmode \(1\), median \(1.50\)
- Cmode \(1\), median \(1.20\)
- Dmode \(1\), median \(1.16\)
\(X\) has pdf \(f(x) = a + bx\) for \(0 \le x \le 2\), and \(f(x) = 0\) otherwise, where \(a\) and \(b\) are constants. Given that \(P(X < 1) = 0.4\), find \(a\) and \(b\).
- A\(a = 0.3,\ b = 0.2\)
- B\(a = 0.3,\ b = 0.1\)
- C\(a = 0.2,\ b = 0.3\)
- D\(a = 0.7,\ b = -0.2\)
Quiz key
\(\displaystyle\int_{0}^{3} k(x^{2} + 1)\,dx = k\left[\tfrac{1}{3}x^{3} + x\right]_{0}^{3} = k(9 + 3) = 12k = 1\), so \(k = \tfrac{1}{12}\). \(\tfrac{1}{9}\) integrates only the \(x^{2}\) term and drops the \(+1\). \(\tfrac{1}{10}\) sets the height \(f(3) = 10k\) equal to 1 instead of the area. \(\tfrac{1}{30}\) integrates \(x^{2}\) to \(x^{3}\), forgetting to divide by 3.
\(F(1.5) = \tfrac{1}{10}(3.375 + 1.5) = 0.4875\), so \(P(X > 1.5) = 1 - F(1.5) = 0.5125\). \(0.4875\) is \(P(X \le 1.5)\), forgetting to subtract from 1. \(0.775\) is the pdf value \(f(1.5) = \tfrac{1}{10}(3x^{2} + 1)\), a height and not a probability, and \(0.225\) is \(1 - f(1.5)\), the same mix-up.
\(f(x) = F'(x) = \tfrac{1}{12}(2x) = \tfrac{1}{6}x\); check: \(\int_{2}^{4} \tfrac{1}{6}x\,dx = \tfrac{1}{12}(16 - 4) = 1\). \(\tfrac{1}{12}x\) forgets the factor 2 from \(x^{2}\). \(\tfrac{1}{6}(x - 2)\) differentiates the constant \(-4\) as if it were \(-4x\). \(\tfrac{1}{36}(x^{3} - 12x)\) integrates \(F\) instead of differentiating it.
\(F(x) = \int_{0}^{x} \tfrac{1}{8}t\,dt = \tfrac{1}{16}x^{2}\). \(\tfrac{1}{16}m^{2} = 0.5\) gives \(m^{2} = 8\) and \(m = 2\sqrt{2} \approx 2.83\). \(2\) is the midpoint of the range, which is the median only for a symmetric pdf. \(\tfrac{8}{3}\) is the mean \(E(X) = \int_{0}^{4} \tfrac{1}{8}x^{2}\,dx\). \(4\) solves \(f(m) = 0.5\), using the pdf instead of the CDF.
Total area \(\tfrac{1}{2}k + 2k = \tfrac{5}{2}k = 1\), so \(k = \tfrac{2}{5}\) and \(F(1) = \tfrac{1}{5}\). For \(1 < x \le 3\), \(F(x) = \tfrac{1}{5} + \tfrac{2}{5}(x - 1)\). Setting this equal to 0.5 gives \(x - 1 = 0.75\), so \(m = 1.75\). \(2\) comes from \(k = \tfrac{1}{3}\), taking the triangle's area as \(k\) instead of \(\tfrac{1}{2}k\). \(1.5\) is the midpoint of the range \(0\) to \(3\). \(1.25\) uses \(F(x) = \tfrac{2}{5}x\) on the second piece, forgetting that it must start from \(F(1) = \tfrac{1}{5}\).
\(1 - \dfrac{1}{q^{2}} = 0.9\) gives \(\dfrac{1}{q^{2}} = 0.1\), so \(q^{2} = 10\) and \(q = \sqrt{10} \approx 3.16\). \(1.05\) solves \(\dfrac{1}{q^{2}} = 0.9\), which is the 10th percentile. \(10.0\) stops at \(q^{2} = 10\) without the square root. \(1.31\) solves \(f(q) = \dfrac{2}{q^{3}} = 0.9\), using the pdf instead of the CDF.
\(\dfrac{d}{dx}\big[x(3 - x)^{2}\big] = (3 - x)^{2} - 2x(3 - x) = (3 - x)(3 - 3x)\), which is zero at \(x = 1\) (a maximum, \(f(1) = \tfrac{16}{27}\)) and \(x = 3\) (where \(f = 0\)). So the mode is 1. \(F(x) = \tfrac{4}{27}\left(\tfrac{9}{2}x^{2} - 2x^{3} + \tfrac{1}{4}x^{4}\right)\), and \(F(m) = 0.5\) gives \(m \approx 1.16\). Mode 3 takes the stationary point at the end of the range, where the density is zero. Median 1.50 is the midpoint of the range, but this pdf is skewed. Median 1.20 is the mean \(E(X) = 1.2\), not the median.
Total area: \(\int_{0}^{2} (a + bx)\,dx = 2a + 2b = 1\), so \(a + b = 0.5\). \(P(X < 1) = \int_{0}^{1} (a + bx)\,dx = a + \tfrac{1}{2}b = 0.4\). Subtracting, \(\tfrac{1}{2}b = 0.1\), so \(b = 0.2\) and \(a = 0.3\) (and \(f \ge 0\) on the range). \(a = 0.2,\ b = 0.3\) swaps the two constants. \(a = 0.3,\ b = 0.1\) integrates \(bx\) to \(bx^{2}\), dropping the \(\tfrac{1}{2}\). \(a = 0.7,\ b = -0.2\) uses the area from 1 to 2 as 0.4, which is \(P(X > 1)\).
Slides for this lesson
A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.