Introduction to Statistics · Chapter 4 · Random Variables
A probability stops being a table of rows and becomes an area under a curve — measured, not counted, and zero at any single point.
bookSHelf · Introduction to Statistics · §4.5 · a self-paced section
Learning objectives — by the end of this section you will be able to
§4.5.1 — Probability Is Area
You cannot write a row for every possible value of a continuous random variable — there are infinitely many. A curve solves that: it assigns probability to stretches of the number line, something you can measure, instead of to points.
A probability is the area under a curve — never a number you read straight off it.
§4.5.1 — the two-part test any density has to pass
Definition 4.5.1 — Probability Density Function
A probability density function for a continuous random variable X is a function f(x) with two properties:
Figure: the whole area under the density is 1, and a slice of it is a probability.
The probability that X lands between a and b is the area under f(x) from a to b: P(a<x<b)=area under f(x) from a to b
§4.5.1 — a height is not a probability
The height of the curve at x=3 is not "the probability of 3" — it is a density, a rate of probability per unit of x. It only becomes a probability once you multiply it by a width.
For a flat density, that multiplication is just base × height — a rectangle. If an area comes out bigger than 1, or negative, you've made an arithmetic mistake: no region can exceed the whole unit of area, and no width runs backwards.
Context Pause — why a curve replaces a table
A curve assigns probability to stretches, not points.
There are infinitely many possible values, and any list you start leaves out the number halfway between the first two entries. A stretch of the number line is something you can measure; a single point is not.
Insight Note — every area in this section is a rectangle
Base times height. That is the whole computation.
When f(x) is a flat horizontal line, the region under it is a rectangle — no calculus, no formula sheet. Multiply the width of the interval you care about by the height of the line, and you have the probability.
Your turn — check both properties, in order
Try It Now 4.5.1
Consider f(x)=81 for 0≤x≤8, and f(x)=0 everywhere else. Show that f(x) is a legitimate probability density function.
Both properties hold
1. On 0≤x≤8, f(x)=81>0; everywhere else it is 0 — never negative.
2. AREA=8(81)=1
Worked example — confirm the density integrates to one
Example 4.5.1 — Areas Under a Flat Density
Consider f(x)=201 for 0≤x≤20. a. Show that the total area under f(x) is one.
The graph is a horizontal segment at height 201, so the region under it is a rectangle with base 20:
AREA=20(201)=1
Figure 4.5.1: the density f(x)=201 drawn as a flat segment over its whole support.
Worked example — a narrow strip at the left edge
Example 4.5.1, continued
b. Find P(0<x<2). The region is again a rectangle — base from 0 to 2, height still 201.
AREA=(2−0)(201)=0.1
So P(0<x<2)=0.1.
Figure 4.5.2: the strip from x=0 to x=2 has area (2)(201)=0.1.
Worked example — same move, wider base
Example 4.5.1, continued
c. Find P(4<x<15). The base is (15−4)=11.
AREA=(15−4)(201)=0.55
So P(4<x<15)=0.55.
Figure 4.5.3: the strip from x=4 to x=15 has area (11)(201)=0.55.
Worked example — a single point has no width
Example 4.5.1, continued
d. Find P(x=15). On the graph, x=15 is a vertical line — a vertical line has no width, so its base is zero.
P(x=15)=(base)(height)=(0)(201)=0
Not a quirk of this function — for any continuous random variable, the probability of landing on one exact value is zero.
Figure 4.5.4: a single value is a line with no width, so P(x=15)=0.
§4.5.2 — The Cumulative Distribution Function
Rather than re-measuring a rectangle every time, tabulate the area to the left of each point once. Every "less than," "greater than," or "between" question becomes a subtraction on numbers you already have.
The area to the left of x — tabulated once.
§4.5.2 — the running total behind every question
Definition 4.5.2 — Cumulative Distribution Function (CDF)
The cumulative distribution function of a continuous random variable X is
P(X≤x)=the area under f(x) to the left of x
The complement: P(X>x)=1−P(X<x)
Figure 4.5.5: the cdf is the area to the left; whatever is left over is the area to the right.
§4.5.2 — reading the split
Together the two blocks are the entire rectangle, whose area is 1 — so the two probabilities always add to 1, exactly what the complement rule says.
Because a single point contributes no area, P(X≤x) and P(X<x) are the same number for a continuous distribution — the endpoint contributes nothing either way.
Context Pause — one running total answers every question
Tabulate the area to the left once; every question becomes subtraction.
Rather than re-measuring a rectangle each time, compute the area to the left of each point once. Every "less than," "greater than," or "between" question is then a subtraction on numbers you already have.
Your turn — draw it first, then measure the strip
Try It Now 4.5.2
Consider f(x)=81 for 0≤x≤8. Draw the graph of f(x), scale both axes, shade the region between x=2.5 and x=7.5, and find P(2.5<x<7.5).
Base 5, height 81
P(2.5<x<7.5)=(7.5−2.5)(81)=0.625
Check: 0.625 is between 0 and 1, and the shaded strip covers a bit more than half the rectangle — consistent.
Worked example — a strip between two interior values
Example 4.5.2
Return to f(x)=201 on 0≤x≤20. Shade the region between x=2.3 and x=12.7 and find P(2.3<x<12.7).
Height 201, base 12.7−2.3=10.4:
P(2.3<x<12.7)=(12.7−2.3)(201)=0.52
Figure 4.5.6: the strip between x=2.3 and x=12.7 shaded under the flat density.
Try it in rāSHio — read the shaded area straight off the tool
Open rāSHio and choose Distributions → Normal. Type the value you're asking about and the tool shades the area to its left, reading the probability off directly.
That shaded area is P(X≤x), and whatever stays unshaded is P(X>x). The density in this section is flat, so you can check it with a ruler — the tool runs the same left-area / right-area split on a curve you cannot.
§4.5.2 — watching the split move
Figure 4.5.7: reading area to the left as a probability in rāSHio — Distributions → Normal.
Key Terminology — the four terms this section defined
The variable
continuous random variable — a quantity whose possible values fill an unbroken stretch of the number line, so that between any two values there is always another.
uniform density — a density that is a flat horizontal line over its interval, so every stretch of equal width carries equal probability.
Its distribution
probability density function (pdf) — a non-negative function f(x) whose total area with the x-axis is one, and whose area between two values gives the probability the variable lands between them.
cumulative distribution function (cdf) — P(X≤x), the area under f(x) to the left of x.
The headline result of §4.5
Probability is area — and a single point has none
Every question in this section reduces to one multiplication: base × height. A single value, being a line with no width, always contributes exactly zero.
P(x=c)=(0)(height)=0 for any continuous X and any c
† That is why P(X<x) and P(X≤x) are the same number for a continuous variable — the endpoint contributes nothing.
§4.5 — conclusions
The core idea
Probability is area under a density. For a flat density that area is always base × height, the total area is always 1, and the cdf P(X≤x) tabulates the area to the left so every other question becomes a subtraction.
The failure case
Treating f(x) itself as a probability, or forgetting that a single exact value is a line with zero width — and therefore zero probability, no matter how likely the value "feels."
Next: §4.6 — Continuous Distribution, the general case where the density is no longer flat. Back to start.