IB Maths AA HL
Topic 4 β Statistics & Probability
Paper 1 & 2
HL only
~7 min read
Median & Mode of a CRV
For a continuous random variable, the median m is the value that splits the area under the pdf in half: P(X β€ m) = Β½. The mode is the value of x where f(x) is largest β found by differentiating the pdf and solving fβ²(x) = 0, then comparing with the endpoints. For symmetric pdfs, the median sits at the line of symmetry β no integration needed.
π What you need to know
- Median definition: P(X β€ m) = P(X β₯ m) = Β½ β the area is split in half.
- Median equation: β«ββm f(x) dx = Β½ (or the equivalent upper-tail version).
- Symmetric pdf β median = mean = mode = the axis of symmetry; no integration required.
- Mode definition: the value of x in the domain that produces the largest f(x).
- Smooth interior maximum: solve fβ²(x) = 0 and discard roots outside the domain.
- Endpoints matter: always check f(a) and f(b) β the mode could sit at a boundary.
- Piecewise pdf: first compute partial areas at each junction to find which piece contains the median.
- Multiple modes are possible if f has more than one local maximum β compare f-values to confirm.
The median of a CRV
Median definition
β«ββm f(x) dx = 12
Two shortcuts make this easier than it looks:
Symmetry shortcut
f(a + x) = f(a β x)
median = axis of symmetry, no integration
Direct integration
β«am f(x) dx = Β½
solve for m as the upper limit
The mode of a CRV
The mode is whichever x in the domain gives the largest f(x). For a smooth pdf, candidates come from two places:
- Interior critical points: solve fβ²(x) = 0 and keep only those inside the domain.
- Endpoints: check f(a) and f(b) directly.
Compare the f-value at each candidate; the largest wins. For more than one critical point, use the second derivative or simply test signs of fβ² on either side.
Watch out: fβ²(x) = 0 can also produce minima or saddle points. If fβ² = 0 gives the lowest f-value on the domain, the mode is at one of the endpoints.
Piecewise pdfs β which piece holds the median?
For a piecewise pdf you can’t just integrate from one end to m β the integrand changes at each junction. Compute the cumulative area at each junction first, then locate the median in whichever piece pushes the running total past Β½.
π§ Recipe β find the median or mode
- Sketch the pdf β symmetry tells you the median for free.
- For the median of a non-symmetric pdf: set up β« f(x) dx = Β½ from the lower limit to m.
- For piecewise pdfs: compute partial areas at each junction first, then locate the piece holding the median.
- For the mode: differentiate f, solve fβ²(x) = 0, keep only roots inside the domain.
- Always compare f at every interior critical point AND both endpoints β biggest f-value wins.
Worked examples
WE 1Median by symmetry β no integration needed
The continuous random variable X has pdf f(x) = 34(1 β xΒ²) for β1 β€ x β€ 1 (and 0 otherwise). Find the median of X.
Test for symmetry
f(βx) = (3/4)(1 β (βx)Β²) = (3/4)(1 β xΒ²) = f(x)
β f is symmetric about x = 0
Symmetric pdf β median = axis of symmetry
Median = 0
no need to integrate β symmetry does the whole job
WE 2Median of a linear pdf via integration
The continuous random variable X has pdf f(x) = 18x for 0 β€ x β€ 4 (and 0 otherwise). Find the median.
Set up median equation
β«β^m (1/8)x dx = 1/2
[xΒ²/16]β^m = 1/2
mΒ²/16 = 1/2
Solve for m
mΒ² = 8
m = Β±2β2 β take positive root (must be in [0, 4])
Median = 2β2 β 2.83 (3 sf)
always reject the negative root if it falls outside the pdf’s domain
WE 3Median of a quadratic pdf β exact form
The continuous random variable X has pdf f(x) = 3xΒ² for 0 β€ x β€ 1 (and 0 otherwise). Find the exact value of the median.
Set up median equation
β«β^m 3xΒ² dx = 1/2
[xΒ³]β^m = 1/2
mΒ³ = 1/2
Take cube root
m = (1/2)^(1/3) = 2^(β1/3)
Rationalise: multiply by 2^(2/3)/2^(2/3)
m = 2^(2/3)/2 = β4 / 2
Median = β4 / 2 β 0.794 (3 sf)
exact form is preferred when asked β leave the cube root in surd form
WE 4Median of a piecewise pdf
The continuous random variable X has pdf:
f(x) = 18x for 0 β€ x β€ 2;
f(x) = 14 for 2 β€ x β€ 5;
f(x) = 0 otherwise.
Find the median of X.
Step 1: find cumulative area at the junction x = 2
P(X β€ 2) = β«βΒ² (1/8)x dx = [xΒ²/16]βΒ² = 4/16 = 1/4
1/4 < 1/2 β median lives in piece 2 (the constant region)
Step 2: build up to Β½ in piece 2
1/4 + β«β^m (1/4) dx = 1/2
1/4 + (m β 2)/4 = 1/2
(m β 2)/4 = 1/4
m β 2 = 1 β m = 3
Median = 3
piecewise rule: ALWAYS check partial areas at junctions BEFORE integrating
WE 5Mode by differentiation β interior critical point
The continuous random variable X has pdf f(x) = 427xΒ²(3 β x) for 0 β€ x β€ 3 (and 0 otherwise). Find the mode.
Expand: f(x) = (4/27)(3xΒ² β xΒ³)
Differentiate
fβ²(x) = (4/27)(6x β 3xΒ²) = (4/27) Β· 3x(2 β x)
Solve fβ²(x) = 0
x = 0 or x = 2
Compare f at both critical points and endpoints
f(0) = 0; f(2) = (4/27)(4)(1) = 16/27 β 0.59
f(3) = (4/27)(9)(0) = 0
Largest at x = 2
Mode = 2
always test the endpoints too β they’re free candidates
WE 6Mode at an endpoint β fβ² = 0 gives a minimum
The continuous random variable X has pdf f(x) = 38(2 β x)Β² for 0 β€ x β€ 2 (and 0 otherwise). Find the mode.
Differentiate using chain rule
fβ²(x) = (3/8) Β· 2(2 β x) Β· (β1) = β(3/4)(2 β x)
Solve fβ²(x) = 0
2 β x = 0 β x = 2
Check this is in the domain β yes, x = 2 is an endpoint
f(2) = (3/8)(0)Β² = 0 β this is a MINIMUM, not a max!
Compare f at both endpoints
f(0) = (3/8)(2)Β² = (3/8)(4) = 3/2
f(2) = 0
Largest f at x = 0
Mode = 0
fβ² = 0 doesn’t always give the mode β endpoint f-values can win
π‘ Top tips
- Sketch first β symmetry can give the median for free; shape can give the mode at a glance.
- Reject roots outside the domain when solving for m β only one root usually survives.
- Always check endpoints when finding the mode; fβ² = 0 doesn’t catch boundary maxima.
- For piecewise pdfs, the partial-area check at each junction tells you which piece holds m.
- Hidden polynomial: integral equations like mβ΄ β 32mΒ² + 128 = 0 often factor as quadratics in mΒ².
β Common mistakes
- Confusing median with mean β median splits area in half; mean is the integral β« xf(x) dx.
- Forgetting to check endpoints when finding the mode β fβ² = 0 catches interior critical points only.
- Choosing the wrong root β if the equation gives Β±m, only one will lie inside the pdf’s domain.
- Treating P(X = m) β 0 β for a CRV it’s exactly 0; the median is well-defined regardless.
- For piecewise: integrating from the lower limit to m without first checking which piece m is in.
Final sub-section: Mean & Variance of a CRV. The mean is computed by E(X) = β« xf(x) dx β note the extra factor of x. Variance comes from Var(X) = E(XΒ²) β [E(X)]Β², and the linear transformation rules (E(aX + b) = aE(X) + b, Var(aX + b) = aΒ²Var(X)) carry over from discrete random variables unchanged.
Need help with Statistics & Probability?
Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.
Book Free Session β