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

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:

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

  1. Sketch the pdf β€” symmetry tells you the median for free.
  2. For the median of a non-symmetric pdf: set up ∫ f(x) dx = ½ from the lower limit to m.
  3. For piecewise pdfs: compute partial areas at each junction first, then locate the piece holding the median.
  4. For the mode: differentiate f, solve fβ€²(x) = 0, keep only roots inside the domain.
  5. Always compare f at every interior critical point AND both endpoints β€” biggest f-value wins.

Worked examples

WE 1

Median 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 2

Median 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 3

Median 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 4

Median 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 5

Mode 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 6

Mode 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

⚠ Common mistakes

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 β†’