Edexcel IAL Maths

S2.2 Continuous random variables

The full notes page in 12 sections · live simulations · practice questions

Press F for full screen · → or click to move on

ExaminerPrep is an independent tutoring service. It has been developed independently from and is not endorsed by the International Baccalaureate Organization. "International Baccalaureate", "IB" and "IB Diploma Programme" are registered trademarks of the IBO, used here for descriptive purposes only.
Pearson Edexcel and Cambridge are trademarks of their owners; ExaminerPrep is not affiliated with any exam board.

What this page covers
Overview

Probability density functions f(x): the two conditions, and probabilities as areas

Pdfs defined in pieces, and areas found by geometry when a piece is a straight line

Cumulative distribution functions F(x): building F from f piece by piece, and using F for probabilities

Going back with f(x)=F′(x), and finding unknown constants

E(X), E(X²), E(g(X)) and Var(X) by integration; E(aX+b) and Var(aX+b)

The mode, median, quartiles and percentiles

Sketching a pdf and describing its skewness

In one minute
Key points
1

A continuous random variable is described by a probability density function f(x) with f(x)≥0 and total area 1, and every probability is an area: P(a<X<b)=∫ₐᵇ f(x) dx.

2

P(X=a)=0, so < and ≤ give the same answer.

3

The cdf F(x)=P(X≤x)=∫_(-∞)ˣf(t) dt rises from 0 to 1 with no jumps; F(b)-F(a)=P(a<X≤b), and going back f(x)=F′(x).

4

Piecewise: integrate piece by piece and carry the running total across each join; always define f and F for all real x.

5

E(X)=∫xf(x) dx, Var(X)=∫x²f(x) dx-μ²; E(aX+b)=aE(X)+b, Var(aX+b)=a²Var(X).

6

Mode: where f is greatest. Median: F(m)=0.5; quartiles: F=0.25 and 0.75. Mode < median < mean: positive skew; mean < median < mode: negative skew.

What is a probability density function?
Section 1 of 12

A continuous random variable X can take any value in an interval — a waiting time, a length, a mass. There are infinitely many possible values, so probabilities cannot be listed one value at a time as they were in S1. Instead X is described by a curve, and probability becomes area under that curve. This page is really the calculus of P1–P2 with a statistical meaning attached.

A probability density function (pdf)

f(x) is a function with f(x)≥0 for all x and ∫_(-∞)^∞f(x) dx=1, such that
P(a<X<b)=∫ₐᵇ f(x) dx.

Probability = area. The probability that X lies between a and b is the area under the pdf between those values.

A single value has probability 0: P(X=a)=∫ₐᵃ f(x) dx=0. So P(X<b) and P(X≤b) are equal — unlike for the discrete variables in S1.

What is a probability density function? (continued)
Section 1 of 12
−0.200.20.40.60.8100.511.522.53xf(x)area = 2.5 × 0.4 = 1height 2.5 > 1 is allowed
A valid pdf whose height is 2.5. The height is a density, not a probability; only the total area has to equal 1.

f(x) is not a probability, so it may be bigger than 1. For example f(x)=2.5 on 0≤x≤0.4 is a valid pdf: the area is 2.5×0.4=1.

A pdf is usually non-zero only on an interval. Write "0 otherwise" as part of the definition, so that f is defined for every real x.

What is a probability density function? (continued)
Section 1 of 12 · Worked example 1 · Easy · Show that, find

WORKED EXAMPLE · QUESTION

The continuous random variable X has pdf f(x)=k(x²+2) for 0≤x≤3, and f(x)=0 otherwise. (a) Show that k=(1/15). (b) Find P(1<X<2).

SOLUTION

(a) The total area must be 1:

∫₀³ k(x²+2) dx=k[x³/3+2x]₀³=k(9+6)=15k.

Setting 15k=1 gives k=(1/15)

(b) Probability = area from 1 to 2:

(1/15)[x³/3+2x]₁²=(1/15)[((8/3)+4)-(⅓+2)]=(1/15)×(13/3)=

What is a probability density function? (continued)
Section 1 of 12 · Worked example 1 · Easy · Show that, find (continued)

(13/45)≈0.2889

Check that f(x)≥0: x²+2 is always positive, so the pdf is valid.

What is a probability density function? (continued)
Section 1 of 12
−0.500.511.522.533.500.20.40.60.8xf(x)f(x) = (x² + 2)/1513/45
The pdf f(x)=(x²+2)/15 on 0≤x≤3 and 0 elsewhere. The whole shaded region has area 1; the red strip between x=1 and x=2 has area (13/45), which is P(1<X<2). Notice that f jumps down to 0 at x=3: a pdf does not have to be continuous.

Common error — substituting instead of integrating

f(1.5) is a height, not a probability. Every probability for a continuous random variable is an area: integrate f, or use F.

How do you work with a pdf defined in pieces?
Section 2 of 12

Many pdfs use a different formula on different intervals. Nothing new is needed, only care:

The total area is the sum of the integrals over every piece.

A probability that crosses a join is split at the join: P(1<X<3)=∫₁²(first piece)+∫₂³(second piece).

When a piece is a straight line, the area is a triangle or trapezium — geometry is often quicker than integration.

A pdf may jump at a join; it does not have to be continuous. (The cdf never jumps.)

How do you work with a pdf defined in pieces? (continued)
Section 2 of 12 · Worked example 2 · Medium · Find

WORKED EXAMPLE · QUESTION

The continuous random variable X has pdf f(x)=kx for 0≤x≤2, f(x)=k/2(6-x) for 2<x≤6, and f(x)=0 otherwise. (a) Find k. (b) Find P(X>4) and P(1<X<3).

SOLUTION

(a) The graph is a triangle with base 0 to 6 and height f(2)=2k: area =½×6×2k=6k=1, so k=⅙. The pdf is

f(x)={ x/6, 0≤x≤2; [4pt] (6-x)/12, 2<x≤6; [4pt] 0, otherwise }

(b) P(X>4) is the small triangle from 4 to 6, with height f(4)=(2/12)=⅙: ½×2×⅙= ⅙

P(1<X<3) crosses the join at 2, so split it:

∫₁²x/6 dx+∫₂³(6-x)/12 dx=¼+(7/24)=

How do you work with a pdf defined in pieces? (continued)
Section 2 of 12 · Worked example 2 · Medium · Find (continued)

(13/24)

How do you work with a pdf defined in pieces? (continued)
Section 2 of 12
0123456700.10.20.30.4xf(x)(2, 1/3)13/241/6
The triangular pdf of Worked example 2. Its base is 6 and its height ⅓, so the area is ½×6×⅓=1. The teal region (from 1 to 3) crosses the join; the red triangle for x>4 has area ⅙.

Exam tip — sketch a piecewise pdf first

The sketch shows where the joins are, whether straight-line pieces give triangles you can use, and which piece each probability needs.

What is the cumulative distribution function F(x)?
Section 3 of 12

Integrating the pdf every time you want a probability is slow. The cumulative distribution function does the integrating once, as a running total of area, and then every probability is a subtraction.

The cumulative distribution function (cdf) is F(x)=P(X≤x)=∫_(-∞)ˣf(t) dt, the area under the pdf to the left of x.

F rises from 0 to 1: F(x)=0 below the lowest possible value, F(x)=1 above the highest, and F never decreases.

F is continuous — no jumps — because a single value has probability 0. At every join the two formulas give the same value.

Probabilities come straight from F: P(a<X≤b)=F(b)-F(a), and P(X>a)=1-F(a).

Piecewise method: on each piece, F(x)=(total area of all earlier pieces)+∫ⱼₒᵢₙˣf(t) dt. Use t as the dummy variable so that x can be the upper limit.

What is the cumulative distribution function F(x)? (continued)
Section 3 of 12

Give F for all real x: include the "0" and "1" lines.

What is the cumulative distribution function F(x)? (continued)
Section 3 of 12 · Worked example 3 · Medium · Find

WORKED EXAMPLE · QUESTION

For the pdf in Worked example 2, (a) find the cumulative distribution function F(x), and (b) use it to find P(1<X<3).

SOLUTION

(a) First piece, 0≤x≤2: F(x)=∫₀ˣt/6 dt=x²/12, so F(2)=(4/12)=⅓.

Second piece, 2<x≤6 — start from the ⅓ already collected:

F(x)=⅓+∫₂ˣ(6-t)/12 dt=⅓+(1/12)(6x-x²/2-10)=(12x-x²-12)/24.

Check the ends of the second piece: at x=2, (24-4-12)/24=⅓ ✓; at x=6, (72-36-12)/24=1 ✓.

F(x)={ 0, x<0; [2pt] x²/12, 0≤x≤2; [4pt] (12x-x²-12)/24, 2<x≤6; [4pt] 1, x>6 }

What is the cumulative distribution function F(x)? (continued)
Section 3 of 12 · Worked example 3 · Medium · Find (continued)

(b) Use F — no integration needed: F(3)-F(1)=(36-9-12)/24-(1/12)=(5/8)-(1/12)= (13/24), as in Worked example 2.

What is the cumulative distribution function F(x)? (continued)
Section 3 of 12
0123456700.250.50.751xF(x)join (2, 1/3)Q₁mQ₃
The cdf of the triangular distribution. It is 0 for x<0, curves up as x²/12 to ⅓ at the join, continues smoothly as (12x-x²-12)/24 to 1 at x=6, and stays at 1. Reading across at 0.25, 0.5 and 0.75 gives the quartiles found in Worked example 6.

Common error — forgetting the earlier pieces

Integrating only the second piece from 2 to x gives (1/12)(6x-x²/2-10), which is 0 at x=2 and only ⅔ at x=6. Check that F reaches exactly 1 at the top end.

What is the cumulative distribution function F(x)? (continued)
Section 3 of 12
0123456700.250.50.751xcorrect Fmissing the 1/3only 2/3 at x = 6
The dashed red curve is the second piece integrated on its own. It drops back to 0 at the join and never reaches 1, so it cannot be a cdf. Adding the ⅓ already collected lifts it onto the blue curve.
How do you get from F(x) back to f(x), and find constants?
Section 4 of 12

Integration takes f to F, so differentiation takes F back to f: f(x)=F′(x)=d/dxF(x). Differentiate each piece; where F is constant (0 or 1), f=0.

Unknown constants are fixed by conditions you already know:

from a pdf: total area = 1;

from a cdf: F=0 at the lowest value, F=1 at the highest value, and F takes the same value on both sides of every join;

extra information: a given probability, a given mean E(X), or a given median — each gives one more equation.

Two unknowns need two equations: typically "area = 1" plus one piece of extra information.

How do you get from F(x) back to f(x), and find constants? (continued)
Section 4 of 12 · Worked example 4 · Medium · Find

WORKED EXAMPLE · QUESTION

The continuous random variable X has cumulative distribution function

F(x)={ 0, x<1; k(x³-1), 1≤x≤3; 1, x>3 }

(a) Find k. (b) Find P(X>2). (c) Find the probability density function of X.

SOLUTION

(a) F must reach 1 at the top of the range: F(3)=k(27-1)=26k=1, so k=(1/26) (and F(1)=0 joins the "0" line, as it must).

(b) Use the complement: P(X>2)=1-F(2)=1-(7/26)= (19/26)

(c) Differentiate each piece:

How do you get from F(x) back to f(x), and find constants? (continued)
Section 4 of 12 · Worked example 4 · Medium · Find (continued)

f(x)={ 3x²/26, 1≤x≤3; [4pt] 0, otherwise }

How do you get from F(x) back to f(x), and find constants? (continued)
Section 4 of 12
00.511.522.533.5400.250.50.751xF(x)F(x) = (x³ − 1)/26F(2) = 7/26
The cdf of Worked example 4: flat at 0 before x=1, rising as (x³-1)/26, and flat at 1 after x=3. Its height at x=2 is (7/26).
How do you get from F(x) back to f(x), and find constants? (continued)
Section 4 of 12
00.511.522.533.5400.250.50.751xf(x)f(x) = 3x²/267/26
Its derivative f(x)=3x²/26. The area under f from 1 to 2 equals the height F(2)=(7/26) in the previous figure — differentiation and integration undo each other.

Exam tip — finish the pdf properly

When you write a pdf obtained by differentiating, use the inequalities from the cdf and finish with "0 otherwise". Whether the end points carry ≤ or < does not affect any probability.

How do you find E(X) and Var(X) by integration?
Section 5 of 12

The S1 formulas for a discrete random variable carry over with one change: a sum over values becomes an integral over the range, so ΣxP(X=x) becomes ∫xf(x) dx.

Mean, variance and E(g(X))

(in the formulae booklet — know how to use them)
E(X)=μ=∫xf(x) dx,  Var(X)=∫x²f(x) dx-μ²,  E(g(X))=∫g(x)f(x) dx.
Each integral is over the whole range where f(x)≠0; for a piecewise pdf add the integrals over the pieces. ∫x²f(x) dx is E(X²), and the standard deviation is σ=√(Var(X)).

"Mean squared" μ² and "mean of the squares" E(X²) are different things: Var(X)=E(X²)-[E(X)]² is never negative.

Linear functions of X

How do you find E(X) and Var(X) by integration? (continued)
Section 5 of 12

(not in the formulae booklet — learn them)
E(aX+b)=aE(X)+b,  Var(aX+b)=a² Var(X).
Adding b shifts every value but does not change the spread; multiplying by a scales the spread by |a|, so the variance by a².

How do you find E(X) and Var(X) by integration? (continued)
Section 5 of 12 · Worked example 5 · Medium · Find, show that

WORKED EXAMPLE · QUESTION

X has the pdf of Worked example 1, f(x)=(1/15)(x²+2) for 0≤x≤3, 0 otherwise. (a) Find E(X). (b) Show that Var(X)=0.6375. (c) Y=4X-3. Find E(Y) and Var(Y).

SOLUTION

(a) Multiply by x and integrate:

E(X)=(1/15)∫₀³(x³+2x) dx=(1/15)[x⁴/4+x²]₀³=(1/15)((81/4)+9)=(39/20)=

1.95

(b) E(X²) — multiply by x²:

(1/15)∫₀³(x⁴+2x²) dx=(1/15)[x⁵/5+2x³/3]₀³=(1/15)((243/5)+18)=(111/25)=4.44.

How do you find E(X) and Var(X) by integration? (continued)
Section 5 of 12 · Worked example 5 · Medium · Find, show that (continued)

Subtract the square of the mean: Var(X)=4.44-1.95²=4.44-3.8025= 0.6375 ✓

(c) Linear rules: E(Y)=4×1.95-3= 4.8, Var(Y)=4²×0.6375= 10.2

The "−3" has no effect on the variance, and the 4 is squared. The standard deviation of X is √0.6375≈0.798.

How do you find E(X) and Var(X) by integration? (continued)
Section 5 of 12

Common error — the linear rule for variance

Writing Var(4X-3)=4Var(X)-3, or 16Var(X)-9. Only the multiplier matters, and it is squared: Var(aX+b)=a²Var(X).

How do you find the mode, median and quartiles?
Section 6 of 12

Mode: the value of x where f(x) is greatest. If the maximum is a turning point, solve f′(x)=0 (and check it is a maximum). If f is increasing or decreasing over the whole range, the mode is at an end point — a sketch shows which.

Median m: half the area lies on each side, so F(m)=0.5.

Quartiles: F(Q₁)=0.25 and F(Q₃)=0.75; interquartile range =Q₃-Q₁. A percentile is similar: the 90th percentile p solves F(p)=0.9.

With a piecewise F, first decide which piece contains the value: compare 0.5 (or 0.25, 0.75) with F at the joins.

The equation F(m)=0.5 may be a quadratic (keep the root inside the range) or a quartic that has to be solved numerically — show a sign change or use the method the question gives.

How do you find the mode, median and quartiles? (continued)
Section 6 of 12 · Worked example 6 · Medium · Find

WORKED EXAMPLE · QUESTION

Use the cdf from Worked example 3 to find, in exact form, (a) the lower quartile, (b) the median and the upper quartile of X. (c) Find the interquartile range to 3 significant figures.

SOLUTION

Which piece? At the join F(2)=⅓≈0.333. Since 0.25<⅓, Q₁ is in the first piece; 0.5 and 0.75 are above ⅓, so m and Q₃ are in the second.

(a) q²/12=¼⇒q²=3⇒ Q₁=√3≈1.73

(b) Median, from the second piece: (12m-m²-12)/24=½⇒m²-12m+24=0⇒m=6±2√3. 6+2√3≈9.46 is outside 2<x≤6, so m=6-2√3≈2.54

Upper quartile: (12q-q²-12)/24=¾⇒q²-12q+30=0⇒ Q₃=6-√6≈3.55

(c) (6-√6)-√3≈ 1.82

How do you find the mode, median and quartiles? (continued)
Section 6 of 12 · Worked example 6 · Medium · Find (continued)

For this distribution the mode is 2 (the peak), the median is 2.54 and the mean is (8/3)≈2.67: mode < median < mean.

How do you find the mode, median and quartiles? (continued)
Section 6 of 12 · Worked example 7 · Hard · Find, show that

WORKED EXAMPLE · QUESTION

X has pdf f(x)=(4/27)x²(3-x) for 0≤x≤3, 0 otherwise. (a) Find the mode. (b) Show that E(X)=1.8. (c) Show that the median m satisfies m⁴-4m³+13.5=0, and show that 1.8<m<1.9.

SOLUTION

(a) Differentiate f(x)=(4/27)(3x²-x³): f′(x)=(4/27)(6x-3x²)=(4/27)×3x(2-x)=0⇒x=0 or x=2. f(0)=0 and f(2)=(16/27); f′′(2)=(4/27)(6-12)<0, so the maximum is at x=2: mode = 2

(b)

(4/27)∫₀³(3x³-x⁴) dx=(4/27)[3x⁴/4-x⁵/5]₀³=(4/27)((243/4)-(243/5))=(4/27)×(243/20)=

1.8

How do you find the mode, median and quartiles? (continued)
Section 6 of 12 · Worked example 7 · Hard · Find, show that (continued)

(c) The cdf on 0≤x≤3: F(x)=(4/27)∫₀ˣ(3t²-t³) dt=(4/27)(x³-x⁴/4)=(4x³-x⁴)/27.

F(m)=0.5⇒4m³-m⁴=13.5⇒m⁴-4m³+13.5=0.

Sign change — compare F with 0.5 either side: F(1.8)=0.4752<0.5 and F(1.9)=0.5335>0.5, so 1.8<m<1.9. F is continuous and increasing, so it passes 0.5 exactly once in between. Solving numerically gives m≈1.84.

How do you find the mode, median and quartiles? (continued)
Section 6 of 12
00.511.522.5300.20.40.6xf(x)mean 1.8mode 2median ≈ 1.840.50.5
f(x)=(4/27)x²(3-x). The peak (mode) is at x=2; the median ≈ 1.84 splits the area into two halves of 0.5; the mean 1.8 is pulled furthest towards the long tail on the left. Mean < median < mode: negative skew.

Common error — the wrong piece or the wrong root

Solving F(m)=0.5 with the wrong piece, or keeping a root outside the range. Check F at the join first, and reject any solution that does not lie in the interval where that formula applies.

How do you sketch a pdf and describe its skewness?
Section 7 of 12

To sketch a pdf, draw each piece on its interval — straight lines, parabolas or cubics — and show f=0 outside the range. Mark the end points, the values at the joins and the maximum. Curves need not meet the axis.

Positive skew: the long tail is to the right; typically mode < median < mean.

Negative skew: the long tail is to the left; typically mean < median < mode.

Symmetric: mean = median = mode (for a single-peaked pdf), and the mean is the line of symmetry — no integration needed.

To justify skewness, quote the values you have found and compare them; a sketch alone is a description, not a reason.

How do you sketch a pdf and describe its skewness? (continued)
Section 7 of 12
00.511.522.5300.20.40.6xf(x)positive skewsymmetricnegative skew
Three pdfs on 0≤x≤3. Positive skew, f(x)=(4/27)x(3-x)²: mode 1, median ≈ 1.16, mean 1.2. Symmetric, f(x)=(2/9)x(3-x): all three equal 1.5. Negative skew, f(x)=(4/27)x²(3-x): mean 1.8, median ≈ 1.84, mode 2. The mean moves furthest into the tail.
How do you sketch a pdf and describe its skewness? (continued)
Section 7 of 12 · Worked example 8 · Hard · Find, describe

WORKED EXAMPLE · QUESTION

The continuous random variable X has pdf f(x)=a+bx for 0≤x≤4, 0 otherwise, where a and b are constants. Given that E(X)=(7/3): (a) find a and b; (b) find Var(X); (c) find the median, in the form p+q√5; (d) state the mode and describe the skewness, giving a reason.

SOLUTION

(a) Area = 1: ∫₀⁴(a+bx) dx=4a+8b=1. And E(X)=(7/3): ∫₀⁴(ax+bx²) dx=8a+(64/3)b=(7/3). Double the first equation and subtract: ((64/3)-16)b=(7/3)-2⇒(16/3)b=⅓⇒ b=(1/16), a=⅛

(b) E(X²)=∫₀⁴(x²/8+x³/16)dx=(8/3)+4=(20/3), so Var(X)=(20/3)-(49/9)= (11/9)≈1.22

(c) F(x)=x/8+x²/32=(x²+4x)/32; F(m)=½⇒m²+4m-16=0⇒m=-2±2√5. The root must lie in [0,4], so m=-2+2√5≈2.47

(d) f(x)=(2+x)/16 increases throughout, so mode = 4. Mean (7/3)≈2.33 < median ≈ 2.47 < mode 4, so negative skew.

How do you sketch a pdf and describe its skewness? (continued)
Section 7 of 12 · Worked example 8 · Hard · Find, describe (continued)

A follow-on: for Y=3X-1, E(Y)=3×(7/3)-1=6 and Var(Y)=9×(11/9)=11.

How do you sketch a pdf and describe its skewness? (continued)
Section 7 of 12
−0.500.511.522.533.544.500.10.20.30.4xf(x)f(x) = (2 + x)/16mean 2.33median 2.47mode 40.50.5
Worked example 8: a trapezium-shaped pdf with f(0)=⅛ and f(4)=(3/8). The mode is at the right-hand end, the median splits the area in half at 2.47, and the mean 2.33 lies further left: negative skew.

Exam tip — the comparison is the reason

For "describe the skewness, giving a reason", write the three values in order — for example "mean 2.33 < median 2.47 < mode 4" — and then the conclusion.

Exam tips for S2.2
Section 8 of 12

Exam tip 1 — define it everywhere

A pdf finishes with "0 otherwise"; a cdf starts with "0, x< lowest value" and ends with "1, x> highest value". A cdf with only the middle line is incomplete.

Exam tip 2 — check the cdf at the ends and the joins

Substitute the end points and join values into your F. It must give 0 at the bottom, 1 at the top and the same value from both sides of each join. This catches most slips before they cost later parts.

Exam tip 3 — choose the piece before solving

For a median or quartile with a piecewise cdf, write F at each join first. Then solve only in the piece that contains 0.25, 0.5 or 0.75, and reject roots outside that piece.

Exam tips for S2.2 (continued)
Section 8 of 12

Exam tip 4 — keep exact values in Var(X)

Find E(X) and E(X²) as fractions before subtracting. A rounded mean squared can change the third significant figure of a small variance.

Exam tip 5 — use symmetry

If the pdf is symmetric about x=c, then E(X)= median =c. State the symmetry as your reason and save the integration for the variance.

Common misconceptions
Section 9 of 12
MisconceptionWhy it is wrongCorrect idea
f(x) is the probability that X=x.For a continuous variable P(X=x)=0; f is a density, a height.Probabilities are areas: integrate f, or subtract values of F.
A pdf can never be greater than 1.Only the total area has to be 1.f(x)≥0 and ∫f(x) dx=1; heights above 1 are fine on a short interval.
P(X<3) and P(X≤3) are different.The single value 3 has probability 0.For continuous X, < and ≤ give the same probability.
The second piece of F is just the integral of the second piece of f.F is cumulative, so it must include the area already collected.Add F at the join to the integral from the join to x.
The mode is where f′(x)=0.The greatest value may be at an end point, as for an increasing pdf.Sketch f; use f′=0 only for a turning point inside the range.
Var(X)=∫x²f(x) dx.That is E(X²), not the variance.Var(X)=E(X²)-[E(X)]².
How this topic connects
Section 10 of 12

S1 discrete random variables and summary statistics

E(X), Var(X) and the linear rules for aX+b are the same ideas, with sums replaced by integrals. Median, quartiles, interquartile range and the mean–median–mode test for skewness are the population versions of the statistics you calculated from data. The Normal distribution in S1.6 is a continuous random variable whose cdf comes from tables instead of integration.

S2.3 Continuous uniform distribution

The rectangular distribution is the simplest pdf of all: a constant height on an interval. Its mean, variance and cdf are special cases of the integrals on this page.

Integration and numerical methods (P1–P3)

Every result here uses the power rule and definite integrals from P1–P2; a median from a cubic or quartic is located by a sign change or an iteration from P3. In IAL Physics, the time until a radioactive nucleus decays is a continuous random variable whose median is the half-life.

Key formulae
Section 11 of 12
FormulaUseIn the formulae list?
f(x)≥0, ∫f(x) dx=1 over the whole rangechecking a pdf is valid; finding a constantNo – learn it
P(a<X<b)=∫ₐᵇ f(x) dxprobability as an areaNo – learn it
F(x)=P(X≤x)=∫_(-∞)ˣf(t) dtbuilding the cdf from the pdfYes
f(x)=F′(x); P(a<X≤b)=F(b)-F(a)pdf from the cdf; probabilities from the cdfNo – derive it
E(X)=∫xf(x) dx; E(g(X))=∫g(x)f(x) dxmean; expectation of a function of XYes
Var(X)=∫x²f(x) dx-μ²variance by integrationYes
E(aX+b)=aE(X)+b; Var(aX+b)=a²Var(X)linear functions of XNo – learn it
F(m)=0.5; F(Q₁)=0.25; F(Q₃)=0.75median and quartilesNo – learn it
Key formulae (continued)
Section 11 of 12
FormulaUseIn the formulae list?
mode: f′(x)=0 at an interior maximum, otherwise the end point where f is greatestmodeNo – derive it
Check your understanding
Section 12 of 12

1. f(x)=kx for 0≤x≤4, 0 otherwise, is a pdf. Find k.

2. Why is P(X=2)=0 for a continuous random variable, even when f(2)>0?

3. F(x)=x²/9 for 0≤x≤3. Find f(x) on this interval and the median.

4. E(X)=3 and Var(X)=2. Find E(5-2X) and Var(5-2X).

5. A pdf is decreasing over its whole range 0≤x≤5. Where is the mode, and what skewness would you expect?

6. For the pdf f(x)=3x²/26, 1≤x≤3, find E(X).

Check your understanding · answers
Section 12 of 12

1. ∫₀⁴kx dx=8k=1, so k=⅛.

2. It is the area under f between 2 and 2 — a strip of zero width — so it is ∫₂²f(x) dx=0. Only intervals have positive probability.

3. f(x)=F′(x)=2x/9. Median: m²/9=0.5, so m=√4.5=3√2/2≈2.12.

4. E=5-2×3=-1; Var=(-2)²×2=8. The 5 does not affect the variance, and the −2 is squared.

5. The mode is at the lower end point, x=0, because f is greatest there. The long tail is to the right, so expect positive skew: mode < median < mean.

6. E(X)=∫₁³3x³/26 dx=(3/26)[x⁴/4]₁³=(3/26)×(80/4)=(60/26)=(30/13)≈2.31.

Check understanding

Practice questions

The answer and each step appear one click at a time.

Question 1 [5 marks]

The number of minutes, T, by which a morning train arrives late is modelled by the continuous random variable with probability density function f(t) = kt² for 0 ≤ t ≤ 3, and f(t) = 0 otherwise, where k is a constant.

Figure: graph of y = f(t)

(a) Show that k = 1/9. [2]

(b) Find P(T > 2). [2]

(c) State the value of P(T = 2), giving a reason. [1]

1231tf(t)

Mark scheme click to reveal each step

∫₀³ kt² dt = [kt³/3]₀³ = 9k

9k = 1, so k = 1/9 cso

∫₂³ t²/9 dt = [t³/27]₂³

= (27 − 8)/27 = 19/27 (≈ 0.704)

0, because T is a continuous random variable, so any single value has probability 0 (the area of a line of zero width)

Question 2 [6 marks]

The length, X metres, of the offcut left when a roll of cable is used is modelled by a continuous random variable with cumulative distribution function F(x) = 0 for x < 0, F(x) = (x² + 2x)/24 for 0 ≤ x ≤ 4, and F(x) = 1 for x > 4.

(a) Find P(1 < X < 3). [2]

(b) Find the probability density function of X. [2]

(c) Find the median of X, giving your answer to 3 significant figures. [2]

Mark scheme click to reveal each step

F(3) = 15/24 and F at 1 is 3/24, so the probability is 15/24 − 3/24

= 1/2

differentiates: F′(x) = (2x + 2)/24

f(x) = (x + 1)/12 for 0 ≤ x ≤ 4, and 0 otherwise

(m² + 2m)/24 = 0.5, so m² + 2m − 12 = 0

m = −1 + √13 = 2.61 (the other root is negative)

Keep practising

S2.2 Continuous random variables

Full notes, every simulation and hundreds of questions with mark schemes, free:

ExaminerPrep is an independent tutoring service. It has been developed independently from and is not endorsed by the International Baccalaureate Organization. "International Baccalaureate", "IB" and "IB Diploma Programme" are registered trademarks of the IBO, used here for descriptive purposes only.
Pearson Edexcel and Cambridge are trademarks of their owners; ExaminerPrep is not affiliated with any exam board.