Teachers' Portal  /  A-Level Further Maths 9231  /  Continuous random variables  /  Expectation and related variables
Lesson pack · A-Level Further Maths 9231 · 4.1 · AS & A Level

Expectation and related variables

Change the variable, keep the probability. Once you have the pdf of \(X\), one integral gives the mean of any function of it: \(E(X^{2})\), \(E(1/X)\), \(E(\sqrt{X})\) or \(E(e^{X})\).

Student lesson
At a glance

The shape of the lesson

Topic
Continuous random variables
Syllabus reference
Cambridge International AS and A Level Further Mathematics 9231, 4.1
Level
AS & A Level
Duration
45 minutes, lab-led; stretches to a 60 minute block (see the contingency notes)
Position in topic
Lesson 2 of 2 in Continuous random variables; follows PDFs, CDFs and percentiles
Central model
Fig. 1: the pdf of X (left) and the pdf of Y = X^3 (right). The shaded areas are both 0.5: the median of Y is the cube of the median of X, but the shapes are very different
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
  • One integral for any function of X: You already know \(E(X) = \displaystyle\int x f(x)\,dx\).
  • From F to G: increasing functions: Now suppose you want the whole distribution of \(Y = g(X)\), not just its mean.
  • Decreasing functions and medians: If \(g\) is decreasing, a small \(Y\) comes from a large \(X\), so the inequality turns round: \(Y \le y\) exactly when \(X \ge g^{-1}(y)\).
Key points to leave on the board
  • Expectation: \(E\big(g(X)\big) = \displaystyle\int g(x)f(x)\,dx\) over the range of \(X\); \(\operatorname{Var}(X) = E(X^{2}) - [E(X)]^{2}\).
  • New range: push the ends of the range of \(X\) through \(g\).
  • CDF: rewrite \(P(Y \le y)\) in terms of \(X\); increasing \(g\) gives \(F\big(g^{-1}(y)\big)\), decreasing \(g\) gives \(1 - F\big(g^{-1}(y)\big)\).
  • pdf: differentiate \(G\), state the range, and check it integrates to 1.
  • Median: for monotonic \(g\), the median of \(Y\) is \(g\) of the median of \(X\).
The core visual model

One picture every idea returns to

For a continuous random variable \(X\) with pdf \(f(x)\), the general result is \(E\big(g(X)\big) = \displaystyle\int g(x)\,f(x)\,dx\) over the range of \(X\); in particular \(\operatorname{Var}(X) = E(X^{2}) - [E(X)]^{2}\). For \(Y = g(X)\) with \(g\) increasing, \(G(y) = P(Y \le y) = P\big(X \le g^{-1}(y)\big) = F\big(g^{-1}(y)\big)\); for \(g\) decreasing the inequality flips, so \(G(y) = 1 - F\big(g^{-1}(y)\big)\). Differentiate \(G\) to get the pdf of \(Y\), and always state the new range of \(y\).

x f(x) 1 2 0.5 1 y g(y) 2 4 6 8 0.5 1 median √2 f(x) = x/2, 0 ≤ x ≤ 2 median 2√2 g(y) = (1/6)y^(−1/3), 0 < y ≤ 8 Y = X³
Fig. 1: the pdf of X (left) and the pdf of Y = X^3 (right). The shaded areas are both 0.5: the median of Y is the cube of the median of X, but the shapes are very different
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen with the question in the title, Change the variable, keep the probability.. Once you have the pdf of \(X\), one integral gives the mean of any function of it: \(E(X^{2})\), \(E(1/X)\), \(E(\sqrt{X})\) or \(E(e^{X})\). 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: One integral for any function of XYou already know \(E(X) = \displaystyle\int x f(x)\,dx\). Model the worked example Mean, variance and a linear check on the board, one line at a time. Your turn: For the same \(X\) (pdf \(2x\) on \([0, 1]\)), find \(E(e^{X})\) exactly.Whole class, then pairs
13 to 21 minTeach and check: From F to G: increasing functionsNow suppose you want the whole distribution of \(Y = g(X)\), not just its mean. Model the worked example Y = X cubed on the board, one line at a time. Your turn: \(X\) has CDF \(F(x) = \dfrac{x}{2}\) for \(0 \le x \le 2\). Find the pdf of \(Y = X^{3}\).Pairs
21 to 30 minTeach and check: Decreasing functions and mediansIf \(g\) is decreasing, a small \(Y\) comes from a large \(X\), so the inequality turns round: \(Y \le y\) exactly when \(X \ge g^{-1}(y)\). Model the worked example Y = 1/X on the board, one line at a time.Connect-Extend-Challenge
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, 30 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 Decreasing functions and medians, 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

Connect-Extend-Challenge

After the new idea, each student writes three lines: how it connects to what they knew, how it extends their thinking, and what still challenges them. Pairs compare, then the challenges become the plenary.

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.

Examiner traps to pre-empt

What to head off, and how

Trap learners fall intoTeaching move that pre-empts it
Only LINEAR functions pass through \(E\): \(E(2X + 1) = 2E(X) + 1\), but \(E(X^{2}) \ne [E(X)]^{2}\), \(E(1/X) \ne 1/E(X)\) and \(E(\sqrt{X}) \ne \sqrt{E(X)}\).For anything non-linear, integrate \(g(x)f(x)\).
Do not substitute \(x = y^{1/3}\) into the pdf \(f(x)\): that skips the chain rule factor and the result does not integrate to 1.Go through the CDF, and write the NEW range of \(y\), not the old range of \(x\).
With a decreasing function, \(G(y) = F\big(g^{-1}(y)\big)\) is WRONG: in the first example it gives \(2 - 2y\), which falls as \(y\) rises, so it cannot be a CDF, and its derivative \(-2\) is negative.Flip the inequality: \(G(y) = 1 - F\big(g^{-1}(y)\big)\).
Worksheet

Expectation and related variables: worksheet

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

NameClassDate
Q1 · recall[4 marks]

The random variable \(X\) has pdf \(f(x) = \dfrac{x}{2}\) for \(0 \le x \le 2\) and 0 otherwise.

(a) Find \(E(X)\) and \(\operatorname{Var}(X)\).

(b) Write down \(E(3X - 1)\).

Q2 · calculation[4 marks]

The random variable \(X\) has pdf \(f(x) = \dfrac{3}{x^{4}}\) for \(x \ge 1\) and 0 otherwise.

Find \(E\!\left(\dfrac{1}{X}\right)\) and \(E(X^{2})\).

Q3 · calculation[3 marks]

The random variable \(X\) is uniformly distributed on \([0, 2]\), so its pdf is \(f(x) = \dfrac{1}{2}\) for \(0 \le x \le 2\).

Find \(E(e^{X})\), giving your answer exactly and to 3 significant figures.

Q4 · analysis[6 marks]

The random variable \(X\) has CDF \(F(x) = \dfrac{x}{2}\) for \(0 \le x \le 2\). The random variable \(Y\) is defined by \(Y = X^{3}\).

(a) Find the CDF of \(Y\) and hence its pdf, stating the range of values of \(y\).

(b) Find the median of \(Y\).

(c) Find \(E(Y)\) using your pdf, and check it with the general result.

Q5 · analysis[6 marks]

The random variable \(X\) has CDF \(F(x) = \dfrac{x^{4}}{81}\) for \(0 \le x \le 3\). The random variable \(Y = \sqrt{X}\).

(a) Find the pdf of \(Y\) and show that it integrates to 1.

(b) Find the median of \(X\) and hence the median of \(Y\), each to 3 significant figures.

Q6 · analysis[7 marks]

The random variable \(X\) has pdf \(f(x) = \dfrac{2x}{3}\) for \(1 \le x \le 2\) and 0 otherwise. The random variable \(Y = \dfrac{1}{X}\).

(a) Find the CDF of \(X\).

(b) Find the CDF of \(Y\) and hence show that the pdf of \(Y\) is \(\dfrac{2}{3y^{3}}\), stating the range of \(y\).

(c) Find \(P(Y > 0.8)\).

(d) Find \(E(Y)\) in two ways.

Answer key and marking notes
Q1 · 4 marks
  • (a) \(E(X) = \displaystyle\int_{0}^{2} \tfrac{x^{2}}{2}\,dx = \tfrac{8}{6} = \tfrac{4}{3}\).
  • \(E(X^{2}) = \displaystyle\int_{0}^{2} \tfrac{x^{3}}{2}\,dx = \tfrac{16}{8} = 2\).
  • \(\operatorname{Var}(X) = 2 - \left(\tfrac{4}{3}\right)^{2} = 2 - \tfrac{16}{9} = \tfrac{2}{9}\).
  • (b) \(E(3X - 1) = 3\times\tfrac{4}{3} - 1 = 3\).
Q2 · 4 marks
  • \[E\!\left(\tfrac{1}{X}\right) = \int_{1}^{\infty} \tfrac{3}{x^{5}}\,dx = \left[-\tfrac{3}{4x^{4}}\right]_{1}^{\infty} = \tfrac{3}{4}\]
  • \[E(X^{2}) = \int_{1}^{\infty} \tfrac{3}{x^{2}}\,dx = \left[-\tfrac{3}{x}\right]_{1}^{\infty} = 3\]
Q3 · 3 marks
  • \[E(e^{X}) = \int_{0}^{2} \tfrac{1}{2}e^{x}\,dx = \tfrac{1}{2}\big[e^{x}\big]_{0}^{2} = \tfrac{1}{2}\left(e^{2} - 1\right)\]
  • \(= 3.19\) (3 s.f.). Note \(e^{E(X)} = e^{1} = 2.72\) is smaller: \(E(e^{X}) \ne e^{E(X)}\).
Q4 · 6 marks
  • (a) \(0 \le x \le 2\) gives \(0 \le y \le 8\). \(G(y) = P\big(X \le y^{1/3}\big) = \tfrac{1}{2}y^{1/3}\).
  • \(g(y) = \tfrac{1}{6}y^{-2/3}\) for \(0 < y \le 8\), 0 otherwise.
  • (b) \(\tfrac{1}{2}m^{1/3} = \tfrac{1}{2}\) gives \(m = 1\) (equally, the median of \(X\) is 1 and \(1^{3} = 1\)).
  • \[\text{(c) } E(Y) = \int_{0}^{8} \tfrac{1}{6}y^{1/3}\,dy = \tfrac{1}{6}\times\tfrac{3}{4}\big[y^{4/3}\big]_{0}^{8} = \tfrac{1}{8}\times 16 = 2\]
  • Check: \(E(X^{3}) = \displaystyle\int_{0}^{2} \tfrac{x^{3}}{2}\,dx = 2\). Note the mean 2 is well above the median 1.
Q5 · 6 marks
  • (a) \(0 \le x \le 3\) gives \(0 \le y \le \sqrt{3}\). \(G(y) = P\big(X \le y^{2}\big) = \dfrac{y^{8}}{81}\).
  • \(g(y) = \dfrac{8y^{7}}{81}\) for \(0 \le y \le \sqrt{3}\), 0 otherwise.
  • \(\displaystyle\int_{0}^{\sqrt{3}} \tfrac{8y^{7}}{81}\,dy = \left[\tfrac{y^{8}}{81}\right]_{0}^{\sqrt{3}} = \tfrac{81}{81} = 1\).
  • (b) \(\dfrac{m^{4}}{81} = \dfrac{1}{2}\) gives \(m = \left(40.5\right)^{1/4} = 2.52\) (3 s.f.).
  • Median of \(Y\) \(= \sqrt{2.5227\ldots} = 1.59\) (3 s.f.); check \(\dfrac{1.5883^{8}}{81} = 0.500\).
Q6 · 7 marks
  • (a) \(F(x) = \displaystyle\int_{1}^{x} \tfrac{2t}{3}\,dt = \dfrac{x^{2} - 1}{3}\) for \(1 \le x \le 2\).
  • (b) \(\tfrac{1}{X}\) is decreasing, so \(\tfrac{1}{2} \le y \le 1\) and \(G(y) = P\!\left(X \ge \tfrac{1}{y}\right) = 1 - F\!\left(\tfrac{1}{y}\right)\).
  • \[G(y) = 1 - \frac{1/y^{2} - 1}{3} = \frac{4}{3} - \frac{1}{3y^{2}}, \quad \tfrac{1}{2} \le y \le 1\]
  • \(g(y) = G'(y) = \dfrac{2}{3y^{3}}\) for \(\tfrac{1}{2} \le y \le 1\), 0 otherwise.
  • (c) \(P(Y > 0.8) = 1 - G(0.8) = 1 - \tfrac{4}{3} + \tfrac{1}{1.92} = \tfrac{3}{16} = 0.1875\) (equally \(P(X < 1.25) = \tfrac{1.5625 - 1}{3}\)).
  • (d) \(\displaystyle\int_{1/2}^{1} \tfrac{2}{3y^{2}}\,dy = \left[-\tfrac{2}{3y}\right]_{1/2}^{1} = -\tfrac{2}{3} + \tfrac{4}{3} = \tfrac{2}{3}\).
  • General result: \(E\!\left(\tfrac{1}{X}\right) = \displaystyle\int_{1}^{2} \tfrac{1}{x}\cdot\tfrac{2x}{3}\,dx = \tfrac{2}{3}\). They agree.
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

\(X\) has pdf \(f(x) = 3x^{2}\) for \(0 \le x \le 1\), and \(f(x) = 0\) otherwise. Find \(E\!\left(\dfrac{1}{X}\right)\).

  • A\(\tfrac{3}{4}\)
  • B\(3\)
  • C\(\tfrac{3}{2}\)
  • D\(\tfrac{4}{3}\)
Q21 mark

\(X\) has pdf \(f(x) = \tfrac{1}{4}(x + 1)\) for \(0 \le x \le 2\), and \(f(x) = 0\) otherwise. Find \(\operatorname{Var}(X)\).

  • A\(\tfrac{11}{36}\)
  • B\(\tfrac{5}{3}\)
  • C\(\tfrac{1}{2}\)
  • D\(\tfrac{49}{36}\)
Q31 mark

\(X\) has pdf \(f(x) = \tfrac{3}{2}\sqrt{x}\) for \(0 \le x \le 1\), and \(f(x) = 0\) otherwise. Find \(E(\sqrt{X})\).

  • A\(\tfrac{3}{5}\)
  • B\(\tfrac{3}{4}\)
  • C\(\sqrt{\tfrac{3}{5}}\)
  • D\(\tfrac{3}{2}\)
Q41 mark

\(X\) has CDF \(F(x) = \tfrac{1}{4}x^{2}\) for \(0 \le x \le 2\). Which is the CDF \(G(y)\) of \(Y = X^{2}\) on its range?

  • A\(G(y) = \tfrac{1}{4}y\) for \(0 \le y \le 2\)
  • B\(G(y) = \tfrac{1}{16}y^{2}\) for \(0 \le y \le 4\)
  • C\(G(y) = \tfrac{1}{4}y\) for \(0 \le y \le 4\)
  • D\(G(y) = \tfrac{1}{4}y^{4}\) for \(0 \le y \le \sqrt{2}\)
Q51 mark

\(X\) has CDF \(F(x) = \tfrac{1}{16}x^{4}\) for \(0 \le x \le 2\). Find the pdf \(g(y)\) of \(Y = X^{3}\).

  • A\(g(y) = \tfrac{1}{12}y^{1/3}\) for \(0 \le y \le 2\)
  • B\(g(y) = \tfrac{1}{4}y\) for \(0 \le y \le 8\)
  • C\(g(y) = \tfrac{1}{12}y^{1/3}\) for \(0 \le y \le 8\)
  • D\(g(y) = \tfrac{1}{16}y^{4/3}\) for \(0 \le y \le 8\)
Q61 mark

\(X\) has CDF \(F(x) = x^{3}\) for \(0 \le x \le 1\). Find the upper quartile of \(Y = \dfrac{1}{X}\), correct to 3 significant figures.

  • A\(0.909\)
  • B\(1.59\)
  • C\(1.26\)
  • D\(1.10\)
Q71 mark

\(X\) has pdf \(f(x) = \tfrac{1}{2}x\) for \(0 \le x \le 2\), and \(f(x) = 0\) otherwise. Find \(\operatorname{Var}(X^{3})\).

  • A\(5.76\)
  • B\(10.4\)
  • C\(12.8\)
  • D\(16\)
Q81 mark

\(X\) is uniformly distributed on \(1 \le x \le 3\), so \(f(x) = \tfrac{1}{2}\) there. Find the pdf \(g(y)\) of \(Y = X^{2}\).

  • A\(g(y) = \dfrac{1}{4\sqrt{y}}\) for \(1 \le y \le 9\)
  • B\(g(y) = \dfrac{1}{4\sqrt{y}}\) for \(1 \le y \le 3\)
  • C\(g(y) = \dfrac{1}{2\sqrt{y}}\) for \(1 \le y \le 9\)
  • D\(g(y) = \dfrac{1}{2}\) for \(1 \le y \le 9\)
Quiz key
Q1: C

\(E\!\left(\dfrac{1}{X}\right) = \int_{0}^{1} \dfrac{1}{x} \cdot 3x^{2}\,dx = \int_{0}^{1} 3x\,dx = \tfrac{3}{2}\). \(\tfrac{4}{3}\) is \(\dfrac{1}{E(X)}\) with \(E(X) = \tfrac{3}{4}\); in general \(E\!\left(\dfrac{1}{X}\right) \ne \dfrac{1}{E(X)}\). \(\tfrac{3}{4}\) is \(E(X)\) itself, and \(3\) integrates \(3x\) to \(3x^{2}\), forgetting the \(\tfrac{1}{2}\).

Q2: A

\(E(X) = \tfrac{1}{4}\int_{0}^{2} (x^{2} + x)\,dx = \tfrac{1}{4}\left(\tfrac{8}{3} + 2\right) = \tfrac{7}{6}\). \(E(X^{2}) = \tfrac{1}{4}\int_{0}^{2} (x^{3} + x^{2})\,dx = \tfrac{1}{4}\left(4 + \tfrac{8}{3}\right) = \tfrac{5}{3}\). \(\operatorname{Var}(X) = \tfrac{5}{3} - \tfrac{49}{36} = \tfrac{11}{36}\). \(\tfrac{5}{3}\) is \(E(X^{2})\) with nothing subtracted. \(\tfrac{1}{2}\) subtracts \(E(X)\) instead of its square. \(\tfrac{49}{36}\) is \([E(X)]^{2}\).

Q3: B

\(E(\sqrt{X}) = \int_{0}^{1} \sqrt{x} \cdot \tfrac{3}{2}\sqrt{x}\,dx = \int_{0}^{1} \tfrac{3}{2}x\,dx = \tfrac{3}{4}\). \(\sqrt{\tfrac{3}{5}} \approx 0.775\) takes the square root of \(E(X) = \tfrac{3}{5}\), but \(E(\sqrt{X}) \ne \sqrt{E(X)}\). \(\tfrac{3}{5}\) is \(E(X)\) itself, and \(\tfrac{3}{2}\) evaluates the integrand \(\tfrac{3}{2}x\) at \(x = 1\) instead of integrating it.

Q4: C

For \(X \ge 0\), \(P(X^{2} \le y) = P(X \le \sqrt{y}) = F(\sqrt{y}) = \tfrac{1}{4}y\). The range \(0 \le x \le 2\) becomes \(0 \le y \le 4\), and \(G(4) = 1\) as it must. Keeping \(0 \le y \le 2\) forgets to square the end point (then \(G\) never reaches 1). \(\tfrac{1}{4}y^{4}\) substitutes \(x = y^{2}\) instead of \(x = \sqrt{y}\). \(\tfrac{1}{16}y^{2}\) squares \(F\) itself rather than changing the variable.

Q5: C

\(G(y) = F(y^{1/3}) = \tfrac{1}{16}y^{4/3}\) for \(0 \le y \le 8\). Then \(g(y) = G'(y) = \tfrac{1}{16} \cdot \tfrac{4}{3}y^{1/3} = \tfrac{1}{12}y^{1/3}\); check \(\int_{0}^{8} \tfrac{1}{12}y^{1/3}\,dy = \tfrac{1}{12} \cdot \tfrac{3}{4} \cdot 16 = 1\). \(\tfrac{1}{4}y\) puts \(x = y^{1/3}\) into \(f(x) = \tfrac{1}{4}x^{3}\), missing the chain-rule factor (it integrates to 8). The range \(0 \le y \le 2\) keeps the range of \(X\). \(\tfrac{1}{16}y^{4/3}\) is the CDF \(G\), not the pdf.

Q6: B

\(G(y) = P\!\left(X \ge \dfrac{1}{y}\right) = 1 - F\!\left(\dfrac{1}{y}\right) = 1 - y^{-3}\) for \(y \ge 1\). \(1 - q^{-3} = 0.75\) gives \(q^{3} = 4\), so \(q = 4^{1/3} \approx 1.59\). Equivalently, it is the reciprocal of the LOWER quartile of \(X\). \(1.10\) uses \(G(y) = F\!\left(\dfrac{1}{y}\right)\), not flipping the inequality (the same as taking the reciprocal of the upper quartile of \(X\)). \(0.909\) is the upper quartile of \(X\) itself. \(1.26\) is the median of \(Y\), solving \(G(q) = 0.5\).

Q7: A

\(E(X^{3}) = \int_{0}^{2} \tfrac{1}{2}x^{4}\,dx = \tfrac{32}{10} = 3.2\) and \(E(X^{6}) = \int_{0}^{2} \tfrac{1}{2}x^{7}\,dx = \tfrac{256}{16} = 16\). \(\operatorname{Var}(X^{3}) = 16 - 3.2^{2} = 5.76\). \(16\) is \(E(X^{6})\) with nothing subtracted. \(12.8\) subtracts \(E(X^{3})\) without squaring it. \(10.4\) uses \([E(X)]^{3} = \left(\tfrac{4}{3}\right)^{3}\) in place of \(E(X^{3})\).

Q8: A

\(F(x) = \tfrac{1}{2}(x - 1)\), so \(G(y) = \tfrac{1}{2}(\sqrt{y} - 1)\) for \(1 \le y \le 9\) and \(g(y) = \tfrac{1}{2} \cdot \dfrac{1}{2\sqrt{y}} = \dfrac{1}{4\sqrt{y}}\); check \(\int_{1}^{9} \dfrac{dy}{4\sqrt{y}} = \tfrac{1}{2}(3 - 1) = 1\). \(\dfrac{1}{2\sqrt{y}}\) drops the factor \(\tfrac{1}{2}\) in \(F\), and its area is 2. The range \(1 \le y \le 3\) keeps the range of \(X\). \(\tfrac{1}{2}\) assumes \(Y\) is uniform too, but squaring stretches the scale unevenly.

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