Free access until 30 November 2026 · Physics and Maths questions and notes, updated continuously · Build a test

4 · IB Maths AA

Continuous random variables

Pick a probability density function, then drag a and b on the graph (or use the sliders) to shade P(a < X < b) as an area under f(x). The lower graph shows the cumulative distribution F(x), and the mean, median and mode are marked.


P(a < X < b) = ∫ f(x) dx from a to b = F(b) − F(a)
F(x) = ∫ f(t) dt from −∞ to x
E(X) = ∫ x f(x) dx
Var(X) = E(X²) − [E(X)]²
Median m: F(m) = 0.5
Mode: the x where f(x) is greatest

P(a < X < b)
F(a)
F(b)
Mean E(X)
Median m
Mode
Var(X)
σ

Try this

  1. With f(x) = 3x²/8, compare P(0 < X < 1) with P(1 < X < 2). Check that the first equals F(1) = 1/8 and explain why the second is seven times bigger.
  2. Choose the triangular density. Read off the mode, median and mean and note their order; then compare with the symmetric 3x(2 − x)/4, where all three coincide.
  3. Choose the exponential density, set a = 0 and move b to the mean 1/λ. Change λ and confirm that P(0 < X < mean) stays at 1 − e⁻¹ ≈ 0.632 and the median is always ln 2/λ.

Common error: a value of f(x) is not a probability (it can exceed 1, as the exponential curve shows for λ > 1); only areas under f(x) give probabilities, and since P(X = c) = 0, P(a < X < b) and P(a ≤ X ≤ b) are equal.