CAMBRIDGE INTERNATIONAL AS & A LEVEL
FURTHER MATHEMATICS 9231
Paper 4 | Further Probability & Statistics (FS1)
Chapter 1
Continuous Random Variables
Complete Study Notes
A First Course in the Topic: Theory Explained from the Beginning,
with Worked Examples and Graded Practice with Full Solutions
Practice questions are drawn from the chapter exercises
(Exercise 1A and Exercise 1B) and from Cambridge 9231 Paper 4,
June 2025 and November 2025, all variants. Every question is labelled with its source and
carries a full worked solution.
Level: A Level (Year 2) Calculator: permitted All content within the 9231 FS1 syllabus
Contents
1 Before you start
1
2 Densities given in two pieces
5
3 The mean and variance of a function of X
15
4 The cumulative distribution function
23
5 The distribution of a function of X
37
6 Formula and results summary
47
7 Common mistakes
49
Appendix: theory checklist
51
Start at Section 1. It sets out the notation used throughout, the integration skills you will
need, and a recap of everything the chapter assumes you already know about probability
density functions. After that, the four main sections build on each other in order, so work
through them as they come.
Every section explains the idea in plain words first, with a picture, before any formula appears. Then comes a numbered method, then worked examples — the first one in each section is done line by line, with a reason given for every step — and finally practice questions
with complete solutions. Textbook questions come first, easiest first; real 9231 examination
questions come at the end of each section, with their original mark allocations.
Section 6 is a summary of every formula in the chapter and Section 7 lists the mistakes that
lose the most marks, with what to do instead. Both are for revision, once you have worked
through the notes.
i
9231 FS1 | Continuous Random Variables
1
1 Before you start
1.1 What this chapter is about
Some random quantities take separate values. The score on a die is 1, 2, 3, 4, 5 or 6 — nothing in
between. You handle these with a table of probabilities, and you add.
Other random quantities can take any value in a range. The time you wait for a bus. The length
of a plank. The error in a measurement. These are called continuous random variables. You
cannot make a table for them, because between any two values there are always more values. So
instead of a table we use a graph, and instead of adding we find areas — which means integrating.
You met this idea in A Level Mathematics. This chapter adds four new skills.
Section
New skill
The question it answers
2
Densities in two pieces
What if the graph follows one rule up to a point, and
a different rule after it?
3
Functions of X
If I know how X behaves, what is the average of X 2 ?
Or of 1/X?
4
The cumulative function
Instead of “how likely is X to be near here?”, how
likely is X to be at most here?
5
Distribution of a function of X
If I know the graph for X, what is the graph for X 2 ?
Each section uses the one before it. Read them in order.
1.2 What you need from Pure Mathematics
All of this chapter is integration. Three things must be secure.
Z 3
1. Integrating between limits, such as
4x − x2 dx. Also, turning surds and fractions into
1
√
1
1
1/2
−
1/2
√
=x
, 4 = x −4 .
powers first: x = x ,
x
x
2. Integrating without limits, which gives “+ c”, and then finding c from a known value. We
do this in Section 4.
3
3. Differentiating, including the chain rule for things like y2 − 2 .
You will also solve linear and quadratic equations, and sometimes a cubic like m3 = 32.5. Use
a calculator for all of this. But if a question says “show that”, you must write the algebra out. The
examiner is marking your method, not your answer.
1.3 Reading the notation
Mathematics uses a lot of symbols. Here is what each one means, in words. Come back to this
table whenever a symbol puzzles you.
9231 FS1 | Continuous Random Variables
2
Symbol
What it means
X (capital)
The random quantity itself — “the waiting time”, whatever it turns out to
be.
x (small)
One particular value it might take, such as x = 3.
f( x )
Read “f of x”. The height of the density graph at the value x. It is not a
probability. The small letter f is always the density.
F( x )
Read “capital F of x”. The probability that X is at most x. This one is a
probability. The capital letter F is always the cumulative function. (Section 4.)
Y, h(y), H(y)
A second random quantity, and its own density (small h) and cumulative
function (capital H). Different letters so you never mix up which quantity is
which.
E( X )
The mean (average) of X. Also written µ, “mu”.
Var( X )
The variance of X — a measure of how spread out it is. Also written σ2 ,
“sigma squared”. Its square root σ is the standard deviation.
P( X ≤ 3)
“The probability that X is at most 3.”
g( X )
Read “g of X”. Some formula applied to X — for example X 2 , or 3X + 4, or
1/X. We use g when we want to talk about any such formula at once.
m
The median: the value with half the probability below it.
Z b
a
u, t
f( x ) dx
The area under the density graph between x = a and x = b.
Stand-in letters used inside an integral when x is already busy. Section 4
explains.
Cambridge writes the function letters f, F, h, H upright, not in italics. The important thing is
not the font: it is that small f is height, capital F is probability collected so far. These notes will
say this in words every time it matters.
1.4 What you already know about density functions
Here is the A Level material, said plainly. Everything else in the chapter is built on it.
A continuous random variable X is described by a probability density function, written f.
The one idea that matters is:
Probability is the area under the graph of f.
Look at the diagram. On the left, the whole region under the curve is shaded. That area is 1,
because X is certain to take some value, and certainty means probability 1. On the right, only the
strip between 1.2 and 2.4 is shaded. That area is
the probability that X lands between 1.2 and 2.4.
In symbols,
P(1.2 ≤ X ≤ 2.4) =
Z 2.4
1.2
f( x ) dx.
Left: the whole area under the graph is 1.
Right: the shaded area is the probability that X lands
between 1.2 and 2.4.
Figure 1.
Read this as: “the probability that X is between 1.2 and 2.4 equals the area under f from 1.2 to
2.4.” The integral sign is just the instruction “find the area”.
Because probability is area, two things must be true of any density:
9231 FS1 | Continuous Random Variables
3
• the graph never dips below the axis — f( x ) ≥ 0 — because a negative area would mean a
negative probability;
• the total area is exactly 1.
Usually the graph is zero outside one interval. The definition says so with the words “0
otherwise”. Those words tell you where to stop integrating. If the density is 0 beyond x = 6,
then to find P(4 ≤ X ≤ 10) you integrate from 4 to 6 only. There is no area beyond 6 to collect.
Three more facts follow from “probability is area”.
(a) One exact value has probability zero. P( X = 3) = 0, because a single point has no width,
so there is no area above it. This does not mean X never equals 3; it means no single value
was ever likely in advance.
(b) “Less than” and “less than or equal to” give the same answer. The endpoint adds no area,
so P( X < 3) = P( X ≤ 3). You never need to worry about which sign a question uses.
(c) The graph may go higher than 1. Only areas are limited to 1. A graph of height 2 over a
width of 21 has area 1 and is perfectly fine.
The averages are also found from areas.
• Mean: E( X ) =
Z
x f( x ) dx over the range. In words: multiply each value x by the height of
the graph there, and find the area of the result. The mean is where the shape would balance.
Z
• Variance: first find E X 2 = x2 f( x ) dx in the same way but with x2 . Then
Var( X ) = E X 2 − {E( X )}2 ,
“the mean of the square, minus the square of the mean”. A variance is never negative. If yours
is, look for the slip.
• Median: the value m that cuts the area in half, so that
Z m
bottom of range
f( x ) dx = 0.5.
p
• Percentiles: the pth percentile has area 100 to its left. The 25th percentile is the lower quartile.
• Mode: the value of x where the graph is highest. Find it by solving f′ ( x ) = 0 — but also
look at the ends of the range. If the graph climbs all the way across, the highest point is at the
right-hand end, and there is no stationary point to find.
What you are assumed to know already
For a density f that is non-zero between x = a and x = b:
Z b
f( x ) ≥ 0,
E( X ) =
a
Z b
a
median m :
f( x ) dx = 1,
x f( x ) dx,
Z m
a
P( c ≤ X ≤ d ) =
Z b 2
E X2 =
x f( x ) dx,
f( x ) dx = 0.5,
a
Z d
c
f( x ) dx
(area from c to d),
Var( X ) = E X 2 − {E( X )}2 ,
mode: the x where f( x ) is highest.
9231 FS1 | Continuous Random Variables
How the rest of the notes work. Every section has the same shape.
(a) The idea — in plain words, with a diagram beside the text.
(b) The method — numbered steps you can follow.
(c) Worked examples — the first one in each section is done line by line, with the reason for
every step.
(d) Practice questions — textbook questions first, easiest first; then real 9231 exam questions with their marks.
Every question has its full solution printed straight after it, and a diagram wherever a picture
helps. Cover the solution, try the question, then read the solution even if you got it right —
it explains why.
4
9231 FS1 | Continuous Random Variables
5
2 Densities given in two pieces
2.1 The idea
Every density you have met so far was a single formula. But a real situation often behaves one
way, then another.
Look at the diagram. It shows how many hours someone spends gardening each day. From 0 up to 3 hours
the graph climbs; from 3 to 6 it falls back to zero. A
straight line cannot climb and then fall, so the graph
needs two rules:
0 ≤ x < 3 (climbing),
kx
f( x ) = k (6 − x ) 3 ≤ x ≤ 6 (falling),
0
otherwise.
Here f( x ) is the height of the graph at x, and k is a number we do not know yet. A density written in parts like
this is called piecewise. The value x = 3, where the
rule changes, is called the join.
The gardening density. One rule from
0 to 3, a different rule from 3 to 6. The shaded
part is P(2 ≤ X ≤ 5).
Figure 2.
R
Nothing new has to be learned. Probability is still area. The mean is still x f( x ) dx. The
only change is housekeeping: whenever you integrate, you must break the integral at the
join and use each rule only on its own stretch. Then add the pieces.
2.2 Finding the unknown number
Almost every question starts by asking you to find k. The tool is always the same: the total area
is 1. For the gardening density, the total area is the area of the climbing part plus the area of the
falling part:
Z 3
kx dx
| 0 {z }
area from 0 to 3, using the first rule
+
Z 6
|3
k (6 − x ) dx
{z
}
= 1.
area from 3 to 6, using the second rule
Notice what happened. The first integral uses the first rule and the first stretch. The second uses
the second rule and the second stretch. Work them out, add, set equal to 1, and solve for k.
A shortcut for straight lines. If the pieces are straight lines, the shape is made of triangles
and rectangles, and you can write the area down without integrating. The gardening graph is a
triangle. Its base is 6 and its height is the value at the peak, f(3) = 3k. So
area = 12 × base × height = 12 × 6 × 3k = 9k.
Setting 9k = 1 gives k = 91 in one line. Use this whenever the graph is straight lines. If a piece is
curved — ( x − 1)(2 − x ), say — you must integrate it.
More than one unknown. One equation finds one unknown. If a question has three unknowns, you need three equations. The extra ones come from the diagram, and there are only two
places they can come from.
1. The graph comes down to the axis at the end. If the diagram shows the graph reaching zero
at x = 8, then f(8) = 0. Put 8 into the second rule and set it equal to 0.
9231 FS1 | Continuous Random Variables
6
2. The graph has no gap at the join. If the diagram shows one unbroken line, the two rules
must give the same height at the join. Put the join value into both rules and set them equal.
A density is allowed to jump
Point 2 is only available if the diagram shows it. A
density does not have to be joined up. In the diagram
1
alongside, the first rule climbs to 25
just before x = 1,
7
.
and then the second rule starts much higher, at 25
There is a jump. This is completely legal: the graph
never goes below the axis, and the total area is still 1.
So never write “the two rules agree at the join” out
of habit. Look at the diagram. If there is a gap, or no
diagram at all, use only the area equation.
A density that jumps. The hollow
dot is the height the first rule reaches; the
solid dot is where the second rule starts. Still
a valid density, and used in a real exam.
Figure 3.
2.3 Probabilities, means and modes with two pieces
Probabilities. Before integrating, compare the values in the question with the join.
• If the interval lies entirely on one side of the join — for example P(4 ≤ X ≤ 5) when the join
is at 3 — use that one rule. No breaking needed.
• If the interval crosses the join — for example P(2 ≤ X ≤ 5) when the join is at 3 — break it at
the join, in words, before you integrate:
P(2 ≤ X ≤ 5) = P(2 ≤ X < 3) + P(3 ≤ X ≤ 5) .
|
{z
} |
{z
}
first rule
second rule
Writing that line takes ten seconds and prevents the most common error in the topic: using one
rule across the whole interval.
Means and variances. Same idea. Each integral becomes two:
E( X ) =
Z 3
0
x · 19 x dx +
Z 6
3
x · 91 (6 − x ) dx.
Then Var( X ) = E X 2 − {E( X )}2 exactly as usual.
Modes. The mode is the highest point of the graph. Look at each piece in turn and compare.
The highest point might be a peak inside one piece, or at the join, or at the far end of the range.
Two-piece densities, using the gardening example
Find k :
Probability across the join:
Mean:
Z 3
0
kx dx +
Z 6
3
k (6 − x ) dx = 1
P(2 ≤ X ≤ 5) =
E( X ) =
Z 3
0
Z 3
2
1
9 x dx +
x · 91 x dx +
Z 6
3
Z 5
3
(or: area of triangle = 1)
1
9 (6 − x ) dx
x · 91 (6 − x ) dx
Extra equations, only if the diagram supports them: the graph reaches 0 at the end of the range;
9231 FS1 | Continuous Random Variables
7
the two rules agree at the join.
2.4 Worked examples
Worked Example 1 (Textbook Example 1.1 — every step explained). The number of hours Nabilah spends each day
working in her garden is modelled by the continuous random variable X, with probability density function f given
by
0 ≤ x < 3,
kx
f( x ) = k (6 − x ) 3 ≤ x ≤ 6,
0
otherwise.
(i) Find the value of k. (ii) Sketch the graph of f( x ). (iii)
Find the probability that Nabilah works between 2 and 5
hours in her garden on a randomly selected day.
Worked Example 1. Two rules,
joined at x = 3. Shaded: P(2 ≤ X ≤ 5).
Figure 4.
Solution. (i) Find k. The only fact we have about any density is that the total area is 1. Two rules, so two
integrals:
Z 3
0
kx dx +
Z 6
3
k(6 − x ) dx = 1.
Integrate each one. (k is just a number, so it comes along for the ride.)
kx2
2
3
6
kx2
+ 6kx −
= 1.
2 3
0
First bracket: put in 3, then take away the value at 0:
9k
9k
−0 = .
2
2
9k
Second bracket: put in 6, then take away the value at 3: (36k − 18k) − 18k −
2
Add and solve:
1
9k 9k
+
= 9k = 1
so
k= .
2
2
9
= 18k − 13.5k =
9k
.
2
Quicker: the graph is a triangle, base 6, height 3k. Area 12 × 6 × 3k = 9k = 1. Same answer, one line.
1
3
1
(ii)
Sketch. Now k = 9 , so the peak height is f(3) = 9 = 3 . Draw a straight line from (0, 0) up to
3, 31 , then straight down to (6, 0). That is the diagram alongside the question.
(iii) P(2 ≤ X ≤ 5). Look at the diagram. The shaded part runs from 2 to 5, and the rule changes at 3,
right in the middle of it. So break it there:
P(2 ≤ X ≤ 5) = P(2 ≤ X < 3) + P(3 ≤ X ≤ 5) =
Z 3
2
1
9 x dx +
Z 5
3
1
9 (6 − x ) dx.
2 3 5
x
2x
x2
+
−
.
18 2
3
18 3 9
4
5
10 25
1
35 27
8
First:
−
= . Second:
−
− 2−
=
−
= .
18 18
18
3
18
2
18 18
18
Integrate:
P(2 ≤ X ≤ 5) =
5
8
13
+
=
= 0.72 (2 d.p.)
18 18
18
Does it look right? The shaded region is most of the triangle, so an answer near 0.7 makes sense. Always
glance at the picture to check.
9231 FS1 | Continuous Random Variables
8
Worked Example 2 (Textbook Example 1.2 — same skills,
new numbers). The continuous random variable X has
probability density function f where f( x ) = kx for 0 ≤ x ≤
2, 4k − kx for 2 < x ≤ 4, and 0 otherwise. (i) Find the
value of the constant k. (ii) Sketch y = f( x ). (iii) Find
P(1 ≤ X ≤ 3.5).
Worked Example 2. Shaded:
P(1 ≤ X ≤ 3.5), crossing the join at 2.
Figure 5.
Solution. (i) Total area = 1:
Z 2
0
kx dx +
Z 4
2
(4k − kx ) dx = k
2 2
4
x
x2
+ k 4x −
= 2k + k{(16 − 8) − (8 − 2)} = 2k + 2k = 4k.
2 0
2 2
base 4, height 2k, area 4k. ✓)
So 4k = 1 and k = 41 . (Check by thetriangle:
(ii) A triangle from (0, 0) up to 2, 21 and down to (4, 0) — the diagram alongside.
(iii) Put k = 14 in first. The second rule becomes 1 − 14 x. The shaded interval 1 to 3.5 crosses the join at
2, so break it:
2 2 3.5
x
x2
P(1 ≤ X ≤ 3.5) =
dx =
+ x−
8 1
8 2
1
2
1 1
12.25
1
3 15
27
=
−
+
3.5 −
− 2−
= +
=
= 0.844 (3 s.f.)
2 8
8
2
8 32
32
Z 2
1
4 x dx +
Z 3.5 1 − 41 x
Worked Example 3 (Three unknowns, using the diagram).
The density in the diagram is flat at height a from x = 0
to x = 2, then falls in a straight line b − cx to reach zero at
x = 6. There is no gap at x = 2. Find a, b and c, and state
the median.
Worked Example 3. A rectangle then a triangle. The rectangle alone has
area 12 , so the median is at the join.
Figure 6.
Solution. Three unknowns, so we need three equations. Read them off the diagram.
The graph reaches zero at x = 6. Put 6 into the second rule: b − 6c = 0, so b = 6c.
No gap at x = 2. Both rules give the same height there. The first rule gives a; the second gives b − 2c.
So a = b − 2c = 6c − 2c = 4c.
Total area = 1. The shape is a rectangle (2 wide, a tall) plus a triangle (base 4, height a): 2a + 21 × 4 × a =
4a = 1.
1
Now unwind: a = 14 , then c = 4a = 16
, then b = 6c = 83 .
Median. Before solving anything, ask: how much area is in the rectangle? It is 2 × 41 = 21 — exactly
half. So half the probability lies below x = 2, and the median is m = 2. No equation needed. Checking the
area at the join first is always the right first move; it tells you which piece the median is in.
9231 FS1 | Continuous Random Variables
9
2.5 Practice questions
Textbook questions first, easiest first. Real exam questions at the end.
[Exercise 1A Q1]
Q1.
A random variable X has PDF f( x ) = kx
for 0 ≤ x < 5, k (10 − x ) for 5 ≤ x ≤ 10, and 0 otherwise. (i)
Find the value of the constant k. (ii) Sketch y = f( x ). (iii)
Find P(4 ≤ X ≤ 6).
Q1. Shaded: P(4 ≤ X ≤ 6), split
at the peak.
Figure 7.
Solution. (i) Same shape as Worked Example 1. A triangle, base 10, height f(5) = 5k. Area 21 × 10 × 5k =
1
25k = 1, so k = 25
= 0.04.
(ii) Peak height 5 × 0.04 = 0.2. A line from (0, 0) up to (5, 0.2), then down to (10, 0) — as in the
diagram.
(iii) The shaded strip runs from 4 to 6 and the join is at 5, in the middle. Break it there:
P(4 ≤ X ≤ 6) =
Z 5
4
x
dx +
25
Z 6
5
2 5 6
10x
x
x2
10 − x
+
.
dx =
−
25
50 4
25
50 5
25 − 16
= 0.18. Second: (2.4 − 0.72) − (2 − 0.5) = 0.18. Total 0.36.
50
The two halves are equal because the strip is symmetric about the peak. Spotting that would have
halved the work.
First:
[Exercise 1A Q3]
Q2.
The random variable X has the following PDF: f( x ) = 0.01( a + x ) for − a ≤ x < 0, 0.01( a − x ) for
0 ≤ x ≤ a, and 0 otherwise. (i) Find the value of a. (ii) Find
P(3 ≤ X ≤ 5). (iii) Find P(| X | < 4).
Q2. A symmetric triangle from
−10 to 10. Shaded: P(3 ≤ X ≤ 5), entirely
on one side of the join.
Figure 8.
Solution. (i) The unknown a appears in the range as well as the rule. Sketch first. At x = 0 both rules give
0.01a; at x = ± a both give 0. So it is a triangle with base 2a and height 0.01a:
2
1
2 × 2a × 0.01a = 0.01a = 1
so
a2 = 100,
a = 10.
(Take the positive root: a range from − a to a only makes sense if a > 0.)
(ii) The join is at 0. The strip from 3 to 5 is entirely to the right of it, so no breaking — use the second
rule only:
P(3 ≤ X ≤ 5) =
5
x2
0.01(10 − x ) dx = 0.01 10x −
= 0.01{(50 − 12.5) − (30 − 4.5)} = 0.12.
2 3
3
Z 5
9231 FS1 | Continuous Random Variables
10
(iii) | X | < 4 means “X is within 4 of zero”, i.e. −4 < X < 4. Always turn a modulus into a double
inequality like this first. It crosses the join at 0, so break it:
P(−4 < X < 4) =
Z 0
−4
0.01(10 + x ) dx +
Z 4
0
0.01(10 − x ) dx.
Each part is 0.01(40 − 8) = 0.32 (the graph is symmetric, so both halves match). Total 0.64.
[Exercise 1A Q2]
Q3.
A random variable X has PDF f( x ) =
( x − 1)(2 − x ) for 1 ≤ x ≤ 2, a for 2 ≤ x ≤ 4, and 0
otherwise. (i) Find the value of the constant a. (ii) Sketch
y = f( x ). (iii) Find P(1.5 ≤ X ≤ 2.5). (iv) Find P(| X − 2| <
1).
Q3. The curve drops to 0 at
5
x = 2 but the flat part starts at 12
: a jump.
Shaded: P(1.5 ≤ X ≤ 2.5).
Figure 9.
Solution. (i) The first piece is curved, so integrate it. Multiply out first: ( x − 1)(2 − x ) = − x2 + 3x − 2.
Z 2
1
2 8
3x2
1 3
1
x3
− 2x = − + 6 − 4 − − + − 2 = .
− x + 3x − 2 dx = − +
3
2
3
3 2
6
1
2
5
.
The second piece is a rectangle, 2 wide and a tall: area 2a. So 16 + 2a = 1, giving a = 12
(ii) See the diagram. Look at x = 2: the curve has come down to 0, but the flat part starts at height
5
12 . The density jumps. That is allowed — and it is why we could not have used a “no gap at the join”
equation here.
(iii) The shaded strip from 1.5 to 2.5 crosses the join at 2:
P(1.5 ≤ X ≤ 2.5) =
Z 2 1.5
2
− x + 3x − 2 dx +
Z 2.5
2
5
dx.
12
First integral, reusing the bracket from (i): value at 2 is − 32 ; value at 1.5 is −1.125 + 3.375 − 3 = −0.75;
1
5
5
difference 12
. Second integral: a rectangle 0.5 wide and 12
tall, area 24
.
P(1.5 ≤ X ≤ 2.5) =
1
5
7
+
=
= 0.292 (3 s.f.)
12 24
24
(iv) | X − 2| < 1 means “X is within 1 of 2”, i.e. 1 < X < 3. That includes the whole curved piece (area
5
1
6 , already known) plus a rectangle from 2 to 3 (area 1 × 12 ):
P(1 < X < 3) =
5
7
1
+
= .
6 12
12
No new integration — noticing that the whole first piece is included saved it.
9231 FS1 | Continuous Random Variables
11
[Exercise 1A Q6, rst part]
Q4.
The number of kilograms of
metal extracted from 10 kg of ore from a certain mine is
modelled by a continuous random variable X with probability density function f( x ), where f( x ) = cx (2 − x )2 if
0 ≤ x ≤ 2 and f( x ) = 0 otherwise, where c is a constant.
Show that c is 34 .
Q4 and Q5. The curve 34 x (2 −
2
x ) : highest near x = 32 , zero at both ends.
Figure 10.
Solution. One piece, but with brackets. Multiply out first: x (2 − x )2 = x 4 − 4x + x2 = 4x − 4x2 + x3 .
Then set the area to 1:
Z 2 0
2
c 4x − 4x + x
3
x4
4x3
+
dx = c 2x −
3
4
2
2
32
= c 8−
+4
3
0
4c
.
3
=
3
So 4c
3 = 1 and c = 4 , as required.
Do not integrate x and (2 − x )2 separately and multiply the answers. There is no product rule for
integrals. Multiply out, or substitute.
[Exercise 1A Q6, second part]
Q5.
For the same density f( x ) = 43 x (2 − x )2 on 0 ≤ x ≤ 2, find the mean
and variance of X. The cost of extracting the metal from 10 kg of ore is $10x. Find the expected
cost.
Solution. Use the multiplied-out form and put in an extra x (for the mean) or x2 (for E X 2 ):
E( X ) = 43
E X
2
= 43
Z 2
0
Z 2
0
4x2 − 4x3 + x4
3
4
4x − 4x + x
5
dx = 43
dx = 43
4x3
x5
− x4 +
3
5
4x5
4
x −
5
+
2
0
2
x6
6
0
= 34
= 34
32
32
− 16 +
3
5
128 32
16 −
+
5
3
= 34 ×
16
= 0.8,
15
= 0.8.
Var( X ) = E X 2 − {E( X )}2 = 0.8 − 0.64 = 0.16.
(It is a coincidence that the two came out equal. Nothing to read into it.)
Cost. The cost is 10X. Multiplying by 10 multiplies the average by 10, so the expected cost is 10 × 0.8 =
$8. Section 3 explains why this simple step works for multiplying but not for squaring.
9231 FS1 | Continuous Random Variables
12
[9231/44 June 2025 Q4(a)]
Q6.
The continuous random variable X has probability density function f given by f( x ) = kx
for 0 ≤ x < 1, kx2 for 1 ≤ x ≤ 2, and 0 otherwise. Show
6
that k = 17
.
[2]
Q6. Two curved pieces; this one
happens to be joined up at x = 1.
Figure 11.
Solution. Both pieces curve, so integrate. Total area = 1: M1
Z 1
0
kx dx +
Z 2
1
kx2 dx = k
2 1
3 2
x
x
k
8 1
k 7k
17k
+k
= +k
−
= +
=
.
2 0
3 1
2
3 3
2
3
6
17k
6
= 1 and k = . A1 (AG)
6
17
Two marks: one for the correct pair of integrals, one for reaching the printed answer with the working
shown.
So
[9231/43 June 2025 Q3(a)]
Q7.
A continuous random variable
X has probability density function f given by f( x ) = kx for
0 ≤ x < 1, k (8 − x ) for 1 ≤ x ≤ 8, and 0 otherwise, where
1
.
[2]
k is a constant. Show that k = 25
Figure 12. Q7. The density jumps at x = 1.
The area rule works regardless.
Solution.
2 1
8
x
x2
k
k 49k
kx dx +
k (8 − x ) dx = k
+ k 8x −
= + k{(64 − 32) − (8 − 0.5)} = +
= 25k.
2
2
2
2
2
0
1
0
1
Z 1
Z 8
M1
1
. A1 (AG)
25
This is the jumping density from the warning box. The jump made no difference: the area equation
never asks whether the graph is joined up. (And notice that a “no gap” equation would have said k = 7k
— nonsense. That is what happens when you assume a join that is not there.)
So 25k = 1 and k =
9231 FS1 | Continuous Random Variables
13
[9231/41 & 9231/43 November 2025 Q5(a)]
Q8.
A continuous
random variable X has probability density function f given
1√
1
by f( x ) =
x for 0 ≤ x < 4, √ for 4 ≤ x ≤ 9, and 0
16
k x
otherwise, where k is a constant. Show that k = 3.
[2]
Q8. Climbs
like
√
then falls like 1/ x.
√
Figure 13.
Solution. First, turn the surds into powers:
Z 4
0
First term: 43/2 = 8, so
1 1/2
x dx +
16
Z 9
4
√
x, jumps at 4,
1
x = x1/2 and √ = x −1/2 . Now integrate: M1
x
1 −1/2
1 2 3/2 4 1 h 1/2 i9
2x
.
x
dx =
x
+
k
16 3
k
4
0
1
2
1
1
2
× × 8 = . Second term: (2 × 3 − 2 × 2) = .
16 3
3
k
k
1 2
+ =1
3 k
so
2
2
= ,
k
3
k = 3.
A1 (AG)
[9231/41 & 9231/42 June 2025 Q2(a)]
Q9.
As shown in the
diagram, the continuous random variable X has probability
density function f given by f( x ) = a for 0 ≤ x ≤ 5, b −
cx for 5 ≤ x ≤ 8, and 0 otherwise, where a, b and c are
2
constants. Show that a = 13
and find the values of b and c.
[3]
Q9. The exam diagram: no gap
at 5, and the graph reaches zero at 8. Both
are equations.
Figure 14.
Solution. Three unknowns. The diagram gives two equations, the area gives the third.
Reaches zero at 8: b − 8c = 0, so b = 8c.
No gap at 5: both rules give the same height. a = b − 5c = 8c − 5c = 3c.
Area = 1. A rectangle (5 wide, a tall) plus a triangle (base 3, height a): M1
5a + 12 × 3 × a =
13a
= 1.
2
2
a
2
16
A1 (AG), then c =
=
and b = 8c =
. A1
13 R
3
39
39
R
5 2
8
2
10
3
Check: 0 13
dx + 5 16
39 − 39 x dx = 13 + 13 = 1 ✓
Here the “no gap” equation was allowed — because the diagram shows one unbroken line. Compare
Q3, where it was not. The diagram decides.
So a =
9231 FS1 | Continuous Random Variables
14
[Based on 9231/44 November 2025 Q2 additional]
Q10.
The
continuous random variable X has probability density function f given by f( x ) = 94 ( x + 1) for 0 ≤ x ≤ 1, ( x − 2)2 for
1 < x ≤ 2, and 0 otherwise. (i) Verify that f is a valid probability density function. (ii) Is f continuous at x = 1? (iii)
State the mode of X.
Q10. A jump at x = 1, from 89
up to 1. Highest point: just after x = 1.
Figure 15.
Solution. (i) “Valid” means two checks.
Never below the axis? On 0 ≤ x ≤ 1, x + 1 is positive so 94 ( x + 1) is positive. On 1 < x ≤ 2, ( x − 2)2 is a
square, never negative. ✓
Total area 1?
1 2
Z 1
Z 2
4 x2
( x − 2)3
1
4 3
2 1
2
4
( x − 2) dx =
+x +
= × + 0+
= + = 1. ✓
9 ( x + 1) dx +
9 2
3
9 2
3
3 3
0
1
0
1
Both hold, so it is a valid density.
(ii) Just before x = 1 the first rule gives 94 × 2 = 89 . Just after, the second rule gives (1 − 2)2 = 1. Not
equal, so no — the density jumps up by 19 at x = 1, as the diagram shows. It is still valid.
(iii) Look at the diagram. The first piece climbs to 89 . The second piece starts at 1 and falls to 0. The
highest point is at the start of the second piece: the mode is x = 1. Neither piece has a peak in its middle,
so differentiating would have found nothing — comparing the pieces by eye is the method.
9231 FS1 | Continuous Random Variables
15
3 The mean and variance of a function of X
3.1 The idea
Very often the quantity you care about is not X itself. It is something worked out from X.
• You measure a temperature C in Celsius but need it in Fahrenheit: F = 1.8C + 32.
• You measure the side L of a square but want its area: A = L2 .
• Metal is extracted in a random amount X kg and the cost is $10X.
In each case a random number goes into a formula, and a new random number comes out. If
X is random, then X 2 is random, 3X + 4 is random, 1/X is random. We write g( X ) — “g of X” —
to mean any such formula applied to X. The question is: what is the mean of g( X ), and what is
its variance?
The good news: you can answer this using only the density of X. You never need to find out
how g( X ) itself is distributed.
3.2 Why the formula looks the way it does
Start with a discrete variable, which you already know. If X takes values x1 , x2 , . . . with probabilities p1 , p2 , . . ., then the mean of X 2 is
E X 2 = x12 p1 + x22 p2 + · · ·
In words: whenever X is x1 , the new quantity is x12 , and that happens with probability p1 . So you average
the squares, weighting each by how likely it is. For any formula g it is the same: E(g( X )) =
g( x1 ) p1 + g( x2 ) p2 + · · ·
For a continuous variable, “adding up” becomes “integrating”, and the probability pi becomes
“height of the graph times a tiny width”. The result is
E(g( X )) =
Z
g( x ) f( x ) dx
R
Compare it with the familiar mean, E( X ) = x f( x ) dx. It is the same formula with x replaced
by g( x ). To find the mean of X 2 you integrate x2 f( x ). To find the mean of 1/X you integrate
1
x f( x ). You still multiply “value” by “height of the graph” and find the area — only the value has
changed.
The variance follows the usual recipe, “mean of the square minus square of the mean”, applied
to the new quantity:
Z
Var(g( X )) =
{g( x )}2 f( x ) dx − {E(g( X ))}2 .
Give the new quantity a name. If the question is about X 2 , write Y = X 2 . Then you are
finding E(Y ) and Var(Y ), which feels less abstract. But notice: every integral is still “with
respect to x”, using the density of X. The graph of Y never appears. (Finding the graph of Y
is a separate job, done in Section 5.)
If the density is in two pieces, break each integral at the join, exactly as in Section 2.
9231 FS1 | Continuous Random Variables
16
3.3 Straight-line formulas: two results to memorise
If the formula is a straight line, g( x ) = ax + b, the integrals collapse to something very simple:
E( aX + b) = a E( X ) + b,
Var( aX + b) = a2 Var( X ).
Why the first is true: multiplying every value by a multiplies the average by a; adding b to every
value adds b to the average.
Why the second is true: variance measures spread. Adding b slides the whole distribution along
without changing its spread, so b vanishes. Multiplying by a makes every gap a times wider, and
variance is built from squared gaps, so it is multiplied by a2 .
The biggest trap in the whole chapter
For a straight-line formula you may put the mean straight into the formula. For any other
formula you may not:
√ q
1
1
2
2
X ̸ = E( X ).
E X ̸= {E( X )} ,
E
̸=
,
E
X
E( X )
See why with numbers. Let X be 1 or 3, each with probability 21 . Then E( X ) = 2, so
{E( X )}2 = 4. But X 2 is 1 or 9, each with probability 21 , so E X 2 = 5. Squaring stretches
large values more than small ones, so the average goes up.
In fact E X 2 = Var( X ) + {E( X )}2 always — the two differ by exactly the variance. For any
curved formula, integrate.
3.4 Two useful shortcuts
Rearranging the variance formula. From Var( X ) = E X 2 − {E( X )}2 you get
E X 2 = Var( X ) + {E( X )}2 .
Handy when a question gives you the variance and you need E X 2 .
Splitting a sum. You may deal with a sum of terms one at a time, and pull constants out:
E 3X 2 + 4X + 7 = 3 E X 2 + 4 E( X ) + 7.
If you already know E( X ) and E X 2 , this replaces a long integral with three multiplications. Be
clear what is allowed: you may split a sum, and pull out a multiplier. You may not replace E X 2
by {E( X )}2 — that is the trap above.
There is also an older form of the variance, the “average squared distance from the mean”:
Var( X ) =
Z
( x − µ)2 f( x ) dx
(µ = E( X )).
It always gives the same number as E X 2 − µ2 , but the integral is messier, so use the usual form
unless a question asks for this one.
Functions of X
E(g( X )) =
Var(g( X )) =
Z
Z
g( x ) f( x ) dx
— “value g( x ) times height, then area”
{g( x )}2 f( x ) dx − {E(g( X ))}2 .
Straight lines only: E( aX + b) = aE( X ) + b and Var( aX + b) = a2 Var( X ).
9231 FS1 | Continuous Random Variables
17
Sums: E 3X 2 + 4X + 7 = 3E X 2 + 4E( X ) + 7.
Curved formulas: E(g( X )) ̸= g(E( X )). Integrate.
3.5 Worked examples
Worked Example 4 (Textbook Example 1.3 — the straight–
line results, in full). The continuous random variable X has
x
density f( x ) =
for 0 ≤ x ≤ 10, and 0 otherwise. (i) Find
50
E(3X + 4). (ii) Find 3E( X ) + 4. (iii) Find Var(3X + 4). (iv)
Verify that Var(3X + 4) = 32 Var( X ).
Worked Example 4. The denx
sity f( x ) = 50
: a straight line from 0 up to
height 0.2 at x = 10.
Figure 16.
Solution. The point of this example is to watch the two straight-line results happen.
(i) From the definition. Here g( x ) = 3x + 4. Put it where x usually goes, multiply out, then integrate:
E(3X + 4) =
Z 10
0
(3x + 4) ·
x
dx =
50
Z 10
0
3
10
x
x2
3x2 + 4x
= 20 + 4 = 24.
dx =
+
50
50 25 0
(ii) By the shortcut. First the plain mean:
E( X ) =
Z 10
0
x·
3 10
1000
x
x
20
=
dx =
= .
50
150 0
150
3
Then 3E( X ) + 4 = 3 × 20
3 + 4 = 24. Same as (i), as promised.
R In an exam, use the shortcut.
(iii) Variance from the definition. Use Var(g( X )) = {g( x )}2 f( x ) dx − {E(g( X ))}2 with E(3X + 4) =
24 from part (i). Square the bracket, then multiply by x: (3x + 4)2 x = 9x3 + 24x2 + 16x.
Var(3X + 4) =
1
50
Z 10 0
10
1 9x4
31 300
9x3 + 24x2 + 16x dx − 242 =
+ 8x3 + 8x2
− 576 =
− 576 = 50.
50 4
50
0
(iv) Check against 9 Var( X ).
4 10
Z 10
x
x
dx =
E X2 =
x2 ·
= 50,
50
200 0
0
Var( X ) = 50 −
20
3
2
=
50
.
9
So 9 Var( X ) = 50 = Var(3X + 4). ✓ Notice the +4 made no difference to the variance, exactly as predicted.
9231 FS1 | Continuous Random Variables
18
Worked Example 5 (Textbook Example 1.2(iv) — a squared
quantity, two pieces). The continuous random variable X
has density f( x ) = 14 x for 0 ≤ x ≤ 2, 1 − 41 x for 2 < x ≤ 4,
and 0 otherwise. The continuous random variable Y = X 2 .
Find E(Y ).
Worked Example 5. Symmetric
about x = 2, so E( X ) = 2. But E( X 2 ) is not
4.
Figure 17.
R
Solution. Y = X 2 , so we want E X 2 = x2 f( x ) dx. Two pieces, so break at x = 2, and multiply out
before integrating:
E (Y ) =
Z 2
0
x2 · 14 x dx +
Z 4
2
Z 2
Z 4
2
1 3
1 3
x2 1 − 41 x dx =
x
dx
+
x
−
x
dx
4
4
0
2
4 2 3
4
x
x
64
x4
8
11
14
+
= 1+
=
−
− 16 −
−1
= 1+
= .
16 0
3
16 2
3
3
3
3
So E(Y ) = 14
3 ≈ 4.67.
The trap, seen in numbers. The graph is symmetric about 2, so E( X ) = 2 and {E( X )}2 = 4. But E X 2 =
4.67. The gap, 23 , is exactly Var( X ).
Worked Example 6 (A reciprocal). The continuous random
3
variable X has density f( x ) = 4 for x ≥ 1, and 0 otherwise.
x
1
Find E( X ) and E
. Compare them.
X
Worked Example 6. f( x ) =
3/x4 starts at height 3 and dies away; the
range goes on for ever.
Figure 18.
Solution. The range has no top, so the upper limit is ∞. Integrate as usual, then ask what the bracket does
as x gets huge.
Z ∞
Z ∞
3
3 −2 ∞
−3
E( X ) =
x · 4 dx =
3x dx = − x
.
2
x
1
1
1
As x → ∞, x −2 → 0, so the top gives 0. The bottom gives − 32 . Subtract: E( X ) = 0 − − 32 = 32 .
1
Now g( x ) = :
x
Z ∞
Z ∞
1
1 3
3 −4 ∞
3
−5
E
=
·
dx =
3x dx = − x
= .
X
4
4
1 x x4
1
1
1
2
1
= = 0.667, but E
= 0.75. Not equal — and no reason they should be, because 1/x
Compare.
E( X )
3
X
is not a straight line.
9231 FS1 | Continuous Random Variables
19
3.6 Practice questions
[Exercise 1A Q4]
Q1.
A continuous random variable X has the PDF f( x ) = k for 0 ≤ x ≤ 5 and
0 otherwise. (i) Find the value of k. (ii) Sketch the graph of f( x ). (iii) Find E( X ). (iv) Find
E(4X − 3) and show that your answer is the same as 4E( X ) − 3.
Solution. (i) A rectangle, 5 wide and k tall, area 5k = 1, so k = 0.2.
(ii) A flat line at height 0.2 from x = 0 to x = 5. This shape is called a uniform (or rectangular)
distribution: every value is equally likely.
R5
5
(iii) E( X ) = 0 x × 0.2 dx = 0.1x2 0 = 2.5. Sensible: the midpoint of 0 to 5.
R5
5
(iv) Definition: E(4X − 3) = 0 (4x − 3) × 0.2 dx = 0.2 2x2 − 3x 0 = 0.2(50 − 15) = 7. Shortcut:
4E( X ) − 3 = 4(2.5) − 3 = 7. The same.
[Exercise 1A Q5]
Q2.
The continuous randomvariable X has PDF f( x ) = 4x3 for 0 ≤ x ≤ 1, and
0 otherwise. (i) Find E( X ). (ii) Find E X 2 . (iii) Find Var( X ). (iv) Verify that E(5X + 1) =
5E( X ) + 1.
i1
h
R1
Solution. (i) Multiply the density by x, integrate: E( X ) = 0 4x4 dx = 45 x5 = 45 .
0
i1
h
R1
(ii) Multiply by x2 instead: E X 2 = 0 4x5 dx = 46 x6 = 23 .
0
(iii) Combine them — never just square part (i):
2
Var( X ) = −
3
2
4
2 16
2
= −
=
= 0.0267 (3 s.f.)
5
3 25
75
Small, because 4x3 piles nearly all the probability close to x = 1.
R1
R1
1
(iv) E(5X + 1) = 0 (5x + 1)4x3 dx = 0 20x4 + 4x3 dx = 4x5 + x4 0 = 5, and 5E( X ) + 1 = 4 + 1 =
5. ✓
[Exercise 1A Q8]
Q3.
A continuous random variable X has
2
PDF f( x ) = 12x (1 − x ) for 0 ≤ x ≤ 1, and 0 otherwise.
(i) Find µ, the mean of X. (ii) Find E(6X − 7) and show
that your answer is the same as 6E( X ) − 7. (iii) Find the
standard deviation of X. (iv) What is the probability that
a randomly selected value of X lies within one standard
deviation of µ?
Q3. Shaded: the values within
one standard deviation of the mean, from
0.4 to 0.8. Area 0.64.
Figure 19.
Solution. (i) µ =
R
2 (1 − x ) dx = 12 1 x3 − x4 dx = 12 1 − 1 = 12 × 1 = 0.6.
x
·
12x
4
5
20
0
0
R1
(ii) Shortcut: 6(0.6) − 7 = −3.4. By integration:
12
Z 1
0
2
(6x − 7) x − x
3
dx = 12
Z 1
0
13x3 − 6x4 − 7x2
dx = 12
13
6
7
4 − 5 − 3
= −3.4. ✓
(A mean can be negative. A variance cannot.)
R1
(iii) E X 2 = 12 0 x4 − x5 dx = 12 15 − 16 = 0.4, so Var( X ) = 0.4 − 0.36 = 0.04 and the standard
√
deviation is σ = 0.04 = 0.2.
(iv) “Within one standard deviation of µ” means from µ − σ = 0.4 to µ + σ = 0.8 — the shaded strip
in the diagram. Its area:
P(0.4 < X < 0.8) =
Z 0.8
0.4
h
i0.8
12x2 (1 − x ) dx = 4x3 − 3x4
= (2.048 − 1.2288) − (0.256 − 0.0768) = 0.64.
0.4
9231 FS1 | Continuous Random Variables
20
[Exercise 1A Q7]
Q4.
A continuous random variable Y has PDF f(y) = 29 y(3 − y) for 0 ≤ y ≤
3, and 0 otherwise. (i) Find E(Y ). (ii) Find E Y 2 . (iii) Find E Y 2 − {E(Y )}2 . (iv) Find
Z 3
2
E 2Y + 3Y + 4 . (v) Find
{y − E(Y )}2 f(y) dy. Why is the answer the same as that for part
0
(iii)?
Solution. (The variable is called y here. The letter does not matter.)
h
i3
R3
y4
3
(i) E(Y ) = 92 0 3y2 − y3 dy = 29 y3 − 4
= 29 × 27
4 = 2 . (The graph is symmetric about 1.5, so this
0
is no surprise.)
h 4
i3
R3
3y
y5
(ii) E Y 2 = 29 0 3y3 − y4 dy = 29 4 − 5
= 92 × 243
20 = 2.7.
0
(iii) 2.7 − 1.52 = 0.45. This is the variance.
(iv) Split the sum, using the values already found: 2(2.7) + 3(1.5) + 4 = 13.9.
(v) With E(Y ) = 1.5, multiply out (y − 1.5)2 · 29 y(3 − y) and integrate:
Z 3
4
3
2
2
−
y
+
6y
−
11.25y
+
6.75y
dy = 29 (2.025) = 0.45.
9
0
Why the same? Both parts are the variance. Part (v) is the original meaning: average squared distance
from the mean. Part (iii) is the quick formula. Multiplying out (y − µ)2 = y2 − 2µy + µ2 and integrating
each term turns (v) into (iii). So they must agree — and (iii) is far less work, which is why it is the one to
use.
[Exercise 1A Q9]
2
(7 − x ) for 2 ≤ x ≤ 7,
Q5.
The continuous random variable X has PDF f( x ) = 25
2 + 4x + 7. (i) Find E( X ). (ii) Find
and 0 otherwise. The function
g
(
x
)
is
defined
by
g
(
x
)
=
3x
E(g( X )). (iii) Find E X 2 and hence find 3E
X 2 + 4E( X ) + 7. (iv) Use your answers to parts
(ii) and (iii) to verify that E(g( X )) = 3E X 2 + 4E( X ) + 7.
h
i7
R7
2
2
11
2 dx = 2 7x2 − x3
Solution. (i) E( X ) = 25
7x
−
x
= 25
× 275
25
2
3
6 = 3 = 3.67 (3 s.f.)
2
2
(ii) The long way. Multiply out 3x2 + 4x + 7 (7 − x ) = −3x3 + 17x2 + 21x + 49, then
h
i7
3
2
21 2
2
E(g( X )) = 25
− 34 x4 + 17
x
+
x
+
49x
= 25
(1000.42 − 173.33) = 397
3
2
6 = 66.2 (3 s.f.)
2
(iii) E X
2
R7
2
= 25
2
11
397
3 +7 = 6 .
7x2 − x
3
2
dx = 25
h
7x3
4
x
3 − 4
i7
2
2
89
89
= 25
× 2225
12 = 6 = 14.8 (3 s.f.) Then 3 × 6 + 4 ×
(iv) Both are 397
6 . ✓
The lesson. Part (ii) was a long multiplication; part (iii) was three short integrals and some arithmetic.
They agree because g is a sum of terms, and you may take the mean term
√ by term. In an exam, find E( X )
2
and E X once and combine. (This does not work for something like 3x2 + 4x + 7, where the terms are
trapped inside a root.)
[Exercise 1A Q10]
Q6.
A toy company sells packets of
coloured plastic equilateral triangles. The length, X, of one
side of a triangle may be modelled as a random variable
with a uniform (rectangular) distribution for 2 ≤ x ≤ 8. (i)
Find the PDF of X. (ii) An equilateral triangle of side x has
area a. Find the relationship between a and x. (iii) Find
the probability that a randomly selected triangle has area
greater than 15 cm2 . (iv) Find the expectation and variance
of the area of a triangle.
Q6. X is uniform on 2 to 8.
Shaded: the sides that give an area over
15 cm2 , i.e. x > 5.89.
Figure 20.
Solution. (i) Uniform means flat. Width 6, area 1, so height 16 : f( x ) = 16 for 2 ≤ x ≤ 8, 0 otherwise.
9231 FS1 | Continuous Random Variables
21
√
(ii) An equilateral triangle of side x has height
√
3
3
1
2 x, so a = 2 × x × 2 x =
√
√
3 2
x .
4
3 2
x > 15 gives x2 > 34.64, so
4
x > 5.886. That is the shaded part of the diagram. For a flat graph the area is just width × height:
(iii) Turn the condition on the area into a condition on the side:
P( A > 15) = P( X > 5.886) = (8 − 5.886) × 61 = 0.352 (3 s.f.)
√
(iv) A =
3 2
X — a curved formula, so integrate.
4
E X
2
=
Z 8 2
x
2
512 − 8
dx =
= 28,
6
18
√
E( A ) =
√
3
× 28 = 7 3 = 12.1 (3 s.f.)
4
√
3
4 is just a multiplier, so it may come outside. It is the squaring that cannot be done to the mean.)
(The
Z
3 4
3 8 x4
3
32 768 − 32
E A2 =
E X =
dx =
×
= 204.6,
16
16 2 6
16
30
√ 2
Var( A) = 204.6 − 7 3 = 204.6 − 147 = 57.6.
√
The tempting wrong answer: E( X ) = 5, so 43 × 52 = 10.8. Wrong — the true mean area is 12.1. Putting the
mean side into the area formula ignores the variation in the sides.
[9231/41 & 9231/42 June 2025 Q2(b)]
Q7.
The continuous random variable X has probability density function f given by
2
2
f( x ) = 13
for 0 ≤ x ≤ 5, 16
39 − 39 x for 5 ≤ x ≤ 8, and 0
otherwise. Find the mean of X.
[3]
Q7. Flat then sloping. The
mean 3.31 sits to the right of the middle of
the flat part, pulled by the tail.
Figure 21.
Solution. Two pieces, so the mean integral breaks at x = 5: M1
Z 5
Z 8 2
2
16
E( X ) =
x·
dx +
x
− x dx.
13
39 39
0
5
First:
5
25
2 x2
= .
13 2 0
13
2
Second: take out 39
, leaving 8x − x2 :
E( X ) =
8
2
x3
2
54
18
4x2 −
= . A1
=
(85.33 − 58.33) =
39
3 5
39
39
13
25 18
43
+
=
= 3.31 (3 s.f.)
13 13
13
A1
Sense check with the diagram: most of the area is in the flat part, whose middle is 2.5; the sloping tail drags
the balance point to the right. 3.31 is where you would expect.
9231 FS1 | Continuous Random Variables
22
[9231/44 June 2025 Q4(d)]
Q8.
The continuous random variable X has probability density function f given by f( x ) =
6
6 2
17 x for0 ≤
x < 1, 17 x for 1 ≤ x ≤ 2, and 0 otherwise.
1
Find E
.
[2]
X
Figure 22.
Q8. The density of 9231/44
June 2025 Q4. Note that E(1/X ) is not
1/E( X ).
1
. Multiply the density by 1x on each piece and integrate. The 1x cancels neatly —
x
which is why this is only two marks: M1
Z 1
Z 2
Z 1
Z 2
1 6
1
1 6 2
6
6
=
E
· x dx +
· x dx =
dx +
x dx
X
0 x 17
1 x 17
0 17
1 17
Solution. Here g( x ) =
6
3
15
6
+
× =
= 0.882 (3 s.f.) A1
17 17 2
17
1
49
The wrong answer this question is fishing for: E( X ) = 34
= 1.44, and
= 0.694. That is not E(1/X ). Zero
1.44
marks.
=
[9231/42 November 2025 Q4(c)]1 A continuous random variable X has probability density
func529
Q9.
tion f( x ) = 15 for 1 ≤ x < 4,
Var( X ).
25 x for 4 ≤ x ≤ 6, and 0 otherwise. Given that E( X ) = 150 , find
Solution. The question hands you E( X ). Do not find it again — go straight for E
M1
X2
[3]
, breaking at x = 4:
Z 6 3
Z 4 x2
x
1
1
E X2 =
dx +
dx =
(64 − 1) +
(1296 − 256) = 4.2 + 10.4 = 14.6.
5
25
15
100
1
4
529 2
Var( X ) = 14.6 −
= 14.6 − 12.437 = 2.16 (3 s.f.) A1
150
A1
Keep 529
150 as a fraction and square it once at the end; rounding it early loses the third significant figure.
9231 FS1 | Continuous Random Variables
23
4 The cumulative distribution function
4.1 The idea
The density f answers “how concentrated is the probability near this value?”. Often the question
you really want answered is:
How much probability has been used up by this value?
What fraction of runners have finished by two hours? What proportion of planks have an
error of at most 8 mm? In symbols, what is P( X ≤ x )?
The function that answers this is the cumulative distribution function, or CDF for short.
It is written with a capital letter:
F( x ) = P( X ≤ x )
— “capital F of x is the probability that X is at
most x”.
Look at the two graphs. The left one is the
density, the shape you know. The right one is
F. To read F( x ), imagine sweeping from the
far left up to x, collecting area under the density as you go. F( x ) is the total collected. That
is why it starts at 0 (nothing collected yet),
climbs, and ends at 1 (everything collected).
Left: the density f, the height of the graph.
Right: the cumulative function F, the area collected so far.
It climbs from 0 at x = a to 1 at x = b and then stays at 1.
Figure 23.
Two functions for one variable keep them apart
Name
What it measures
Is it a probability?
Possible values
f( x ), small f
F( x ), capital F
density function
height of the graph at x
no
any number ≥ 0
cumulative function
area collected up to x
yes — it is P( X ≤ x )
from 0 up to 1
Cambridge never explains this convention; it just uses it. Writing f where you mean F is the
costliest slip in the chapter.
4.2 Getting F from f
F( x ) is an area, so we get it by integrating the density. There are two ways to write this down.
Both are correct.
Way 1: integrate, then fix the constant. Integrate f with no limits, keeping the “+ c”. Then
use the fact that nothing has been collected at the start of the range: if the range starts at x = a,
then F( a) = 0. That equation gives c.
Way 2: integrate between limits. Integrate from the start of the range up to x:
F( x ) =
Z x
a
f(u) du.
Notice the letter u. We want x to be the upper limit — “collect area up to x”. But the variable
inside the integral also needs a name, and it cannot also be x, or the same letter would mean
9231 FS1 | Continuous Random Variables
24
two different things at once. So we borrow a spare letter, u, for the inside. It is called a dummy
variable: it does its job inside the integral and disappears from the answer.
F( x ) =
Z x
a
f( x ) dx
WRONG
F( x ) =
Z x
a
f(u) du
RIGHT
Way 2 is quicker, and it is what mark schemes show.
Always write all three parts. F( x ) has a value for every x, not just inside the range. Below
the range nothing has been collected, so F = 0. Above the range everything has been collected,
so F = 1. A complete answer looks like
0
F( x ) = the integrated expression
1
x<a
(nothing collected yet),
a ≤ x ≤ b,
x>b
(all of it collected).
Leaving out the 0 and 1 lines loses a mark every time.
4.3 Two pieces: keep a running total
If f is in two pieces, build F piece by piece, like a running total.
Step 1. Integrate the first rule from the start of the range up to x. This is F on the first stretch.
Step 2. Put the join value in, to find how much has been collected by the join. Call this “the
total so far”.
Step 3. On the second stretch: total so far, plus the new area since the join:
F( x ) = F(join) +
| {z }
total so far
Z x
join
|
(second rule) du .
{z
}
new area since the join
Forgetting to add the “total so far” is the classic mistake. Luckily it shows itself: your F will not
reach 1 at the top of the range.
Three ten-second checks, every time
(a) Put in the bottom of the range: do you get 0?
(b) Put in the top of the range: do you get 1?
(c) Put the join value into both expressions: do they agree?
These catch nearly every slip. Do them before using F for anything else, because a wrong F
wrecks every later part of the question.
One more fact: F is always joined up, even when f jumps. A jump in the density only makes
a corner in F, never a gap. If your F has a gap, something is wrong.
9231 FS1 | Continuous Random Variables
25
4.4 What F lets you do
Probabilities become subtractions. Look at
the diagrams. The shaded area on the left is
P(c ≤ X ≤ d). On the right, F(d) is everything collected up to d, and F(c) is everything
collected up to c. Take one from the other and
what is left is exactly the shaded strip:
P( c ≤ X ≤ d ) = F( d ) − F( c ).
No integrating — just two substitutions and a
subtraction. This is the main reason for wanting F at all.
24.
The same probability two ways. Left: the
shaded area under the density between c and d. Right: how
far F climbs between c and d.
Figure
The median is where F reaches a half. The median m is the
value with half the probability below it. “Probability below
it” is exactly what F measures. So
F(m) = 0.5.
The diagram shows this: find 0.5 on the vertical axis, go
across to the curve, drop down. In the same way, the 10th
percentile is where F = 0.1, the upper quartile is where
p
Figure 25. Reading the median: go across
F = 0.75, and so on: F( x p ) =
for the pth percentile.
at height 0.5, then drop down to the axis.
100
Going backwards: differentiate. F was made by integrating f. Differentiating undoes integrating. So
d
f( x ) =
F( x ).
dx
If a question gives you F and asks for f, differentiate each part. The flat parts (0 and 1) differentiate
to 0, which is the “0 otherwise” of the density.
Shape. F never goes down — probability can only pile up as you move right. Its stretched-S
shape is called an ogive. You have drawn one before: a cumulative frequency curve.
9231 FS1 | Continuous Random Variables
26
4.5 Finding a median when there are two pieces
With two pieces the median could be in either, and
you cannot tell by looking. So first work out how
much area is in the first piece. Call it A1 .
• If A1 > 0.5, the median is inside the first piece.
Use the first rule.
• If A1 < 0.5, the median is inside the second
piece. Use the second rule — and remember to
add A1 as the total so far.
• If A1 = 0.5 exactly, the median is the join. Done.
The diagram shows a real exam density. The flat
part holds 0.77 of the area, so the median must be
inside it, and the equation to solve is the easy one.
If you skip this check and pick the wrong piece, you
will solve a quadratic and get an answer outside
that piece’s range. Not a disaster — it tells you to
try the other piece — but it wastes time.
Figure 26. Which piece holds the median? The flat
piece alone holds 10
13 ≈ 0.77 of the area — more than
half — so the median is inside it, at x = 3.25.
The cumulative distribution function
F( x ) = P( X ≤ x ) =
Z x
a
f(u) du
F( x ) = 0 below the range,
P( c ≤ X ≤ d ) = F( d ) − F( c ),
(area collected up to x; u is a stand-in letter)
F( x ) = 1 above it,
F never decreases and has no gaps
F(m) = 0.5 for the median,
f( x ) =
d
F( x )
dx
Two pieces: on the second stretch, F = (total so far) + (new area since the join). Check: 0 at
the bottom, 1 at the top, the two expressions agree at the join.
9231 FS1 | Continuous Random Variables
27
4.6 A real use: is this model any good?
A community half-marathon had 500 runners, all
finishing within 4 hours. The organisers recorded
what percentage had finished by various times.
Someone suggested a model: a runner’s time X
hours has density
4
f( x ) = 27
( x − 1)(4 − x )2
for 1 ≤ x ≤ 4.
Is the model any good? The recorded data is cumulative — “percentage finished by time t” — so to
compare, we need F.
Using Way 1: multiply out ( x − 1)(4 − x )2 = x3 −
9x2 + 24x − 16, integrate, and keep the constant:
27.
The model’s F (solid) against what
actually happened (dashed, crosses). The shape
matches; the model runs behind in the middle of the
race.
Figure
2
1 4
64
F( x ) = 27
x − 49 x3 + 16
9 x − 27 x + c.
Nobody finishes in under an hour, so F(1) = 0. Put
x = 1 in and solve: c = 1.
Now the model’s “proportion finished by time x” is a substitution. At two hours, F(2) =
16
32
64
128
11
−
27
9 + 9 − 27 + 1 = 27 = 0.41, against 0.49 in reality. Across the race:
Time (h)
1.00
1.25
1.50
1.75
2.00
2.25
2.50
3.00
3.50
4.00
Model
Runners
0.00
0.00
0.04
0.03
0.13
0.15
0.26
0.33
0.41
0.49
0.55
0.57
0.69
0.75
0.89
0.91
0.98
0.99
1.00
1.00
The model has the right shape and matches at both ends, but it lags in the middle: it says 41%
had finished by two hours when 49% actually had. Whether that is good enough is a judgement,
not a calculation — an organiser placing marshals would care most about the busiest half-hour.
4.7 Worked examples
Worked Example 7 (Textbook Example 1.4 —
the complete tour). A machine saws planks
to a nominal length. The continuous random
variable X is the error in millimetres, with
10 − x
f( x ) =
for 0 ≤ x ≤ 10, and 0 other50
wise. (i) Sketch f( x ). (ii) Find the cumulative
distribution function F( x ). (iii) Sketch F( x )
for 0 ≤ x ≤ 10. (iv) Find P(2 ≤ X ≤ 7).
(v) Find the median value of X. A customer
refuses planks with error greater than 8 mm.
(vi) What percentage of planks does he reject?
Worked Example 7. Left: the density, a line sloping down. Right: its cumulative function, with the median
2.93 marked.
Figure 28.
Solution. (i) At x = 0 the height is 10
50 = 0.2; at x = 10 it is 0; in between it is a straight line. That is the
left-hand graph. Small errors are more likely than big ones — what you would hope from a saw.
(ii) Way 2: integrate from the start of the range, 0, up to x, using u inside:
F( x ) =
Z x
0
x
10 − u
1
u2
1
x2
x
x2
du =
10u −
=
10x −
= −
.
50
50
2 0
50
2
5 100
9231 FS1 | Continuous Random Variables
28
All three parts:
0
x2
x
F( x ) =
−
5 100
1
x < 0,
0 ≤ x ≤ 10,
x > 10.
Checks: F(0) = 0 ✓ F(10) = 2 − 1 = 1 ✓
(iii) The right-hand graph. It starts at (0, 0), climbs steeply at first (where the density is tallest), flattens,
and reaches 1 at x = 10.
(iv) With F in hand, no integrating:
P(2 ≤ X ≤ 7) = F(7) − F(2) = (1.4 − 0.49) − (0.4 − 0.04) = 0.91 − 0.36 = 0.55.
(v) The median is where F = 0.5:
m2
20 ±
m
−
= 0.5 =⇒ 20m − m2 = 50 =⇒ m2 − 20m + 50 = 0 =⇒ m =
5
100
√
√
400 − 200
= 10 ± 5 2.
2
So m = 2.93 or m = 17.07. The range only goes up to 10, so 17.07 is impossible — throw it out. The median
error is 2.93 mm. (Getting a root outside the range is normal for a quadratic. Reject it, and say why.)
(vi) Reject when X > 8. Everything above 8 is 1 − F(8):
1 − F(8) = 1 − (1.6 − 0.64) = 1 − 0.96 = 0.04,
so 4% of planks are rejected.
Worked Example 8 (Textbook Example 1.5 —
two pieces). The PDF of a continuous random
12 − x
x
for 0 ≤ x ≤ 4,
variable X is f( x ) =
24
48
for 4 ≤ x ≤ 12, and 0 otherwise. (i) Sketch
f( x ). (ii) Find F( x ). (iii) Sketch F( x ).
Figure 29.
Worked Example8. Left:
a two-piece density.
Right: its F, passing through 4, 13
change of steepness.
with no gap — only a
Solution. (i) Left-hand graph: a line up from (0, 0) to 4, 61 , then a line down to (12, 0).
(ii) Running total.
Z x
u
x2
First stretch, 0 ≤ x ≤ 4: F( x ) =
du =
.
48
0 24
16
1
= .
Total so far at the join: F(4) =
48
3
Second stretch, 4 ≤ x ≤ 12: total so far, plus new area since 4:
x
Z x
1
12 − u
1
u u2
x
x2
1
1 x
x2
1
F( x ) = +
du = +
−
= +
−
− 1−
=− + − .
3
48
3
4
96 4
3
4 96
6
2 4 96
4
0
x < 0,
x2
0 ≤ x ≤ 4,
F( x ) = 48
1 x
x2
− + −
4 ≤ x ≤ 12,
2 4 96
1
x > 12.
Checks: at the join, − 12 + 1 − 16 = 13 , agreeing with 16
48 ✓ At the top, −0.5 + 3 − 1.5 = 1 ✓ (Had we forgotten
the + 31 , the top check would give 23 , not 1 — the error would show at once.)
9231 FS1 | Continuous Random Variables
29
(iii) Right-hand graph: rising from (0, 0) to (12, 1) through 4, 13 . Notice there is no gap at 4, just a
change in how steeply it climbs.
Worked Example 9 (Textbook Example 1.6 —
going backwards). The continuous random
variable X has cumulative distribution funcx2 1
tion F( x ) = 0 for x < 2,
− for 2 ≤ x ≤ 6,
32 8
and 1 for x > 6. Find the PDF f( x ).
Worked Example 9. Left: the given F. Right: the
density found by differentiating — a straight line.
Figure 30.
Solution. We are given F (area collected) and want f (height), so differentiate each part:
0
x < 2,
x
2x
f( x ) =
=
2 ≤ x ≤ 6,
32
16
0
x > 6.
The − 18 has vanished. That is right: constants differentiate to zero. Its only job was to make F(2) = 0.
h 2 i6
R6 x
x
Check the density is valid: 2 16
dx = 32
= 3632−4 = 1 ✓, and it is never negative ✓
2
4.8 Practice questions
[Exercise 1B Q1]
Q1.
The continuous random variable X has
PDF f( x ) = 0.2 for 0 ≤ x ≤ 5, and 0 otherwise. (i) Find E( X ).
(ii) Find the cumulative distribution function F( x ). (iii) Find
P(0 ≤ X ≤ 2) using (a) F( x ) and (b) f( x ), and show your
answer is the same by each method.
Q1. For a flat density, F is a
straight line. F(2) = 0.4.
Figure 31.
R5
5
Solution. (i) E( X ) = 0 0.2x dx = 0.1x2 0 = 2.5 — the midpoint, as always for a flat density.
Rx
(ii) F( x ) = 0 0.2 du = 0.2x, so
x < 0,
0
F( x ) = 0.2x 0 ≤ x ≤ 5,
1
x > 5.
Check F(5) = 1 ✓ The diagram shows it: a straight line from (0, 0) to (5, 1).
R2
(iii) (a) F(2) − F(0) = 0.4 − 0 = 0.4. (b) 0 0.2 dx = 0.4. The same — F was made by that very
integration. Method (a) is just quicker.
9231 FS1 | Continuous Random Variables
30
[Exercise 1B Q2]
Q2.
The continuous random
variable U has PDF f(u) = ku for 5 ≤ u ≤ 8,
and 0 otherwise. (i) Find the value of k. (ii)
Sketch f(u). (iii) Find F(u). (iv) Sketch the
graph of F(u).
10
Q2. Left: the density starts at height 39
, not 0.
Right: F curves up from (5, 0) to (8, 1).
Figure 32.
Solution. (The variable is u here, so we will use t as the stand-in letter inside integrals.)
h 2 i8
R8
2
(i) 5 ku du = k u2
= k × 64−2 25 = 39k
2 = 1, so k = 39 .
5
16
(ii) Left-hand graph: a straight line from 5, 10
to
8,
39
39 . It does not start from zero height — there
is a jump up at u = 5. That is fine.
(iii) Integrate from the start of the range, which is 5, not 0:
0
u < 5,
2 u
Z u
2
2t
u2 − 25
t
u
−
25
F( u ) =
=
dt =
,
F( u ) =
5 ≤ u ≤ 8,
39 5
39
5 39
39
1
u > 8.
Checks: F(5) = 0 ✓ F(8) = 39
39 = 1 ✓ (Starting the integral at 0 instead of 5 is a common slip; the check
F(5) = 0 catches it.)
(iv) Right-hand graph: a curve from (5, 0) to (8, 1), getting steeper because the density is rising.
[Exercise 1B Q3]
Q3.
A continuous random variable X has
PDF f( x ) = cx2 for 1 ≤ x ≤ 4, and 0 otherwise. (i) Find the
value of c. (ii) Find F( x ). (iii) Find the median of X. (iv)
Find the mode of X.
Figure 33. Q3. The density climbs all the
way, so the mode is at the right-hand end,
x = 4. Shaded: half the area, up to the
median 3.19.
✓
R4
64−1
1
2
1 cx dx = c × 3 = 21c = 1, so c = 21 .
h
i
3
Rx 2
x −1
3 x
(ii) F( x ) = 1 u21 du = u63 =
for 1 ≤ x ≤ 4, with 0 below and 1 above. Check: F(4) = 63
63 = 1
63
1
Solution. (i)
√
m3 − 1
1
= , giving m3 = 32.5 and m = 3 32.5 = 3.19 (3 s.f.). The shaded
63
2
half of the diagram stops there — well to the right of the middle, because the density piles up on the right.
(iv) Look at the diagram: the graph climbs the whole way. There is no peak in the middle, so the
highest point is the right-hand end. Mode = 4. (Setting f′ ( x ) = 0 gives x = 0, which is not even in the
range — always look at the ends.)
(iii) Median: F(m) = 0.5, so
9231 FS1 | Continuous Random Variables
31
[Exercise 1B Q5]
Q4.
The continuous random variable X has
CDF F( x ) = 0 for x < 0, 2x − x2 for 0 ≤ x ≤ 1, and 1 for
x > 1. (i) Find P( X > 0.5). (ii) Find the value of q such that
P( X < q) = 41 . (iii) Find the PDF f( x ) of X, and sketch its
graph.
Q4. The density found by differentiating F: a line from height 2 down
to 0. Shaded: P( X > 0.5) = 0.25.
Figure 34.
Solution. F is given, so most of this is substitution.
(i) F gives “at most”. For “more than”, take away from 1:
P( X > 0.5) = 1 − F(0.5) = 1 − (1 − 0.25) = 0.25.
(ii) P( X < q) is F(q). Solve 2q − q2 = 0.25, i.e. q2 − 2q + 0.25 = 0: q =
√
√
2± 3
3
= 1±
, so q = 0.134
2
2
or 1.866. Only 0.134 is in the range 0 to 1. So q = 0.134 (3 s.f.).
(iii) Differentiate: f( x ) = 2 − 2x for 0 ≤ x ≤ 1, 0 otherwise. A line from (0, 2) down to (1, 0). The
height 2 is bigger than 1 — that is fine for a density. Check: area 21 × 1 × 2 = 1 ✓
Q5.
[Exercise 1B Q4] The continuous random
k
for x ≥ 0,
( x + 1)4
and 0 otherwise, where k is a constant. (i)
Show that k = 3, and find the cumulative distribution function. (ii) Find also the value of
x such that P( X < x ) = 78 .
variable X has PDF f( x ) =
Q5. Left: the density, which never quite reaches
zero. Right: F creeps up towards 1 but never gets there.
F(1) = 87 .
Figure 35.
Solution. The range has no top, so the upper limit is ∞. Integrate, then ask what the bracket does as x
grows.
(i) Write f( x ) = k( x + 1)−4 .
∞
Z ∞
1
k( x + 1)−4 dx = k −
.
3( x + 1)3 0
0
As x → ∞ the bracket → 0; at x = 0 it is − 13 . Subtract: k 0 + 13 = 3k = 1, so k = 3.
Now F:
x
Z x
3
1
1
F( x ) =
du = −
= 1−
( x ≥ 0),
F( x ) = 0 for x < 0.
3
4
(
u
+
1
)
(
x
+
1)3
(
u
+
1
)
0
0
Checks: F(0) = 1 − 1 = 0 ✓ As x → ∞, F → 1 ✓ With no top to the range there is no “1 for x > b” line; F
just approaches 1, as the right-hand diagram shows.
(ii) P( X < x ) = F( x ) = 78 :
1−
1
7
1
1
=
=⇒
=
=⇒ ( x + 1)3 = 8 =⇒ x = 1.
3
3
8
8
( x + 1)
( x + 1)
9231 FS1 | Continuous Random Variables
32
[Exercise 1B Q6]
Q6.
The
continuous random variable X has
PDF f( x ) = k 9 − x2 for 0 ≤ x ≤ 3, and 0 otherwise. Show
1
that k = 18
and find the values of E( X ) and Var( X ). Find
the cumulative distribution function for X, and verify by
calculation that the median value of X is between 1.04 and
1.05.
Q6. Shaded: the area up to
about 1.045, which is half the total. The
median lies between 1.04 and 1.05.
Figure 36.
h
i3
1
2 dx = k 9x − x3
k
9
−
x
3 0 = k (27 − 9) = 18k = 1, so k = 18 .
0
h
i
3
R3
1
1
9
3 dx = 1 9x2 − x4
Mean: E( X ) = 18
18
2
4 0 = 18 (40.5 − 20.25) = 8 = 1.125.
0 9x − x
h
i3
R3
1
1
2
4 dx = 1 3x3 − x5
Variance: E X 2 = 18
= 18
(81 − 48.6) = 1.8, so Var( X ) = 1.8 −
18
5
0 9x − x
Solution. k:
R3
0
1.1252 = 0.534 (3 s.f.).
3
Rx
1
2 du = 1 9x − x3 = x − x for 0 ≤ x ≤ 3, with 0 below and 1 above. Check
F: F( x ) = 18
18
3
0 9−u
2 54
F(3) = 1.5 − 0.5 = 1 ✓
Median between 1.04 and 1.05. We are not asked to find the median, only to show where it lies. The
median is where F = 0.5. So put both values in and show 0.5 is between the answers:
F(1.04) = 0.52 −
1.124864
= 0.49917 < 0.5,
54
F(1.05) = 0.525 −
1.157625
= 0.50356 > 0.5.
54
F climbs steadily with no gaps, so somewhere between 1.04 and 1.05 it must pass through 0.5. That is
where the median is.
(This “one side below, one side above” argument is the standard way to locate a root without solving.
It works because F never goes down.)
[Exercise 1B Q7]
Q7.
A continuous random variable X has
PDF f( x ) = 6x (1 − x ) for 0 ≤ x ≤ 1, and 0 otherwise. Find
µ, the mean of X, and show that σ2 , the variance of X, is
0.05. Show that F( x ) = 3x2 − 2x3 for 0 ≤ x ≤ 1. Use this
result to show that P(| X − µ| < σ2 ) = 0.1495. What would
this probability be if, instead, X were normally distributed?
Q7. Symmetric about µ = 0.5.
Shaded: the thin strip from 0.45 to 0.55,
area 0.1495.
Figure 37.
R1
Solution. Mean: µ = 0 6x2 (1 − x ) dx = 6 13 − 14 = 12 . (Also clear from the symmetry in the diagram.)
R1
Variance: E X 2 = 0 6x3 (1 − x ) dx = 6 41 − 51 = 0.3, so σ2 = 0.3 − 0.25 = 0.05.
Rx
x
F: F( x ) = 0 6u − 6u2 du = 3u2 − 2u3 0 = 3x2 − 2x3 . Checks: F(0) = 0, F(1) = 1 ✓
The probability. Decode it: µ = 0.5 and σ2 = 0.05, so | X − 0.5| < 0.05 means 0.45 < X < 0.55 — the
shaded strip. (Note: the question compares with the variance, not the standard deviation. Unusual, but
9231 FS1 | Continuous Random Variables
33
that is what it says.)
P(0.45 < X < 0.55) = F(0.55) − F(0.45) = (0.9075 − 0.33275) − (0.6075 − 0.18225)
= 0.57475 − 0.42525 = 0.1495.
√
If X were normal with the same mean and variance: σ = 0.05 = 0.2236, so
0.05
P(| X − 0.5| < 0.05) = P | Z | <
= P(| Z | < 0.2236) = 2Φ(0.2236) − 1 = 2(0.5885) − 1 = 0.177.
0.2236
Bigger than 0.1495: a normal curve bunches more tightly round its mean than this parabola does. Same
mean, same variance, different probabilities — two distributions are not interchangeable just because those
two numbers match.
[9231/41 & 9231/42 June 2025 Q2(c)]
Q8.
The continuous random variable X has probability density func2
2
tion f( x ) = 13
for 0 ≤ x ≤ 5, 16
39 − 39 x for 5 ≤ x ≤ 8,
and 0 otherwise. Find the median of X.
[2]
Q8. The flat piece holds 10
13 of the area, so
1
2
the median is inside it: 13 × m = 2 .
Figure 38.
2
10
Solution. Which piece? The flat piece is a rectangle 5 wide, 13
tall: area 13
= 0.77. More than half, so the
median is in the flat piece. M1
On a flat piece the area up to m is just width × height:
2
m = 0.5
13
=⇒
m=
13
= 3.25.
4
A1
Two marks, no integration — because we checked the join first.
[9231/44 June 2025 Q4(b),(c)]
Q9.
The continuous random
6
variable X has probability density function f( x ) = 17
x for
6 2
0 ≤ x < 1, 17 x for 1 ≤ x ≤ 2, and 0 otherwise. (b) Find
the cumulative distribution function of X.
[3] (c) Find
the median value of X.
[2]
Q9. The F found in part (b). It
3
reaches 17
at the join and 0.5 at x = 1.55, the
median.
Figure 39.
Solution. (b) First stretch, 0 ≤ x < 1: F( x ) =
Rx 6
0 17 u du =
Second stretch, 1 ≤ x ≤ 2: total so far plus new area:
F( x ) =
3
+
17
Z x
1
3x2
3
. Total so far at the join: F(1) = 17
. M1
17
6 2
3
2x3 − 2
2x3 + 1
u du =
+
=
.
17
17
17
17
A1
9231 FS1 | Continuous Random Variables
0
3x2
17
F( x ) =
2x3 + 1
17
1
34
x < 0,
0 ≤ x < 1,
A1
1 ≤ x ≤ 2,
x > 2.
3
17
Checks: at x = 1 both give 17
✓ F(2) = 17
=1✓
3
(c) At the join F = 17 = 0.18, less than half, so the median is in the second stretch: M1
√
2m3 + 1
1
3
=
=⇒ 4m3 + 2 = 17 =⇒ m3 = 3.75 =⇒ m = 3.75 = 1.55 (3 s.f.)
17
2
A1
[9231/41 & 9231/43 November 2025 Q5(b)]
Q10.
A continuous random variable X has probability density function
√
1
1
f( x ) = 16
x for 0 ≤ x < 4, √ for 4 ≤ x ≤ 9, and 0
3 x
otherwise. Find the median value of X.
[3]
Q10. Shaded: the first piece holds
only 13 of the area, so the median is on the second piece, at 5.06.
Figure 40.
Solution. Which piece? Area of the first piece:
Z 4
0
1
1 2 3/2 4
16
1
1 1/2
=
x dx =
x
×
= .
16
16 3
16
3
3
0
Less than half, so the median is in the second piece. M1
Now: total so far ( 13 ) plus new area from 4 to m equals 12 :
Z m
1
1 −1/2
1
1 √ m
1
2 √
1
+
u
du =
=⇒
2 u 4 =
=⇒
m − 2 = . M1
3
3
2
3
6
3
6
4
√
√
81
So m − 2 = 14 , m = 94 , and m = 16
= 5.0625. A1 It lies in 4 to 9 ✓
Rm
The error to avoid: writing 4 f = 0.5 and forgetting the 13 already collected. That gives m = 7.5625 —
wrong, and nothing in the working looks wrong. Say “total so far, plus new area” out loud every time.
9231 FS1 | Continuous Random Variables
35
[9231/43 June 2025 Q3(b)]
Q11.
A continuous random vari1
able X has probability density function f( x ) = 25
x for
1
0 ≤ x < 1, 25 (8 − x ) for 1 ≤ x ≤ 8, and 0 otherwise.
Find the median value of X.
[3]
Q11. Only 0.02 of the area is in the
first piece. Shaded: the half of the area that
ends at the median, x = 3.
Figure 41.
R1 u
1
Solution. Which piece? First piece area: 0 25
du = 50
= 0.02. Tiny — the median is well into the second
piece. M1
m
Z m
1
u2
24
8−u
1
1
m2
8u −
=
+
du =
=⇒
=⇒ 8m −
− 7.5 = 12.
50
25
2
25
2 1
50
2
1
Multiply by 2: 16m − m2 − 15 = 24, so m2 − 16m + 39 = 0, so (m − 3)(m − 13) = 0. M1 Reject 13 (outside
0 to 8). The median is m = 3. A1
[9231/44 November 2025 Q2(a),(b)]
Q12.
The continuous random variable X has probability density function f( x ) =
4
2
9 ( x + 1) for 0 ≤ x ≤ 1, ( x − 2) for 1 < x ≤ 2, and 0
otherwise. (a) Find the cumulative distribution function of
X.
[3] (b) Find the exact value of the median of X.
[2]
Q12. The first piece holds 23 of
the area, so the median is inside it. Note
the jump at x = 1.
Figure 42.
Solution. (a) First stretch, 0 ≤ x ≤ 1:
F( x ) =
Z x
0
4
4
(u + 1) du =
9
9
2
x
2x2 + 4x
+x =
,
2
9
F(1) =
6
2
= .
9
3
Second stretch, 1 < x ≤ 2. The integral of (u − 2)2 is 13 (u − 2)3 :
x
2
( u − 2)3
1
( x − 2)3
2 ( x − 2)3
F( x ) = +
= +
+ = 1+
.
3
3
3
3
3
3
1
0
2x2 + 4x
9
F( x ) =
( x − 2)3
1+
3
1
Checks: at x = 1, 1 +
(−1)3
= 23 ✓ F(2) = 1 ✓
3
x < 0,
0 ≤ x ≤ 1,
A1
1 < x ≤ 2,
x > 2.
A1
M1
9231 FS1 | Continuous Random Variables
36
(b) At the join F = 23 > 0.5, so the median is in the first stretch: M1
√
√
2m2 + 4m
1
−8 ± 64 + 144
−2 ± 13
2
=
=⇒ 4m + 8m − 9 = 0 =⇒ m =
=
.
9
2
8
2
√
13 − 2
The minus root is negative, so m =
(= 0.803). A1 “Exact” means leave the surd. A decimal alone
2
would not score.
[9231/42 November 2025 Q4(a),(b),(d)]
Q13.
A
continuous random variable X has cumulative distribution function F( x ) = 0 for x < 1;
1 2
1
5 x + a for 1 ≤ x < 4; 50 x + b for 4 ≤ x ≤ 6;
1 for x > 6, where a and b are constants. (a)
Find the value of a and the value of b.
[2]
(b) Find the probability density function of X.
[2] (d) Find the 10th and 90th percentiles of X.
[3]
Figure 43. Q13. Left: the given F, with the 10th and 90th
percentiles marked. Right: the density found by differentiating it.
Solution. This runs the section backwards: F is given, everything else must be pulled out of it.
7
(a) Use the two ends. F(1) = 0: 15 + a = 0, so a = − 15 . B1 F(6) = 1: 36
50 + b = 1, so b = 25 . B1 (Free
3
check: at x = 4 both expressions give 5 ✓— F must have no gap.)
(b) Differentiate each part: M1
1
5
x
f( x ) =
25
0
1 ≤ x < 4,
4 ≤ x ≤ 6,
A1
otherwise.
The constants a, b have gone — their only job was to make F start at 0 and end at 1. Check the density:
areas 35 + 25 = 1 ✓
(d) A percentile is where F hits a given level. At the join F = 53 = 0.6, so levels below 0.6 are on the first
part, above 0.6 on the second.
10th percentile, F = 0.1, first part: M1 5x − 15 = 0.1, so x = 1.5. A1
√
x2
7
90th percentile, F = 0.9, second part: 50
+ 25
= 0.9, so x2 = 31 and x = 31 = 5.57 (3 s.f.). A1 Both are
marked on the diagram.
9231 FS1 | Continuous Random Variables
37
5 The distribution of a function of X
5.1 The idea
Section 3 found the mean of X 2 without ever asking what the graph of X 2 looks like. This section
asks the harder question: if you know the density graph of X, what is the density graph of Y =
X 2 ? We write h(y) for the density of Y (small h) and H(y) for its cumulative function (capital H),
so that they cannot be confused with f and F, which belong to X.
There is an obvious guess, and it is wrong: the
√
density of Y is not f( y). Here is why.
Probability is area, and area depends on width
as well as height. Look at the diagram. The
values 0, 1, 2, 3 are equally spaced on the x
line. After squaring they become 0, 1, 4, 9 —
not equally spaced at all. The stretch from
2 to 3 has width 1; its image from 4 to 9 has
Equal steps in
width 5. Whatever probability sat over [2, 3] Figure 44. Why you cannot just substitute.
x become unequal steps in y = x2 . The gap from 2 to 3
now has to spread itself over [4, 9], five times
(width 1) becomes the gap from 4 to 9 (width 5).
as wide. So its height must drop. Plain substitution takes no account of this stretching. It
gives a curve whose total area is not even 1.
So what does survive a change of variable? Cumulative probability. Suppose X is positive and
Y = X 2 . Then
“Y is at most 9” and “X is at most 3”
are the same event, described in two languages.
Nothing has stretched — it is one event, so one probability. That is the whole method. We
work with F, where nothing goes wrong, and differentiate only at the very end to get back to a
density.
5.2 The method, in four steps
Step 1. Find the range of Y. Put the ends of the range of X into the formula. If 0 ≤ x ≤ 8 and
Y = X 2 , then 0 ≤ y ≤ 64. If the density has a join, put the join in too: a join at x = 5
becomes a join at y = 25. Do this first; every later line lives on this new range.
Step 2. Write H(y) = P(Y ≤ y) and turn it into a statement about X. Replace Y by its formula
and solve the inequality for X, just as you would solve any inequality. Two cautions:
• if the formula decreases (bigger x gives smaller y), the inequality flips round;
• if you take a square root, say why you keep only the positive root — usually “as
X > 0”.
√
For Y = X 2 with X > 0: H(y) = P( X 2 ≤ y) = P( X ≤ y) (as X > 0).
√
√
√
Step 3. Recognise F. “The probability that X is at most y” is exactly F( y). So H(y) = F( y):
√
take the expression for F( x ) and put y wherever x was. (If the inequality flipped in
Step 2, you will have P( X ≥ something) instead, which is 1 − F(something).) You need
F for this step. If the question only gave f, find F first as in Section 4.
9231 FS1 | Continuous Random Variables
38
d
H(y), on the range from Step 1, with 0
dy
otherwise. Differentiate with respect to y — that is the letter now in the formula.
Step 4. Differentiate, if a density is wanted. h(y) =
Read the question to see where to stop. “Find the cumulative distribution function of Y” stops
after Step 3. “Find the probability density function of Y” needs Step 4 too.
A one-line shortcut, for checking. Steps 3 and 4 together amount to
h( y ) = f( x ) ×
dx
,
dy
where x is written in terms of y.
The factor |dx/dy| is exactly the “stretching correction” that plain substitution was missing.
This is fast, and useful for checking, but it does not produce H, and it still needs the range
from Step 1. Use the four steps for your written answer.
5.3 Medians move with the formula; means do not
If the formula is increasing (bigger x always gives bigger y), then it keeps everything in order —
so the value with half the X’s below it becomes the value with half the Y’s below it:
median of Y = (the formula applied to the median of X ).
For example, if the median of X is 5.5 and Y = 5X 2 , then the median of Y is 5 × 5.52 = 151.25.
One line. The same works for any percentile.
Means are different. Section 3 showed at length that E( X 2 ) ̸= {E( X )}2 . To get the mean of Y
you must integrate:
E (Y ) =
Z
g( x ) f( x ) dx
or, the same thing,
E (Y ) =
Z
y h(y) dy.
Both are right and give the same number; the first is usually shorter because it does not need h at
all.
So: median of X to median of Y — substitute. Mean of X to mean of Y — never substitute (unless the formula is a straight line). Examiners test this contrast often. The last textbook question
in this section is built entirely round it.
The distribution of Y , a function of X
1. New range: put the ends (and any join) of X’s range into the formula.
2. H(y) = P(Y ≤ y); rewrite as a statement about X. Flip the inequality if the formula
decreases. Say “as X > 0” when you drop a negative root.
3. Turn “P( X ≤ . . .)” into “F(. . .)”, or “P( X ≥ . . .)” into “1 − F(. . .)”.
4. h(y) =
d
H(y), on the new range.
dy
Median
of Y = formula applied to median of X (increasing formula). Mean of Y: integrate
R
— g( x )f( x ) dx.
Checks: does H go from 0 up to 1? Is h ≥ 0? Does its area come to 1?
9231 FS1 | Continuous Random Variables
39
5.4 Worked examples
Worked Example 10 (The simplest case, every step
shown). The continuous random variable X has
density f( x ) = 2x for 0 ≤ x ≤ 1, and 0 otherwise.
The random variable Y is defined by Y = X 2 . Find
the density of Y.
Worked Example 10. Left: X has a sloping density. Right: Y = X 2 has a flat one. Squaring
has spread the probability evenly.
Figure 45.
Rx
Solution. Preparation: find F. We were given f but Step 3 needs F: F( x ) = 0 2u du = x2 for 0 ≤ x ≤ 1.
Check: F(0) = 0, F(1) = 1 ✓
Step 1: range of Y. x runs from 0 to 1, so y = x2 runs from 0 to 1.
Step 2: rewrite the event.
√
H(y) = P(Y ≤ y) = P X 2 ≤ y = P ( X ≤ y) (as X > 0).
√
Without “as X > 0”, X 2 ≤ y would also allow X ≤ − y. Here X is never negative, so only the positive
side counts.
√
√
√
Step 3: recognise F. “P( X ≤ y)” is F at y. Take F( x ) = x2 and put y in place of x:
√
H( y ) = ( y )2 = y
(0 ≤ y ≤ 1).
Step 4: differentiate. h(y) = 1 for 0 ≤ y ≤ 1, and 0 otherwise. So Y is uniform — every value from 0
to 1 equally likely, as the right-hand diagram shows.
R1
Check: area 0 1 dy = 1 ✓
√
And the wrong way, for contrast: substituting into f would give 2 y, whose area over 0 to 1 is 43 , not 1.
That is the stretching being ignored.
Worked Example 11 (A decreasing formula — the inequality flips). The continuous random variable X has density f( x ) = 2x for 0 ≤ x ≤ 1 (so, as above, F( x ) = x2 ). The random variable Y is
defined by Y = 1 − X 2 . Find the density of Y.
Solution. Step 1. x = 0 gives y = 1; x = 1 gives y = 0. So y runs from 0 to 1 — but backwards: as x goes
up, y goes down. That means the formula is decreasing, and the inequality will flip.
Step 2. Solve 1 − X 2 ≤ y for X:
1 − X 2 ≤ y ⇐⇒ X 2 ≥ 1 − y
p
⇐⇒ X ≥ 1 − y
(take X 2 across and y across: the sign flips)
(as X > 0).
Step 3. We have a “≥”, and F handles “≤”. So take away from 1:
p
p
2
p
H( y ) = P X ≥ 1 − y = 1 − F
1−y = 1−
1 − y = 1 − (1 − y) = y.
Step 4. h(y) = 1 for 0 ≤ y ≤ 1. Uniform again.
p
The check that catches the classic error. Suppose you forgot to flip and wrote H(y) = F( 1 − y) = 1 − y.
Then H(0) = 1 and H(1) = 0: a cumulative function going downhill. Impossible — probability cannot
un-collect itself. Whenever your H runs from 1 down to 0, you have missed a flip.
9231 FS1 | Continuous Random Variables
Worked Example 12 (Textbook Example 1.7 —
exam style). A company cuts four squares off
the corners of a metal sheet to make a box.
The side lengths L (in decimetres) of these
square offcuts have density f(l ) = 4l 4 − l 2
for 0 ≤ l ≤ 2, and 0 otherwise. (i) Find
the cumulative distribution function for the
length. (ii) Hence find the cumulative distribution function for the area of a square. (iii)
Find the PDF for the area. (iv) Sketch both
densities. (v) Find the mean area.
40
Worked Example 12. Left: the density of the
side length L. Right: the density of the area A = L2 . Both
have area 1; the shapes are quite different.
Figure 46.
Solution. The variable is L and the area will be A = L2 . Keep the letters straight: f, F for the length; h, H
for the area.
(i) Multiply out, then integrate from 0 to l with u inside:
2
l
Z l
u3
u
u4
l2
l4
F( l ) =
u−
du =
−
= −
(0 ≤ l ≤ 2),
4
2
16 0
2
16
0
with 0 below and 1 above. Check: F(2) = 2 − 1 = 1 ✓
(ii) Range: 0 ≤ l ≤ 2 gives 0 ≤ a ≤ 4. Rewrite:
√ H( a ) = P( A ≤ a ) = P L2 ≤ a = P L ≤ a
(as L > 0)
√
Substitute a for l in F(l ). Since l 2 becomes a and l 4 becomes a2 :
=F
√ a .
a
a2
−
(0 ≤ a ≤ 4),
2 16
with 0 below and 1 above. Check: H(4) = 2 − 1 = 1 ✓
h
i4
1 a
a2
(iii) Differentiate with respect to a: h( a) = − for 0 ≤ a ≤ 4, 0 otherwise. Check: area 2a − 16
=1
2 8
0
✓
(iv) See the diagram. The length has a humped curve; the area has a straight line sloping down. Completely different shapes, both with area 1 — the visual proof that substitution cannot work.
h 2
i4
R4 a3
64
= 43 . Using
(v) Two ways. Using the new density: E( A) = 0 a 12 − 8a da = a4 − 24
= 4 − 24
0
h
i
2
R2
4
l6
Section 3, no transformation at all: E L2 = 0 l 2 · 4l 4 − l 2 dl = l4 − 24
= 43 .
0
R
Same answer. Moral: if only a mean is wanted, do not transform the density. Use g( x )f( x ) dx.
H( a ) =
5.5 Practice questions
[Exercise 1B Q8]
Q1.
The continuous random variable X has PDF f( x ) = 4x3 for 0 ≤ x ≤ 1, and 0
otherwise. (i) Find F( x ). The continuous random
variable Y is given by Y = X 3 , with cumulative distribution function H(y). (ii) Find H(y). (iii) Find
h(y). (iv) Find P( X < 0.5). (v) Find P(Y < 0.5).
Figure 47.
Q1. Left: f( x ) = 4x3 . Right: h(y) =
4 1/3
for Y = X 3 .
3y
Solution. (i) F( x ) =
Rx
0 4u
3 du = x4 for 0 ≤ x ≤ 1. Check F(1) = 1 ✓
9231 FS1 | Continuous Random Variables
41
(ii) Range: 0 ≤ y ≤ 1. Rewrite: cubing keeps order, and the cube root of y is y1/3 :
4
H(y) = P X 3 ≤ y = P X ≤ y1/3 = F y1/3 = y1/3 = y4/3
(iii) h(y) = 43 y1/3 for 0 ≤ y ≤ 1, 0 otherwise. Check:
(0 ≤ y ≤ 1).
h
i1
R 1 4 1/3
dy = y4/3 = 1 ✓
0 3y
0
(iv) P( X < 0.5) = F(0.5) = 0.54 = 0.0625.
(v) P(Y < 0.5) = H(0.5) = 0.54/3 = 0.397 (3 s.f.).
Why so different? Y < 0.5 means X 3 < 0.5, i.e. X < 0.794 — a much bigger event than X < 0.5. Different
events, different probabilities.
[Additional]
Q2.
The continuous random variable X
1
has f( x ) = 5 for 0 ≤ x ≤ 5, and 0 otherwise. The
random variable Y is given by Y = 10 − 2X. Find
the probability density function of Y.
Q2. Left: X uniform on 0 to 5, height 15 .
1
Right: Y = 10 − 2X, uniform on 0 to 10, height 10
.
Twice the width, half the height.
Figure 48.
Solution. Preparation: F( x ) = 5x for 0 ≤ x ≤ 5.
Step 1. x = 0 gives y = 10; x = 5 gives y = 0. So 0 ≤ y ≤ 10, and y falls as x rises — the formula
decreases. Expect a flip.
10 − y
Step 2. 10 − 2X ≤ y ⇐⇒ −2X ≤ y − 10 ⇐⇒ X ≥
(dividing by −2 flips the sign).
2
Step 3. A “≥”, so take away from 1:
10 − y
1 10 − y
10 − y
y
H( y ) = 1 − F
= 1− ·
= 1−
= .
2
5
2
10
10
Check: goes from 0 at y = 0 up to 1 at y = 10 ✓
1
Step 4. h(y) = 10
for 0 ≤ y ≤ 10. Uniform.
Sense checks. The mean of Y should be 10 − 2(2.5) = 5, the middle of 0 to 10 ✓ And the height halved
because the width doubled — stretching by a constant factor, the simplest case of the idea in the first
diagram of this section.
[Exercise 1B Q9]
Q3.
The continuous random variable X has PDF f( x ) = 2(1 − x ) for 0 ≤ x ≤ 1, and
0 otherwise. The continuous random variable Y is
given by Y = (1 − X )2 . (i) Find h(y), the probability density function of Y, and name the distribution
that it represents. (ii) Find P( X < 0.9). (iii) Find
P(Y < 0.9).
Figure 49. Q3. Left: f( x ) = 2(1 − x ). Right: Y =
(1 − X )2 comes out uniform.
Solution. (i) Preparation: F( x ) =
Rx
2
0 2(1 − u ) du = 2x − x .
9231 FS1 | Continuous Random Variables
42
Step 1: x = 0 gives y = 1; x = 1 gives y = 0. Range 0 ≤ y ≤ 1, and the formula decreases (as x grows,
1 − x shrinks). Expect a flip.
Step 2: since 1 − X ≥ 0 on the range, the square root of (1 − X )2 is just 1 − X:
√
√
(1 − X )2 ≤ y ⇐⇒ 1 − X ≤ y ⇐⇒ X ≥ 1 − y.
√ √
√
Step 3: H(y) = 1 − F 1 − y . Now F( x ) = 2x − x2 = 1 − (1 − x )2 , so F(1 − y) = 1 − ( y)2 = 1 − y.
Hence
H(y) = 1 − (1 − y) = y.
Step 4: h(y) = 1 for 0 ≤ y ≤ 1: the uniform (rectangular) distribution on 0 to 1.
(ii) P( X < 0.9) = F(0.9) = 1.8 − 0.81 = 0.99.
(iii) P(Y < 0.9) = H(0.9) = 0.9.
Aside. Notice that Y = (1 − X )2 is exactly F( X ) here. There is a general fact: for any continuous variable,
F( X ) is uniform on 0 to 1. Computers use it backwards to generate random numbers from any distribution.
You need not learn it, but it explains why questions like this keep producing uniform answers.
[Exercise 1B Q10]
Q4.
The continuous random variable X has PDF f( x ) = 0.1 for 0 ≤ x ≤ 10, and
0 otherwise. The continuous random variable Y is
given by Y = X 4 . (i) Find H(y). (ii) Find h(y). (iii)
Find P( X < 5). (iv) Find P(Y < 5000). The continuous random variable Z is given by Z = X p where
p > 0. (v) Find J(z), the cumulative distribution
function of Z. (vi) Find j(z). (vii) Find P( Z < 5 p ).
Figure 50. Q4. Left: X uniform on 0 to 10. Right:
Y = X 4 has a density that is huge near 0 and tails
away — the fourth power stretches the top of the
range enormously.
Solution. Preparation: F( x ) = 0.1x for 0 ≤ x ≤ 10.
(i) Range: 0 ≤ y ≤ 104 = 10 000. Fourth-rooting:
H(y) = P X 4 ≤ y = P X ≤ y1/4 (as X > 0) = 0.1 y1/4
(0 ≤ y ≤ 10 000).
Check: H(10 000) = 0.1 × 10 = 1 ✓
1
(ii) h(y) = 0.1 × 14 y−3/4 =
for 0 < y ≤ 10 000.
40 y3/4
(iii) P( X < 5) = 0.1 × 5 = 0.5. So 5 is the median of X.
(iv) P(Y < 5000) = 0.1 × 50001/4 = 0.1 × 8.409 = 0.841. Not 0.5: Y < 5000 means X < 8.41, not X < 5.
(v) Range: 0 ≤ z ≤ 10 p . Since p > 0 the formula increases, and undoing x p is z1/p :
J(z) = P X ≤ z1/p = 0.1 z1/p (0 ≤ z ≤ 10 p ).
Check: J(10 p ) = 0.1 × 10 = 1 ✓
z(1/p)−1
for 0 < z ≤ 10 p .
10p
(vii) P( Z < 5 p ) = 0.1 × (5 p )1/p = 0.1 × 5 = 0.5. This is “medians move with the formula”: 5 is the median
of X, the formula x p increases, so 5 p is the median of Z — for every p. Part (iv) used 5000, which is not
54 = 625, which is why it was not 0.5.
(vi) j(z) = 0.1 × 1p z(1/p)−1 =
9231 FS1 | Continuous Random Variables
43
[Exercise 1B Q11]
Q5.
The continuous random variable X has PDF f( x ) = 0.2 for 3 ≤ x ≤ 8, and 0 otherwise. The continuous random variable Y is given
by Y = 5X 2 . (i) Find H(y). (ii) Find h(y). (iii) Find
P(Y < 100). (iv) State the median value of X. (v)
Use H(y) to find the median value of Y, showing
your working. (vi) Show that you can use the equation Y = 5X 2 to find the median value of Y from
that of X. (vii) Write down the value of E( X ) and
find E(Y ). Can you use the equation Y = 5X 2 to
find the mean value of Y from that of X?
Q5. Left: X uniform on 3 to 8. Right: Y =
5X 2 is not uniform — its density falls as y grows.
Figure 51.
Rx
Solution. Preparation. The range starts at 3, so F( x ) = 3 0.2 du = 0.2( x − 3) for 3 ≤ x ≤ 8. Check:
F(3) = 0, F(8) = 1 ✓ (Forget the −3 and everything after this goes wrong.)
p
(i) Range: x = 3 gives y = 45; x = 8 gives y = 320. Undoing 5x2 gives x = y/5:
2
H(y) = P 5X ≤ y = P X ≤
q y
5
r
= 0.2
y
−3
5
(45 ≤ y ≤ 320).
Checks: H(45) = 0.2(3 − 3) = 0, H(320) = 0.2(8 − 3) = 1 ✓
√
p
5
1
1
√ √
(ii) Write y/5 = y/ 5, then differentiate: h(y) = 0.2 × √ × √ = √ for 45 ≤ y ≤ 320. X
50 y
5 2 y
was flat but Y is not: squaring stretches
the
top
of
the
range
more,
so
the
density
there is lower.
√
20 − 3 = 0.294.
(iii) P(Y < 100) = H(100) = 0.2
(iv) Uniform on 3 to 8: √
median = 5.5,
the midpoint.
√
(v) H(mY ) = 0.5: 0.2
mY /5 − 3 = 0.5, so mY /5 = 5.5, so mY /5 = 30.25, so mY = 151.25.
(vi) 5x2 increases for positive x, so it keeps order, so the median of X maps to the median of Y: 5 ×
2
5.5 = 151.25. Same as (v), in one line.
h 3 i8
R8
(vii) E( X ) = 5.5. For E(Y ), integrate: E(Y ) = 5E X 2 = 5 3 0.2x2 dx = x3
= 485
3 = 161.67.
3
Can the formula be used on the mean? No. 5 × 5.52 = 151.25, but the true mean of Y is 161.67. The
gap, 10.42, is exactly 5 Var( X ).
The one thing to remember from this question
Median of X → median of Y: substitute (increasing formula).
Mean of X → mean of Y: integrate (unless the formula is a straight line).
Parts (vi) and (vii) are the same substitution — allowed for the median, forbidden for the mean.
9231 FS1 | Continuous Random Variables
44
[9231/41 & 9231/42 June 2025 Q2(d)]
Q6.
The continuous random variable X has probability density function
2
2
f( x ) = 13
for 0 ≤ x ≤ 5, 16
39 − 39 x for 5 ≤ x ≤ 8, and 0
otherwise. The random variable Y is defined by Y = X 2 .
Find the cumulative distribution function for Y.
[4]
Figure 52.
Q6. The cumulative function of
10
Y = X 2 . It reaches 13
at y = 25 — the join,
transformed — and 1 at y = 64.
10
Solution. Preparation: F, as a running total. First stretch: F( x ) = 2x
13 , so F(5) = 13 . Second stretch:
x
10
u2
30 + 16x − x2 − 55
2
16x − x2 − 25
F( x ) =
8u −
=
+
=
. M1
13 39
2 5
39
39
64−25
Check: F(8) = 128−39
=1✓
Step 1: range, including the join. 0 ≤ x ≤ 8 becomes 0 ≤ y ≤ 64; the join x = 5 becomes y = 25. B1
√
√
√
Steps 2–3. X > 0 and squaring keeps order, so H(y) = P( X ≤ y) = F( y). M1 Put y for x in each
stretch; in the second, x2 becomes y:
0
y < 0,
√
2
y
0 ≤ y ≤ 25,
13√
H( y ) =
A1
16 y − y − 25
25
≤
y
≤
64,
39
1
y > 64.
10
25−25
128−64−25
Checks: at y = 25, 13
and 80−39
= 10
=1✓
13 ✓ At y = 64,
39
Two things tested here: stopping at H (no differentiating — the question said cumulative), and transforming the limits. Leaving them as 0 ≤ y ≤ 5, 5 ≤ y ≤ 8 loses the last mark.
[9231/41 & 9231/43 November 2025 Q5(c)]
Q7.
A continuous random variable X has probability density function
√
1
1
f( x ) = 16
x for 0 ≤ x < 4, √ for 4 ≤ x ≤ 9, and 0
3 x
√
otherwise. The random variable Y is defined by Y = X.
Find the probability density function of Y.
[5]
√
Q7. The density of Y =
X.
The second piece is flat: the square root has
straightened out the falling tail of X.
Figure 53.
Solution. Preparation: F. First stretch: F( x ) =
total so far plus new area:
Rx 1
1/2 du =
0 16 u
x3/2
8
, so F(4) = 24
= 13 . M1 Second stretch,
24
√
√
1 1 √ x
1 2 x 4
2 x
F( x ) = +
2 u 4= +
− =
− 1.
3 3
3
3
3
3
A1
9231 FS1 | Continuous Random Variables
45
Check: F(9) = 2√
−1 = 1✓
Step 1. y = x: 0 ≤ x < 4 becomes 0 ≤ y < 2; 4 ≤ x ≤ 9 becomes 2 ≤ y ≤ 3. B1 √
Steps 2–3. Square-rooting keeps order, and undoing it is squaring: H(y) = P( X ≤ y) = P( X ≤
p
3/2
2
y ) = F(y2 ). M1 Put y2 for x in each stretch ( y2
= y3 and y2 = y):
3
y
0 ≤ y < 2,
H(y) = 24
2y − 1 2 ≤ y ≤ 3.
3
8
(Check at y = 2: 24
= 31 and 34 − 1 = 13 ✓)
Step 4. Differentiate with respect to y:
2
y
8
h( y ) = 2
3
0
Final check: area
0 ≤ y < 2,
2 ≤ y ≤ 3,
A1
otherwise.
R 2 y2
R3 2
1
2
0 8 dy + 2 3 dy = 3 + 3 = 1 ✓
[9231/43 June 2025 Q3(c)]
Q8.
A continuous random vari1
able X has probability density function f( x ) = 25
x for
1
0 ≤ x < 1, 25 (8 − x ) for 1 ≤ x ≤ 8, and 0 otherwise.
The random variable Y is defined by Y = X 3 . Find the
probability density function of Y.
[5]
Q8. The density of Y = X 3 near
y = 0. It jumps at y = 1 (the join x = 1,
transformed) and then tails off all the way to
y = 512.
Figure 54.
Solution. Preparation: F. First stretch: F( x ) =
F( x ) =
x2
1
, so F(1) = 50
. Second stretch:
50
x
1
1
u2
1
16x − x2 − 15
16x − x2 − 14
=
+
8u −
+
=
.
50 25
2 1
50
50
50
M1
64−14
Check: F(8) = 128−50
=1✓
3
Step 1. y = x : 0 ≤ x < 1 becomes 0 ≤ y < 1; 1 ≤ x ≤ 8 becomes 1 ≤ y ≤ 512.
B1 Steps 2–3. Cubing keeps order; undoing it is the cube root y1/3 . So H(y) = F y1/3 : M1
2/3
y
0 ≤ y < 1,
50
H( y ) =
1/3
2/3
− y − 14
16y
1 ≤ y ≤ 512.
50
d 2/3
d 1/3
Step 4. Differentiate, using dy
y
= 23 y−1/3 and dy
y
= 13 y−2/3 :
1
1 2 −1/3
=
0 < y < 1,
50 · 3 y
75 y1/3
1 16 −2/3 2 −1/3
8 − y1/3
h( y ) =
y
−
y
=
1 ≤ y ≤ 512,
50 3
3
75 y2/3
0
otherwise.
A1
9231 FS1 | Continuous Random Variables
46
1 2 −2/3
· 3y
, leaving 8 − y1/3 .)
(To get the second line, take out 50
1/3
Sign check: y ≤ 512 means y
≤ 8, so 8 − y1/3 ≥ 0 ✓— a density is never negative.
1/3 , dx = 1 y−2/3 , gives
Shortcut as a check: h(y) = f( x ) dx
3
dy with x = y
dy
stretch. Same.
8−y1/3
× 31 y−2/3 on the second
25
[9231/44 November 2025 Q2(c),(d)]
Q9.
The continuous
random variable X has probability density function
f( x ) = 49 ( x + 1) for 0 ≤ x ≤ 1, ( x − 2)2 for 1 < x ≤ 2,
2
and 0 otherwise. (From part (a), F( x ) = 2x 9+4x for
0 ≤ x ≤ 1 and 1 + 13 ( x − 2)3 for 1 < x ≤ 2.) The
√
random variable Y is defined by Y = X. (c) Find
the cumulative distribution function of Y.
[3] (d)
Determine whether the median of Y is greater than,
or less than, the median of X.
[2]
Q9. Solid: F for X. Dashed: H for Y =
X. The dashed curve reaches 0.5 first, at 0.896
— so the median of Y is bigger than the median of
X, 0.803.
Figure 55.
√
√
√
Solution. (c) Step 1. y =√ x: 0 ≤ x ≤ 1 becomes 0 ≤ y ≤ 1; 1 < x ≤ 2 becomes 1 < y ≤ 2. B1
Steps 2–3. H(y) = P( X ≤ y) = P( X ≤ y2 ) = F(y2 ). M1 Put y2 for x in each stretch:
0
y < 0,
4
2
2y + 4y
0 ≤ y ≤ 1,
9
H( y ) =
A1
3
√
y2 − 2
1+
1 < y ≤ 2,
3
√
1
y > 2.
√ 2
2, y − 2 = 0 so H = 1 ✓
√
√
13 − 2
(d) From part (b), the median of X is
= 0.803. The formula x increases, so the median moves
2
with it: M1
√
median of Y = 0.803 = 0.896.
Checks: at y = 1, both give 23 ✓ At y =
0.896 > 0.803, so the median of Y is greater. A1
Without any arithmetic: the median of X is less than 1, and the square root of a number between 0 and 1
√
is always bigger than the number ( 0.25 = 0.5, for instance). So square-rooting must push the median up.
Saying that is a complete answer.
9231 FS1 | Continuous Random Variables
47
6 Formula and results summary
Everything in the chapter, in the order you met it. Each box says in plain English what the formulas mean.
1. The density function f probability is area
Z b
f( x ) ≥ 0 for all x,
a
f( x ) dx = 1 (over the whole range),
P( c ≤ X ≤ d ) =
Z d
c
f( x ) dx.
f( x ) is a density, not a probability, and may exceed 1. P( X = a) = 0, so ≤ and < make no
difference. A density may be defined piecewise, and need not be continuous. Every integral
is split at each join, and never extends into a region where f = 0.
2. Summary measures weighted areas
E( X ) =
Z
Z
E X 2 = x2 f( x ) dx,
2
Var( X ) = E X 2 − {E( X )} .
f( x ) dx = 0.5 or F(m) = 0.5;
Mode: the x maximising f( x ).
x f( x ) dx,
Median m :
Z m
−∞
Alternatives: Var( X ) =
Z
( x − µ)2 f( x ) dx and E X 2 = Var( X ) + µ2 . For the mode, check
the endpoints as well as any stationary point.
3. Functions of X integrate g( x ) against the density
E(g( X )) =
Z
g( x )f( x ) dx,
Var(g( X )) =
Z
{g( x )}2 f( x ) dx − {E(g( X ))}2 .
E( aX + b) = aE( X ) + b,
Var( aX + b) = a2 Var( X ).
Sums may be split: E 3X 2 + 4X + 7 = 3E X 2 + 4E( X ) + 7. Substituting the mean into g
is allowed only for linear g: for anything else, E(g( X )) ̸= g(E( X )), and you must integrate.
4. The cumulative function F probability collected so far
Z x
d
F( x ).
dx
a
p
F( x ) = 0 ( x ≤ a ),
F( x ) = 1 ( x ≥ b ),
P( c ≤ X ≤ d ) = F( d ) − F( c ),
F xp =
.
100
F is continuous and never decreases. Piecewise density, second interval: F = (total so far at
the join) + (new area since the join). State all branches, including the 0 and the 1. Before
finding a median, evaluate F at the join to see which piece it is in.
F( x ) = P( X ≤ x ) =
f(u) du (u a dummy variable),
f( x ) =
5. The distribution of Y = g( X ) go through F
(1) Transform the range: apply g to the endpoints and to every join.
(2) H(y) = P{g( X ) ≤ y}; rewrite as an inequality in X (flip it if g decreases; say “as X > 0”
when you drop a negative root).
(3) Turn “P( X ≤ . . .)” into “F(. . .)” (or “P( X ≥ . . .)” into “1 − F(. . .)” if the formula de-
9231 FS1 | Continuous Random Variables
48
√
creases). For Y = X 2 with X > 0: H(y) = F( y).
(4) h(y) = H′ (y), or in one line h(y) = f( x )
dx
.
dy
Median of Y = formula
applied to the median of X (increasing formula). Mean of Y must be
Z
integrated: E(Y ) =
g( x )f( x ) dx. Use h, H for Y — never f, F.
9231 FS1 | Continuous Random Variables
49
7 Common mistakes
Each one is followed by what to do instead.
With densities
1. Integrating one formula across a join. Before integrating, compare the limits in the question
with the positions of the joins, and split if they cross.
2. Assuming the density is continuous at a join. Only use a continuity equation if the diagram
shows an unbroken graph or the question says so. Otherwise the area condition is your only
equation.
3. Calling f( x ) a probability, or “correcting” a density greater than 1. Only areas are probabilities and only areas are capped at 1.
R
R
R
4. Integrating a product as a product of integrals, e.g. x (2 − x )2 dx =
x dx
(2 − x )2 dx .
Expand the brackets first, or substitute.
5. Doing a “show that” silently on a calculator. The method marks are for the visible algebra,
so write the integration out.
With means and variances
6. Writing E(g( X )) = g(E( X )) for a non-linear g, including E X 2 = {E( X )}2 , E X1 = E(1X )
√ p
R
and E
X = E( X ). All false. Integrate g( x )f( x ) dx.
R
R
7. Finding E X 2 as {f( x )}2 dx. It is x2 f( x ) dx: you square the value, not the density.
8. Forgetting to subtract µ2 in the variance — or subtracting it twice. If a variance comes out
negative, that is the error to look for.
9. Writing Var( aX + b) = a Var( X ) + b. It is a2 Var( X ): the b disappears and the a is squared.
10. Re-deriving something the question gave you. If the question states E( X ) = 529
150 , that is a
hint about what to compute and a saving of two minutes.
With cumulative distribution functions
11. Giving only the middle branch of F. Always add F( x ) = 0 below the range and F( x ) = 1
above it.
12. Forgetting the probability already collected at the join. On the second piece, F = total so
far + new area since the join. The symptom is that F does not reach 1 at the top — so check.
Rx
13. Using x as both the limit and the variable of integration, as in a f( x ) dx. Use a dummy
Rx
variable: a f(u) du.
14. Hunting for the median in the wrong piece. Evaluate F at the join first. And if a quadratic
gives a root outside the range, reject it and say why.
√
13 − 2
, not 0.803.
15. Ignoring the word “exact”. Leave the fraction or surd, e.g.
2
16. Starting the integration at 0 when the range starts elsewhere. If X takes values from 3
upwards, integrate from 3; the check F(3) = 0 will tell you.
9231 FS1 | Continuous Random Variables
50
With transformations
√ 17. Substituting into f instead of F, e.g. claiming h(y) = f
y . Probability must travel
through the cumulative function — or carry the |dx/dy| factor.
18. Leaving the range of Y as the range of X. Transform the endpoints and the joins: with
Y = X 2 , the range 0 ≤ x ≤ 8 becomes 0 ≤ y ≤ 64.
19. Not flipping the inequality for a decreasing function. The symptom: an H that decreases,
which is impossible.
20. Dropping the negative square root silently. Write “as X > 0”. It is a required step, not a
courtesy.
21. Differentiating with respect to the wrong variable. Once you have H(y), differentiate with
respect to y.
22. Transforming a mean through a non-linear function, e.g. E(Y ) = 5{E( X )}2 when Y = 5X 2 .
Medians transform that way; means must be integrated.
R
23. Transforming the density when only a mean was asked for. Use E(g( X )) = g( x )f( x ) dx
and skip the whole transformation.
9231 FS1 | Continuous Random Variables
51
Appendix: theory checklist
Every theory item in the chapter, with the section that covers it. Tick them off as revision.
Theory item
Probability as area: P( a ≤ X ≤ b) =
Section
Rb
a f( x ) dx
1
Conditions on a density: f( x ) ≥ 0 and total area 1
1
P( X = a) = 0; strict and non-strict inequalities equivalent
1
A density may exceed 1 in height
1
Mean, variance, median, percentiles and mode from a density
1
The mode may be at an endpoint
1
Density defined piecewise; splitting every integral at the joins
2
Finding an unknown constant from the total area
2
Geometric (triangle / rectangle / trapezium) shortcut for straight pieces
2
Extra equations from f = 0 at an endpoint, and from continuity at a join
2
A density need not be continuous
2
Probabilities that straddle a join; rewriting P(| X − a| < b) as an interval
2
Mean and variance of a piecewise density; comparing pieces for the mode
2
E(g( X )) and Var(g( X )): discrete sums, continuous integrals
3
Naming the new variable Y = g( X ); integrating in x with the density of X
3
E( aX + b) = aE( X ) + b and Var( aX + b) = a2 Var( X ), with reasons
3
E(g( X )) ̸= g(E( X )) for non-linear g
3
Linearity of expectation across a sum of terms
R
E X 2 = Var( X ) + µ2 ; Var( X ) = ( x − µ)2 f( x ) dx
3
Definition F( x ) = P( X ≤ x ); the f / F letter convention
4
3
Finding F by indefinite integration plus a boundary condition
4
Finding F by definite integration; the dummy variable
4
Stating F over the whole real line, including the 0 and 1 branches
4
Building F for a piecewise density as a running total
4
F( x ) = 0 for x ≤ a; F( x ) = 1 for x ≥ b
P( c ≤ X ≤ d ) = F( d ) − F( c )
F(m) = 0.5 for the median; F x p = p/100 for percentiles
4
4
4
Checking the join to decide which piece contains the median
4
f( x ) = F′ ( x ); recovering f from a given F
4
F is continuous and non-decreasing; the ogive shape
4
Comparing a model’s F with observed cumulative data
4
Why substituting into f fails: the stretching of the scale
5
F as the stepping stone to the distribution of a function of X
5
H(y) = P(Y ≤ y) rewritten as an inequality in X
5
Transforming the range and the joins
5
Saying “as X > 0” when dropping the negative root
5
Decreasing formula: the inequality flips, giving 1 − F(. . .)
5
h(y) = H′ (y); the |dx/dy| form
5
The H, h and J, j notation convention
5
Medians move with an increasing formula; means do not
5
9231 FS1 | Continuous Random Variables
Syllabus note. Every item above is inside the 9231 Further Probability & Statistics syllabus
for Paper 4 — there is no “beyond syllabus” material in this chapter. The chapter’s stated
learning outcomes are: use a density that may be defined piecewise; find the mean and
variance from a density; use E(g( X )) and Var(g( X )); understand and use the relationship
between f and F; use either to evaluate probabilities; use either to find the median and other
percentiles; and use cumulative distribution functions of related variables. All are covered
in Sections 1–5.
52
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )