Historical Context & Motivation
Before the 18th century, probability was almost exclusively about counting outcomes — rolling dice, drawing cards, or tallying votes. These scenarios involve discrete random variables, where outcomes can be listed one by one. But as scientists began measuring things like heights, temperatures, and errors in astronomical readings, they realised that data often takes any value within an interval rather than jumping between separate values. This shift demanded an entirely new mathematical tool — the probability density function (pdf).
The central question these mathematicians faced was deceptively simple: if a variable can take infinitely many values, how do you assign a probability to each one without everything adding up to infinity? The answer lies in measuring probability as area under a curve rather than as individual point values. This idea is the heart of AHL 4.8.
Core Principles & Definitions
A continuous random variable X is a variable that can take any real value within a given interval (or across all real numbers). Unlike a discrete random variable, where you can list individual outcomes and their probabilities, continuous variables are described by a smooth function called a probability density function (pdf), denoted f(x). The following principles form the foundation you need.
Non-Negativity
Total Area Equals 1
Probability = Area
Point Probability Is Zero
The CDF Connection
Visualising the Probability Density Function
The diagram below shows a generic probability density function f(x) plotted on a standard set of axes. The shaded region between x = a and x = b represents P(a ≤ X ≤ b) — the probability that the random variable X takes a value in that interval. Notice that the entire curve sits above the x-axis (non-negativity), and the total area under the curve is 1.
A key observation from this diagram: the value f(x) at any particular point is not a probability. It is a density — it tells you how concentrated the probability is near that value. To obtain an actual probability, you must integrate (find area). This is why f(x) can even exceed 1 at certain points, as long as the total area under the whole curve remains exactly 1.
Mathematical Framework
The mathematics of continuous random variables centres on three key operations: finding probabilities via integration, computing the expected value (mean), and computing the variance. All three rely on definite integrals of the pdf.
CDF, Mode, and Median
Beyond the pdf itself, several related quantities appear regularly in IB HL questions. The cumulative distribution function (CDF), the mode, and the median each provide a different perspective on the same distribution.
| Quantity | Definition | How to Find It |
|---|---|---|
| CDF F(x) | P(X ≤ x), the running total of probability up to x | Integrate: F(x) = ∫ from −∞ to x of f(t) dt |
| Mode | The value of x where f(x) is greatest | Set f′(x) = 0 and verify it is a maximum |
| Median | The value m such that half the distribution lies on each side | Solve F(m) = 0.5, i.e., ∫ from lower limit to m of f(x) dx = 0.5 |
Worked Example
Consider a continuous random variable X with probability density function f(x) = kx(4 − x) for 0 ≤ x ≤ 4, and f(x) = 0 otherwise. We will find k, then compute P(1 ≤ X ≤ 3), the mean E(X), and the variance Var(X).
Discrete vs. Continuous — Key Differences
Many students find it helpful to compare continuous random variables with the discrete ones they already know. The table below highlights the most important parallels and contrasts. Understanding these differences helps prevent common errors on IB exams.
| Feature | Discrete | Continuous |
|---|---|---|
| Values | Countable set (e.g., 0, 1, 2, …) | Any real number in an interval |
| Probability function | P(X = x), a probability mass function (pmf) | f(x), a probability density function (pdf) |
| P(X = c) | Can be non-zero | Always 0 |
| Summing probabilities | Σ P(X = xᵢ) = 1 | ∫ f(x) dx = 1 |
| Expected value | E(X) = Σ xᵢ · P(X = xᵢ) | E(X) = ∫ x · f(x) dx |
| Graphical representation | Spike / bar chart | Smooth curve |
Connections to Advanced Theory
The concepts you have learned here serve as stepping stones to more advanced probability and statistics. In the IB course and beyond, continuous distributions extend into powerful named distributions such as the normal distribution, the exponential distribution, and the uniform distribution. The skills of setting up and evaluating integrals to find k, compute means, and determine variances apply directly to every named continuous distribution you will encounter.
| This Lesson (General pdf) | Advanced Topics |
|---|---|
| Generic f(x) with polynomial expressions | Named pdfs: normal (bell curve), exponential (decay), uniform (flat) |
| ∫ f(x) dx = 1 to find constants | Parameters μ, σ, λ characterise the distribution automatically |
| Manual computation of E(X) and Var(X) | Formulas built into GDC and formula booklet (e.g., E(X) = 1/λ for exponential) |
| CDF found by integration | CDF tables and technology-based look-ups (e.g., normal CDF) |
At university level, you would encounter moment-generating functions and multivariate density functions that extend these ideas to multiple random variables simultaneously. The essential intuition — probability as area under a curve — remains unchanged even at the most advanced levels.
Practice Problems
Lesson Summary
A continuous random variable can take any real value within an interval, and its behaviour is described by a probability density function (pdf) f(x). Two conditions must hold: f(x) ≥ 0 everywhere, and the total area under the curve equals 1. Probability is found by integrating f(x) over an interval: P(a ≤ X ≤ b) = ∫ from a to b of f(x) dx. At any single point, P(X = c) = 0.
The expected value E(X) = ∫ x · f(x) dx gives the mean, while Var(X) = E(X²) − [E(X)]² measures spread. The CDF F(x) accumulates probability from left to right, the mode is the x-value where f(x) is maximised, and the median satisfies F(m) = 0.5. These tools let you model and analyse real-world data that varies smoothly, from waiting times to measurement errors.