Edexcel IAL Maths
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.
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
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.
P(X=a)=0, so < and ≤ give the same answer.
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).
Piecewise: integrate piece by piece and carry the running total across each join; always define f and F for all real x.
E(X)=∫xf(x) dx, Var(X)=∫x²f(x) dx-μ²; E(aX+b)=aE(X)+b, Var(aX+b)=a²Var(X).
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.
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.
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.
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)=
(13/45)≈0.2889
Check that f(x)≥0: x²+2 is always positive, so the pdf is valid.
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.
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.)
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)=
(13/24)
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.
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.
Give F for all real x: include the "0" and "1" lines.
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 }
(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.
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.
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.
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:
f(x)={ 3x²/26, 1≤x≤3; [4pt] 0, otherwise }
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.
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
(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².
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.
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.
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).
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.
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
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.
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
(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.
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.
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.
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.
A follow-on: for Y=3X-1, E(Y)=3×(7/3)-1=6 and Var(Y)=9×(11/9)=11.
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 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 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.
| Misconception | Why it is wrong | Correct 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)]². |
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.
| Formula | Use | In the formulae list? |
|---|---|---|
| f(x)≥0, ∫f(x) dx=1 over the whole range | checking a pdf is valid; finding a constant | No – learn it |
| P(a<X<b)=∫ₐᵇ f(x) dx | probability as an area | No – learn it |
| F(x)=P(X≤x)=∫_(-∞)ˣf(t) dt | building the cdf from the pdf | Yes |
| f(x)=F′(x); P(a<X≤b)=F(b)-F(a) | pdf from the cdf; probabilities from the cdf | No – derive it |
| E(X)=∫xf(x) dx; E(g(X))=∫g(x)f(x) dx | mean; expectation of a function of X | Yes |
| Var(X)=∫x²f(x) dx-μ² | variance by integration | Yes |
| E(aX+b)=aE(X)+b; Var(aX+b)=a²Var(X) | linear functions of X | No – learn it |
| F(m)=0.5; F(Q₁)=0.25; F(Q₃)=0.75 | median and quartiles | No – learn it |
| Formula | Use | In the formulae list? |
|---|---|---|
| mode: f′(x)=0 at an interior maximum, otherwise the end point where f is greatest | mode | No – derive it |
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).
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
The answer and each step appear one click at a time.
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]
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)
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
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.