Statistics 🔔 Random Variables & Distributions

Continuous Distributions: the PDF and the CDF

For continuous data, probability is the area under a curve — meet the density function and its running-total partner, the CDF.

Intro StatisticsAP Statistics level
💡
The big idea: A continuous variable can take any value in a range, so no single value gets its own slice of probability. Instead a smooth density curve — the PDF — carries the probability as area: the chance that X lands in an interval is the area under the curve above it. Sweep that area up from the left and you get the CDF, F(x) = P(X ≤ x), a running total that turns every probability question into reading, or subtracting, two areas.
🎯 By the end, you'll be able to
  • Explain why, for a continuous variable, probability is the area under the density curve rather than its height
  • State why the probability of any single exact value is 0, and why ≤ and < are interchangeable for continuous variables
  • Read an interval probability P(a ≤ X ≤ b) as an area, or equivalently as the CDF difference F(b) − F(a)
  • Describe the CDF F(x) = P(X ≤ x) as a running total of area that climbs from 0 up to 1
📎 You should already know
  • Histograms and the shape of a distribution
  • The normal distribution and its bell shape
  • Area under a curve (the basic idea of an integral)

From bars to a smooth curve

Roll two dice and you can list every outcome and give each one its own chance. But height, waiting time, or temperature can land on any value in a range — 1.5 cm, 1.500001 cm, anything in between. There are infinitely many possibilities, so we can no longer hand each exact value its own slice of probability.

Instead we describe a continuous variable with a smooth curve called a probability density function, or PDF, written \( f(x) \). The trick to reading it is the whole lesson: for continuous data, probability is area under the curve, not height.

🔑 Area is the probability — not height
For a continuous variable the PDF's height \( f(x) \) is a density, not a probability. A probability only appears once you pick an interval and measure the area under the curve above it. The total area under the whole curve is exactly 1, because the variable lands somewhere with certainty.

Why the chance of an exact value is zero

Ask for the probability that a person is exactly 180 cm tall — not 180.0001, not 179.9999, but 180.000... forever. That interval has zero width, so the area above it is zero. For any continuous variable and any single value \( c \), we get \( P(X = c) = 0 \).

This has a handy side effect. Because the endpoints carry no area, it makes no difference whether you write \( \le \) or \( < \): for continuous variables \( P(X \le b) = P(X < b) \).

\[ P(a \le X \le b) = \int_a^b f(x)\,dx \]
The probability that X lands between a and b is the area under the density curve from a to b.

The running total: the CDF

Working out a fresh area for every interval would be tedious, so statisticians keep a running total: start at the far left and accumulate the area as you sweep right. That running total is the cumulative distribution function, or CDF, written \( F(x) \).

\( F(x) \) answers one question: what is the probability that \( X \) is at most \( x \)? It starts at 0 on the far left, only ever climbs, and levels off at 1 on the far right — it can never dip, because area is never negative.

\[ F(x) = P(X \le x) = \int_{-\infty}^{x} f(t)\,dt \]
The CDF at x is the total area to the left of x — the probability that X is at most x.
\[ P(a \le X \le b) = F(b) - F(a) \]
Any interval probability is just a difference of two CDF values: the area up to b minus the area up to a.

Try it: shade the area, watch the total

The tool below draws a bell-shaped density. Drag the two bounds a and b to pick an interval; the solid shaded region is \( P(a < X < b) \), found as the true area under that curve. The faint shading stretching off to the left is the CDF \( F(b) = P(X \le b) \) — the running total of area up to b.

Watch two things as you drag. Pull a and b together and the shaded probability shrinks toward 0, even where the curve is tall — a hint of why a single point carries no probability. And the taller the curve over your interval, the faster area piles up there.

🎮 Interactive: area under the density = probability LIVE
Drag a and b to set an interval. The solid area is P(a < X < b); the faint area to the left of b is the CDF F(b) = P(X ≤ b). Both numbers come from integrating the very curve being drawn. Squeeze a and b together and the probability heads to 0.
✨ Two things worth remembering
1. A single point has no probability. Squeeze the interval down to a line and the area vanishes, so \( P(X = c) = 0 \). That is exactly why \( \le \) and \( < \) give the same answer for continuous variables. 2. Every interval is a subtraction. Once you have the CDF you never integrate twice — \( P(a < X < b) = F(b) - F(a) \), the running total at b minus the running total at a.
📝 Worked example: A measurement follows the standard bell-shaped (normal) curve from the tool, centered at 0. You are told the CDF values F(1) = 0.841 and F(-1) = 0.159. What is P(-1 ≤ X ≤ 1), and what is P(X = 1)?
  1. An interval probability is a difference of CDF values: \( P(-1 \le X \le 1) = F(1) - F(-1) \).
  2. Substitute the given running totals: \( 0.841 - 0.159 = 0.682 \).
  3. For the exact value, remember a single point has zero width, so its area is zero: \( P(X = 1) = 0 \).
✓ P(-1 ≤ X ≤ 1) ≈ 0.682 — about 0.68 of the area sits within one step of center — while P(X = 1) = 0. Because that endpoint carries no area, P(-1 ≤ X ≤ 1) and P(-1 < X < 1) are identical.

Check your understanding

1. For a continuous random variable, the probability of one exact value, such as P(X = 2), is…
A single value spans zero width, so the area above it — and therefore its probability — is 0. That is a defining feature of continuous variables.
2. For a continuous distribution, the probability that X falls between a and b is represented by…
Probability for continuous data is area under the density curve — here, the area above the interval from a to b.
3. The cumulative distribution function is defined as F(x) =
The CDF is the running total of area to the left of x, which is exactly the probability that X is at most x: P(X ≤ x).
4. For a continuous variable, F(3) = 0.90 and F(1) = 0.20. Then P(1 ≤ X ≤ 3) equals…
An interval probability is a difference of CDF values: F(3) − F(1) = 0.90 − 0.20 = 0.70.
✅ Key takeaways
  • For continuous variables, probability is area under the density curve (the PDF) — the height alone is not a probability.
  • The total area under any PDF is 1, and P(X = c) = 0 for every single exact value c.
  • Because endpoints carry no area, ≤ and < give the same probability for continuous variables.
  • The CDF F(x) = P(X ≤ x) is the running total of area to the left of x; it climbs from 0 to 1 and never decreases.
  • Any interval probability is a subtraction of CDF values: P(a ≤ X ≤ b) = F(b) − F(a).