IB MATHEMATICS: APPLICATIONS AND INTERPRETATION • STATISTICS AND PROBABILITY

Continuous Random Variables — AHL 4.8 Continuous random variables and probability density functions (HL)

Understanding how probability spreads over a continuum and why area under a curve replaces counting outcomes.

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).

1733
De Moivre's Bell Curve
Abraham de Moivre published the first mathematical description of the normal distribution, showing that binomial probabilities approach a smooth, bell-shaped curve as the number of trials grows — the earliest continuous probability density function.
1812
Laplace's Théorie Analytique
Pierre-Simon Laplace formalized the idea that probabilities for continuous quantities are found by integrating a density function over an interval, laying the algebraic groundwork used in the IB syllabus today.
1902
Pearson and the Chi-Squared Test
Karl Pearson introduced several continuous distributions for statistical testing, demonstrating the broad applicability of probability density functions beyond the normal curve.
1933
Kolmogorov's Axioms
Andrey Kolmogorov published a rigorous set of probability axioms that unified discrete and continuous probability under one mathematical framework, using integration as the key tool for continuous distributions.

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.

1

Continuous Random Variable

A variable X that can take any value within a continuous range, such as 0 ≤ X ≤ 10 or −∞ < X < ∞. Examples include height, time, and temperature.
2

Probability Density Function (pdf)

A function f(x) that describes how probability is distributed. The probability that X lies in an interval [a, b] equals the area under f(x) between a and b.
3

Total Area = 1

The total area under the entire pdf curve must equal 1, since the variable must take some value with certainty.
4

P(X = a) = 0

The probability that a continuous variable equals any single exact value is zero. Only intervals have nonzero probability — think of a line having zero width on a number line.
5

f(x) ≥ 0 for All x

A probability density function can never be negative because probability itself can never be negative. The curve sits on or above the horizontal axis everywhere.
KEY TAKEAWAY
Imagine filling a swimming pool with exactly 1 litre of water and spreading it across the entire pool floor. The water depth at each point is like f(x) — it can vary from spot to spot, but the total volume is always 1. To find the probability that X falls in some range, you scoop up the water over that range and measure its volume. That volume is the area under the curve — the integral of f(x) over the interval.

Visual Explanation — The pdf Curve

The smooth cyan curve is the probability density function f(x). The shaded region between x = a and x = b represents P(a ≤ X ≤ b). Notice that f(x) is not a probability by itself — only the area under the curve over an interval gives you a probability.

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.

💡 Why f(x) Can Be Greater Than 1
A common misconception is that f(x) must always be ≤ 1 because probabilities are at most 1. However, f(x) is a density, not a probability. It is perfectly valid for f(x) to exceed 1 at some points, as long as the total area under the curve remains exactly 1. For example, a uniform distribution on [0, 0.5] has f(x) = 2 for all x in that interval.

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.

VALIDITY CONDITIONS
f(x) ≥ 0 for all x, and ∫₋∞^∞ f(x) dx = 1
f(x) is the probability density function. The integral of f(x) over the entire domain must equal 1, ensuring that total probability is 1.
PROBABILITY OVER AN INTERVAL
P(a ≤ X ≤ b) = ∫ₐᵇ f(x) dx
The probability that X lies between a and b is the definite integral of f(x) from a to b — the area under the curve between those two values.
EXPECTED VALUE (MEAN)
E(X) = μ = ∫₋∞^∞ x · f(x) dx
The expected value is the weighted average of all possible values of X, weighted by their density. It tells you where the 'balance point' of the distribution lies.
VARIANCE
Var(X) = E(X²) − [E(X)]² where E(X²) = ∫₋∞^∞ x² · f(x) dx
The variance measures how spread out the distribution is. E(X²) is found by integrating x² · f(x). The standard deviation σ is the square root of the variance.
📝 IB Notation Tip
In IB exams, the pdf is often given as a piecewise function. For example, f(x) = kx for 0 ≤ x ≤ 4 and f(x) = 0 otherwise. Your first task in most problems will be to find the constant k using the condition ∫₀⁴ kx dx = 1.

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.

CUMULATIVE DISTRIBUTION FUNCTION
F(x) = P(X ≤ x) = ∫₋∞ˣ f(t) dt
F(x) starts at 0 and increases to 1. It is a non-decreasing function. The connection back to the pdf is f(x) = F′(x) — the density is the derivative of the cdf.
Left panel: a triangular pdf with its mode at the peak (x = 2). Right panel: the corresponding cdf (green S-curve), rising from 0 to 1. The median is where F(x) = 0.5.

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.

📐 Finding the Median
To find the median of a continuous random variable, solve ∫₋∞ᵐ f(x) dx = 0.5 for m. In practice, if f(x) = 0 for x < a, this becomes ∫ₐᵐ f(x) dx = 0.5.

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).

Full pdf Analysis: f(x) = kx(4 − x)
1
Step 1 — Set Up the Normalisation ConditionSince f(x) must integrate to 1 over its entire domain, we write ∫₀⁴ kx(4 − x) dx = 1. Expand the integrand: kx(4 − x) = k(4x − x²).
2
Step 2 — Evaluate the Integral∫₀⁴ k(4x − x²) dx = k[2x² − x³/3]₀⁴ = k[(2 × 16 − 64/3) − 0] = k[32 − 64/3] = k × (96/3 − 64/3) = k × 32/3.
3
Step 3 — Solve for kSetting k × 32/3 = 1 gives k = 3/32.
k = 3/32
4
Step 4 — Find P(1 ≤ X ≤ 3)P(1 ≤ X ≤ 3) = ∫₁³ (3/32) × x(4 − x) dx = (3/32) ∫₁³ (4x − x²) dx = (3/32)[2x² − x³/3]₁³. Evaluating: at x = 3 we get 2(9) − 27/3 = 18 − 9 = 9; at x = 1 we get 2(1) − 1/3 = 5/3. So the integral is (3/32)(9 − 5/3) = (3/32)(22/3) = 22/32 = 11/16.
P(1 ≤ X ≤ 3) = 11/16 = 0.6875
5
Step 5 — Find E(X)E(X) = ∫₀⁴ x × (3/32) × x(4 − x) dx = (3/32) ∫₀⁴ (4x² − x³) dx = (3/32)[4x³/3 − x⁴/4]₀⁴ = (3/32)[(256/3) − 64] = (3/32)(256/3 − 192/3) = (3/32)(64/3) = 64/32 = 2.
E(X) = 2

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.

Comparison of discrete and continuous random variable frameworks
FeatureDiscrete Random VariableContinuous Random Variable
Possible valuesCountable set (e.g., 0, 1, 2, …)All values in an interval
Probability functionP(X = x) — probability mass functionf(x) — probability density function
P(X = specific value)Can be > 0Always = 0
Total probabilityΣ P(X = xᵢ) = 1∫ f(x) dx = 1
Expected valueE(X) = Σ xᵢ · P(X = xᵢ)E(X) = ∫ x · f(x) dx
Cumulative functionF(x) = Σ P(X ≤ x), step functionF(x) = ∫ f(t) dt, smooth curve
KEY TAKEAWAY
Think of discrete probability as counting grains of sand — each grain has a measurable weight. Continuous probability is like measuring water: you can't weigh a single molecule of water in any practical sense, but you can measure the volume (area) in any container (interval). The integral is your measuring cup.

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.

How AHL 4.8 concepts connect to later IB topics
Concept in AHL 4.8Where 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 deviationQuality control, sampling distributions, Central Limit Theorem
🎯 IB Exam Strategy
In the exam, pdf problems almost always begin with 'find k' by setting the integral equal to 1. Once k is determined, subsequent parts ask for probabilities, E(X), Var(X), or the median. Show every integration step clearly and write the integration limits explicitly — marks are often awarded for correct setup even if a numerical error occurs.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain why P(X = 3) = 0 for a continuous random variable X, even though X = 3 is a perfectly valid outcome. Use the concept of area to support your explanation.
PROBLEM 2BASIC CALCULATION
A continuous random variable X has the pdf f(x) = cx² for 0 ≤ x ≤ 3, and f(x) = 0 otherwise. Find the value of the constant c.
PROBLEM 3INTERMEDIATE
Using the pdf from Problem 2 (f(x) = x²/9 for 0 ≤ x ≤ 3), find P(1 ≤ X ≤ 2) and E(X).
PROBLEM 4APPLIED
The lifetime T (in years) of a certain smartphone battery is modelled by the pdf f(t) = (3/8)(4t − t²) for 0 ≤ t ≤ 2, and f(t) = 0 otherwise. (a) Find the probability that a battery lasts more than 1.5 years. (b) Find the expected lifetime.
PROBLEM 5CRITICAL THINKING
A continuous random variable X has the pdf f(x) = (3/2)x(2 − x) for 0 ≤ x ≤ c, and f(x) = 0 otherwise. (a) Show that c = 2 is the only valid value. (b) Find the median m. (c) Show that the mean equals the median and explain why this happens.

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.

Varsity Tutors • IB Mathematics: Applications and Interpretation • Continuous Random Variables — AHL 4.8