Teachers' Portal  /  A-Level Maths 9709  /  Continuous random variables  /  Probability density functions, mean and variance
Lesson pack · A-Level Maths 9709 · 6.3 · AS & A Level

Probability density functions, mean and variance

Probability as area. Paper 6.

Student lesson
At a glance

The shape of the lesson

Topic
Continuous random variables
Syllabus reference
Cambridge International AS and A Level Mathematics 9709, 6.3
Level
AS & A Level
Duration
45 minutes, lab-led; stretches to a 60 minute block (see the contingency notes)
Position in topic
Lesson 1 of 1 in Continuous random variables
Central model
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
Cooperative structure
Assessment
Stage 1 check and the exam-style plenary from the student lesson, plus the worksheet as the exit task
Learning objectives

By the end of the lesson, learners can

Section by section
  • What a density is: For a continuous variable, \(f(x)\) is not a probability: it is a height, and probabilities are areas under it.
  • 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}\).
  • Median and percentiles: The median \(m\) splits the area in half: \(\int_{\text{lower limit}}^{m} f(x)\,dx = 0.5\).
Key points to leave on the board
  • Unknown constant: set the integral over the whole domain equal to 1.
  • Probability: integrate \(f\) over the interval; end points do not matter.
  • Mean: \(\int x f(x)\,dx\), or use symmetry and say so.
  • Variance: \(\int x^{2} f(x)\,dx - \mu^{2}\).
  • Median or percentile: area to the left equals 0.5 (or the percentage); reject roots outside the domain.
  • Infinite domain: use \(x^{-n} \to 0\) as \(x \to \infty\).
The core visual model

One picture every idea returns to

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
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen with the question in the title, Probability as area.. Paper 6. 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 minTeach and check: What a density isFor a continuous variable, \(f(x)\) is not a probability: it is a height, and probabilities are areas under it. Model the worked example Finding the constant and a probability on the board, one line at a time.Whole class, then pairs
13 to 21 minTeach and check: Mean and varianceThe 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}\). Model the worked example A symmetrical density on the board, one line at a time. Your turn: \(f(x) = \tfrac{3}{8}x^{2}\) for \(0 \le x \le 2\). Find \(\text{E}(X)\).Pairs
21 to 30 minTeach and check: Median and percentilesThe median \(m\) splits the area in half: \(\int_{\text{lower limit}}^{m} f(x)\,dx = 0.5\). Model the worked example Median and upper quartile on the board, one line at a time.Anticipation / Reaction Guide
30 to 36 minCheckThe 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 minPlenaryThe 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 minExit and homeworkSet the worksheet below (6 questions, 25 marks). Learners self-assess against the objectives before they leave.Individual
Timing and contingency

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 and percentiles, 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.

Running the cooperative task

Anticipation / Reaction Guide

Before the lesson, students mark five statements true or false. After the teaching they mark them again and justify any change of mind in one sentence each. The statements come from the examiner traps below.

The full structure, with its variations and the other twelve, is on the cooperative-learning page.

Examiner traps to pre-empt

What to head off, and how

Trap learners fall intoTeaching move that pre-empts it
\(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.
\(\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.
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.
Worksheet

Probability density functions, mean and variance: worksheet

6 questions, 25 marks. Written in the style of the papers; no past paper question is reproduced.

NameClassDate
Q1 · recall[2 marks]

State two properties that a function \(f\) must have to be a probability density function on \(a \le x \le b\).

Q2 · calculation[3 marks]

\(f(x) = k(x + 1)\) for \(0 \le x \le 2\), and 0 otherwise. Find \(k\) and \(\text{P}(X > 1)\).

Q3 · calculation[4 marks]

For the density in the previous question, \(f(x) = \tfrac{1}{4}(x + 1)\), \(0 \le x \le 2\), find \(\text{E}(X)\) and \(\text{Var}(X)\).

Q4 · analysis[3 marks]

For \(f(x) = \tfrac{1}{4}(x + 1)\), \(0 \le x \le 2\), find the median of \(X\), giving your answer in exact form.

Q5 · analysis[5 marks]

\(f(x) = \dfrac{4}{x^{5}}\) for \(x \ge 1\), and 0 otherwise. Find \(\text{E}(X)\), \(\text{Var}(X)\) and the median of \(X\).

Q6 · analysis[8 marks]

The time, \(X\) hours, to repair a machine has density \(f(x) = k(9 - x^{2})\) for \(0 \le x \le 3\), and 0 otherwise.

(a) Show that \(k = \tfrac{1}{18}\).

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

(c) Find the mean repair time.

(d) Show that the median \(m\) satisfies \(m^{3} - 27m + 27 = 0\), and find \(m\) to 3 significant figures.

Answer key and marking notes
Q1 · 2 marks
  • \(f(x) \ge 0\) for all \(x\) in \(a \le x \le b\).
  • \(\displaystyle\int_a^b f(x)\,dx = 1\).
Q2 · 3 marks
  • \(\displaystyle\int_0^2 (x + 1)\,dx = \left[\tfrac{x^{2}}{2} + x\right]_0^2 = 4\), so \(k = \tfrac{1}{4}\).
  • \(\text{P}(X > 1) = \tfrac{1}{4}\left[\tfrac{x^{2}}{2} + x\right]_1^2 = \tfrac{1}{4}(4 - 1.5) = 0.625\).
Q3 · 4 marks
  • \(\text{E}(X) = \tfrac{1}{4}\displaystyle\int_0^2 (x^{2} + x)\,dx = \tfrac{1}{4}\left(\tfrac{8}{3} + 2\right) = \tfrac{7}{6}\).
  • \(\text{E}(X^{2}) = \tfrac{1}{4}\displaystyle\int_0^2 (x^{3} + x^{2})\,dx = \tfrac{1}{4}\left(4 + \tfrac{8}{3}\right) = \tfrac{5}{3}\).
  • \(\text{Var}(X) = \tfrac{5}{3} - \tfrac{49}{36} = \tfrac{11}{36} = 0.306\) (3 s.f.).
Q4 · 3 marks
  • \(\tfrac{1}{4}\left(\tfrac{m^{2}}{2} + m\right) = 0.5\), so \(m^{2} + 2m - 4 = 0\).
  • \(m = \dfrac{-2 \pm \sqrt{20}}{2} = -1 \pm \sqrt{5}\).
  • Only \(m = \sqrt{5} - 1 = 1.24\) lies in \(0 \le m \le 2\).
Q5 · 5 marks
  • \(\text{E}(X) = \displaystyle\int_1^\infty 4x^{-4}\,dx = \left[-\tfrac{4}{3}x^{-3}\right]_1^\infty = \tfrac{4}{3}\).
  • \(\text{E}(X^{2}) = \displaystyle\int_1^\infty 4x^{-3}\,dx = \left[-2x^{-2}\right]_1^\infty = 2\), so \(\text{Var}(X) = 2 - \tfrac{16}{9} = \tfrac{2}{9}\).
  • Median: \(\left[-x^{-4}\right]_1^m = 1 - m^{-4} = 0.5\), so \(m^{4} = 2\) and \(m = \sqrt[4]{2} = 1.19\) (3 s.f.).
Q6 · 8 marks
  • (a) \(\displaystyle\int_0^3 (9 - x^{2})\,dx = \left[9x - \tfrac{x^{3}}{3}\right]_0^3 = 27 - 9 = 18\), so \(18k = 1\), \(k = \tfrac{1}{18}\).
  • (b) \(\tfrac{1}{18}\left[9x - \tfrac{x^{3}}{3}\right]_2^3 = \tfrac{1}{18}\left(18 - \tfrac{46}{3}\right) = \tfrac{1}{18} \times \tfrac{8}{3} = \tfrac{4}{27} = 0.148\).
  • (c) \(\tfrac{1}{18}\displaystyle\int_0^3 (9x - x^{3})\,dx = \tfrac{1}{18}\left(\tfrac{81}{2} - \tfrac{81}{4}\right) = \tfrac{81}{72} = 1.125\) hours.
  • (d) \(\tfrac{1}{18}\left(9m - \tfrac{m^{3}}{3}\right) = 0.5\), so \(9m - \tfrac{m^{3}}{3} = 9\); multiply by 3: \(27m - m^{3} = 27\), i.e. \(m^{3} - 27m + 27 = 0\).
  • Solving (the root between 0 and 3): \(m = 1.04\) (3 s.f.).
Quiz

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.

Q11 mark

The random variable \(X\) has probability density function \(f(x) = kx^{3}\) for \(0 \le x \le 2\), and \(f(x) = 0\) otherwise. Find the value of \(k\).

  • A\(\dfrac{1}{4}\)
  • B\(\dfrac{1}{8}\)
  • C\(\dfrac{1}{16}\)
  • D\(4\)
Q21 mark

\(X\) has probability density function \(f(x) = \dfrac{x}{18}\) for \(0 \le x \le 6\), and \(f(x) = 0\) otherwise. Find \(\text{P}(2 < X < 4)\).

  • A\(\dfrac{1}{3}\)
  • B\(\dfrac{1}{9}\)
  • C\(\dfrac{4}{9}\)
  • D\(\dfrac{1}{2}\)
Q31 mark

\(X\) has probability density function \(f(x) = \dfrac{x}{18}\) for \(0 \le x \le 6\), and \(f(x) = 0\) otherwise. Find \(\text{E}(X)\).

  • A\(4\)
  • B\(3\)
  • C\(18\)
  • D\(2\)
Q41 mark

\(X\) has probability density function \(f(x) = \dfrac{3}{64}x^{2}\) for \(0 \le x \le 4\), and \(f(x) = 0\) otherwise. Given that \(\text{E}(X) = 3\), find \(\text{Var}(X)\).

  • A\(0.6\)
  • B\(9.6\)
  • C\(6.6\)
  • D\(0.775\)
Q51 mark

\(X\) has probability density function \(f(x) = \dfrac{3}{64}x^{2}\) for \(0 \le x \le 4\), and \(f(x) = 0\) otherwise. Find the median of \(X\), correct to 3 significant figures.

  • A\(3.17\)
  • B\(2\)
  • C\(3\)
  • D\(2.52\)
Q61 mark

\(X\) has probability density function \(f(x) = \dfrac{k}{x^{4}}\) for \(x \ge 2\), and \(f(x) = 0\) otherwise. Find \(\text{E}(X)\).

  • A\(3\)
  • B\(0.375\)
  • C\(12\)
  • D\(2.52\)
Q71 mark

\(X\) has probability density function \(f(x) = a + bx\) for \(0 \le x \le 2\), and \(f(x) = 0\) otherwise, where \(a\) and \(b\) are constants. Given that \(\text{E}(X) = \dfrac{7}{6}\), find \(a\) and \(b\).

  • A\(a = \dfrac{1}{4}\), \(b = \dfrac{1}{4}\)
  • B\(a = \dfrac{1}{2}\), \(b = 0\)
  • C\(a = \dfrac{1}{8}\), \(b = \dfrac{3}{8}\)
  • D\(a = 0\), \(b = \dfrac{1}{2}\)
Q81 mark

\(X\) has probability density function \(f(x) = \dfrac{3}{64}x^{2}\) for \(0 \le x \le 4\), and \(f(x) = 0\) otherwise. Two independent observations of \(X\) are taken. Find the probability that both are greater than 3.

  • A\(0.334\)
  • B\(0.578\)
  • C\(0.178\)
  • D\(0.25\)
Quiz key
Q1: A

\(\displaystyle\int_0^2 kx^{3}\,dx = k\left[\dfrac{x^{4}}{4}\right]_0^2 = 4k = 1\), so \(k = \dfrac{1}{4}\). The tempting \(\dfrac{1}{8}\) sets \(f(2) = 8k = 1\), treating the height as a probability instead of using area. \(\dfrac{1}{16}\) forgets to divide \(x^{4}\) by 4 when integrating, and 4 turns the answer upside down.

Q2: A

\(\displaystyle\int_2^4 \dfrac{x}{18}\,dx = \left[\dfrac{x^{2}}{36}\right]_2^4 = \dfrac{16 - 4}{36} = \dfrac{1}{3}\). The tempting \(\dfrac{1}{9}\) is \(f(4) - f(2) = \dfrac{4}{18} - \dfrac{2}{18}\), a difference of heights, not an area. \(\dfrac{4}{9}\) is \(\text{P}(X < 4)\), and \(\dfrac{1}{2}\) assumes the probability is spread evenly, but the density increases with \(x\).

Q3: A

\(\text{E}(X) = \displaystyle\int_0^6 \dfrac{x^{2}}{18}\,dx = \left[\dfrac{x^{3}}{54}\right]_0^6 = \dfrac{216}{54} = 4\). The tempting 3 is the midpoint of the domain; that is only the mean when the graph is symmetrical, and here more of the area is on the right. 18 is \(\text{E}(X^{2})\), and 2 is \(\text{Var}(X) = 18 - 4^{2}\).

Q4: A

\(\text{E}(X^{2}) = \displaystyle\int_0^4 \dfrac{3x^{4}}{64}\,dx = \left[\dfrac{3x^{5}}{320}\right]_0^4 = \dfrac{3072}{320} = 9.6\). \(\text{Var}(X) = 9.6 - 3^{2} = 0.6\). The tempting 9.6 stops at \(\text{E}(X^{2})\) and never subtracts \(\mu^{2}\). 6.6 subtracts \(\mu\) instead of \(\mu^{2}\), and 0.775 is the standard deviation \(\sqrt{0.6}\).

Q5: A

\(\displaystyle\int_0^m \dfrac{3x^{2}}{64}\,dx = \dfrac{m^{3}}{64} = 0.5\), so \(m^{3} = 32\) and \(m = \sqrt[3]{32} = 3.17\). The tempting 2 is half-way along the domain, but most of the area lies on the right where the density is higher. 3 is the mean, not the median, and 2.52 solves \(\dfrac{m^{3}}{64} = 0.25\), which is the lower quartile.

Q6: A

\(\displaystyle\int_2^{\infty} kx^{-4}\,dx = \left[-\dfrac{k}{3x^{3}}\right]_2^{\infty} = \dfrac{k}{24} = 1\), so \(k = 24\). \(\text{E}(X) = \displaystyle\int_2^{\infty} \dfrac{24}{x^{3}}\,dx = \left[-\dfrac{12}{x^{2}}\right]_2^{\infty} = \dfrac{12}{4} = 3\). The tempting \(0.375\) uses \(k = 3\), the value that would be right for the domain \(x \ge 1\). 12 is \(\text{E}(X^{2})\), and 2.52 is the median \(\sqrt[3]{16}\), which is less than the mean because of the long right tail.

Q7: A

Area: \(2a + 2b = 1\). Mean: \(\displaystyle\int_0^2 (ax + bx^{2})\,dx = 2a + \dfrac{8b}{3} = \dfrac{7}{6}\). Subtracting, \(\dfrac{2b}{3} = \dfrac{1}{6}\), so \(b = \dfrac{1}{4}\) and \(a = \dfrac{1}{4}\). Every other option also has total area 1, which is why they tempt, but they fail the mean condition: \(a = \dfrac{1}{2}, b = 0\) gives \(\text{E}(X) = 1\); \(a = \dfrac{1}{8}, b = \dfrac{3}{8}\) gives \(\dfrac{5}{4}\); \(a = 0, b = \dfrac{1}{2}\) gives \(\dfrac{4}{3}\).

Q8: A

\(\text{P}(X > 3) = \displaystyle\int_3^4 \dfrac{3x^{2}}{64}\,dx = \dfrac{64 - 27}{64} = \dfrac{37}{64}\). Both: \(\left(\dfrac{37}{64}\right)^{2} = 0.334\). The tempting \(0.578\) is for one observation only. \(0.178\) is \(\left(\dfrac{27}{64}\right)^{2}\), both LESS than 3, and \(0.25 = 0.5^{2}\) assumes 3 is the median; it is the mean, and the median is 3.17.

Slides

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.

Also for this topic

Everything else you can use

Original work by the TheLucidSTEM team. The worksheet items are written in the style of the papers; no past paper question is reproduced.