Historical Context & Motivation
When you roll a die, you can list every possible outcome: 1, 2, 3, 4, 5, or 6. These are discrete values — they jump from one whole number to the next with nothing in between. But what if you're measuring the exact height of a person, the precise time it takes to run a race, or the temperature of a cup of coffee? These quantities can take any value within a range, including decimals that never end. Mathematicians needed a framework to handle probability for this kind of continuous data, and that quest produced one of the most powerful tools in statistics: the probability density function (pdf).
The central question these mathematicians faced was: if a continuous variable can take infinitely many values, how do we assign a meaningful probability to any particular value? The answer, as you will see in this lesson, is that we shift our focus from individual values to intervals — probability becomes an area under a curve rather than a bar on a chart.
Core Principles & Definitions
Before diving into calculations, you need a clear picture of the foundational ideas. A continuous random variable X is a variable whose possible values form an entire interval (or a union of intervals) on the real number line. Unlike a discrete random variable — where you can list outcomes — continuous random variables have uncountably many possible values. This seemingly small change has enormous consequences for the way we compute probability.
Continuous Random Variable
Probability Density Function (pdf)
Total Area = 1
P(X = a) = 0
f(x) ≥ 0 for All x
Visual Explanation — The pdf Curve
Look at the diagram above carefully. The vertical axis shows f(x), the density — not probability directly. The horizontal axis shows the possible values of X. The entire curve sits above the x-axis (since f(x) ≥ 0), and the total area under the curve from the far left to the far right equals 1. When you want the probability that X falls between two values a and b, you compute the shaded area between those two vertical dashed lines. In mathematical terms, this is the definite integral of f(x) from a to b.
Mathematical Framework
The IB syllabus expects you to work with probability density functions algebraically. You need to be comfortable with the conditions that define a valid pdf, the formula for finding probabilities over intervals, and how to calculate the expected value (mean) and variance of a continuous random variable. Each of these involves integration.
Cumulative Distribution Function, Mode & Median
The probability density function tells you how probability is spread out, but sometimes you want to ask: what is the probability that X is at most some value? That is the job of the cumulative distribution function (cdf), written F(x). It accumulates probability from the left, so F(x) = P(X ≤ x). Understanding the cdf alongside the pdf gives you a complete toolkit for working with continuous distributions.
Three important measures of centre appear in IB questions for continuous random variables. The mode is the x-value where f(x) is greatest — the peak of the density curve. The median m satisfies F(m) = 0.5, meaning half the total area lies to the left of m and half to the right. The mean (expected value) is the balance point of the distribution, computed by the integral E(X) = ∫ x · f(x) dx. For a symmetric pdf, the mean, median, and mode all coincide; for skewed distributions, they typically differ.
Worked Example
Let's work through a full IB-style problem step by step. Suppose a continuous random variable X has the probability density function f(x) = kx(4 − x) for 0 ≤ x ≤ 4, and f(x) = 0 otherwise. We will find k, compute P(1 ≤ X ≤ 3), and determine E(X).
Notice that E(X) = 2, which is the midpoint of the interval [0, 4]. This makes sense because the pdf f(x) = (3/32)x(4 − x) is a symmetric parabola on [0, 4], opening downward with its peak at x = 2. For a symmetric density, the mean equals the axis of symmetry.
Discrete vs Continuous — A Comparison
By now, you might wonder how the continuous framework relates to the discrete probability distributions you studied earlier. The parallels are strong but the tools change, because summation (Σ) is replaced by integration (∫). The table below lays out the key correspondences.
| Feature | Discrete Random Variable | Continuous Random Variable |
|---|---|---|
| Possible values | Countable set (e.g., 0, 1, 2, …) | All values in an interval |
| Probability function | P(X = x) — probability mass function | f(x) — probability density function |
| P(X = specific value) | Can be > 0 | Always = 0 |
| Total probability | Σ P(X = xᵢ) = 1 | ∫ f(x) dx = 1 |
| Expected value | E(X) = Σ xᵢ · P(X = xᵢ) | E(X) = ∫ x · f(x) dx |
| Cumulative function | F(x) = Σ P(X ≤ x), step function | F(x) = ∫ f(t) dt, smooth curve |
Connection to Advanced Theory & IB Exam Strategy
Continuous random variables form the foundation for many advanced topics you will encounter in IB HL and beyond. The normal distribution, which you study extensively in AHL 4.9, is the most famous continuous distribution — its pdf is the bell curve. Other important continuous distributions include the uniform, exponential, and chi-squared distributions, each with their own pdf.
| Concept in AHL 4.8 | Where It Leads |
|---|---|
| Probability density function f(x) | Normal pdf (bell curve), exponential models, and hypothesis testing |
| Expected value E(X) | E(g(X)) for transformed variables, linear combinations of random variables |
| Cumulative distribution function F(x) | Inverse normal (z-table) calculations, confidence intervals |
| Variance and standard deviation | Quality control, sampling distributions, Central Limit Theorem |
Practice Problems
Lesson Summary
A continuous random variable can take any value in an interval, and its behaviour is described by a probability density function (pdf) f(x). The two essential conditions for a valid pdf are that f(x) ≥ 0 everywhere and the total area under the curve equals 1. Probability is calculated as the area under the curve over a given interval using integration: P(a ≤ X ≤ b) = ∫ₐᵇ f(x) dx. A single point has zero width, so P(X = a) = 0 for any specific value a.
Key summary measures include the expected value E(X) = ∫ x · f(x) dx, the variance Var(X) = E(X²) − [E(X)]², the mode (peak of f(x)), and the median (where the cdf equals 0.5). The cumulative distribution function F(x) = ∫₋∞ˣ f(t) dt gives the probability P(X ≤ x) and is the antiderivative of f(x). These tools form the backbone of the IB HL statistics syllabus and connect directly to the normal distribution, hypothesis testing, and confidence intervals studied in later topics.