Introduction to Statistics · Chapter 4 · Random Variables

Continuous Probability Functions

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

Continuous Probability Functions · bookSHelf Intro Stats§4.5

Learning objectives — by the end of this section you will be able to

Objectives

  1. Explain why probability for a continuous variable is area, not a list §4.5.1
  2. State the two conditions a probability density function must satisfy definition
  3. Calculate P(a<x<b)P(a < x < b) for a flat density as the area of a rectangle §4.5.1
  4. Explain why P(x=c)P(x=c) is zero for any single value cc §4.5.1
  5. Use the CDF P(Xx)P(X \leq x) and the complement rule P(X>x)=1P(X<x)P(X>x)=1-P(X<x) §4.5.2
4.5

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

Continuous Probability Functions · bookSHelf Intro Stats§4.5

§4.5.1 — the two-part test any density has to pass

Probability Density Function (PDF)

Definition 4.5.1 — Probability Density Function

A probability density function for a continuous random variable XX is a function f(x)f(x) with two properties:

  1. f(x)0f(x) \geq 0 for every value of xx.
  2. The total area between the graph of f(x)f(x) and the x-axis is exactly one.

Figure: the whole area under the density is 1, and a slice of it is a probability.

The probability that XX lands between aa and bb is the area under f(x)f(x) from aa to bb: P(a<x<b)=area under f(x) from a to bP(a < x < b) = \text{area under } f(x) \text{ from } a \text{ to } b

Continuous Probability Functions · bookSHelf Intro Stats§4.5

§4.5.1 — a height is not a probability

f(x)f(x) is a density, not a probability

The height of the curve at x=3x=3 is not "the probability of 3" — it is a density, a rate of probability per unit of xx. 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.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

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.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

Insight Note — every area in this section is a rectangle

Base times height. That is the whole computation.

When f(x)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.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

Your turn — check both properties, in order

Try It Now 4.5.1

Try It Now 4.5.1

Consider f(x)=18f(x) = \frac{1}{8} for 0x80 \leq x \leq 8, and f(x)=0f(x) = 0 everywhere else. Show that f(x)f(x) is a legitimate probability density function.

Both properties hold

1. On 0x80 \leq x \leq 8, f(x)=18>0f(x) = \frac{1}{8} > 0; everywhere else it is 0 — never negative.

2. AREA=8(18)=1\text{AREA} = 8\left(\frac{1}{8}\right) = 1

Continuous Probability Functions · bookSHelf Intro Stats§4.5

Worked example — confirm the density integrates to one

Example 4.5.1a: The Total Area Is One

Example 4.5.1 — Areas Under a Flat Density

Consider f(x)=120f(x) = \frac{1}{20} for 0x200 \leq x \leq 20. a. Show that the total area under f(x)f(x) is one.


The graph is a horizontal segment at height 120\frac{1}{20}, so the region under it is a rectangle with base 20:

AREA=20(120)=1\text{AREA} = 20\left(\frac{1}{20}\right) = 1

Figure 4.5.1 - The density f(x) = 1/20 drawn as a flat segment over its whole support.

Figure 4.5.1: the density f(x)=120f(x)=\frac{1}{20} drawn as a flat segment over its whole support.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

Worked example — a narrow strip at the left edge

Example 4.5.1b: P(0<x<2)P(0 < x < 2)

Example 4.5.1, continued

b. Find P(0<x<2)P(0 < x < 2). The region is again a rectangle — base from 0 to 2, height still 120\frac{1}{20}.


AREA=(20)(120)=0.1\text{AREA} = (2-0)\left(\frac{1}{20}\right) = 0.1

So P(0<x<2)=0.1P(0 < x < 2) = 0.1.

Figure 4.5.2 - The strip from x = 0 to x = 2 has area (2)(1/20) = 0.1.

Figure 4.5.2: the strip from x=0x=0 to x=2x=2 has area (2)(120)=0.1(2)\left(\frac{1}{20}\right) = 0.1.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

Worked example — same move, wider base

Example 4.5.1c: P(4<x<15)P(4 < x < 15)

Example 4.5.1, continued

c. Find P(4<x<15)P(4 < x < 15). The base is (154)=11(15-4)=11.


AREA=(154)(120)=0.55\text{AREA} = (15-4)\left(\frac{1}{20}\right) = 0.55

So P(4<x<15)=0.55P(4 < x < 15) = 0.55.

Figure 4.5.3 - The strip from x = 4 to x = 15 has area (11)(1/20) = 0.55.

Figure 4.5.3: the strip from x=4x=4 to x=15x=15 has area (11)(120)=0.55(11)\left(\frac{1}{20}\right) = 0.55.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

Worked example — a single point has no width

Example 4.5.1d: P(x=15)P(x = 15)

Example 4.5.1, continued

d. Find P(x=15)P(x = 15). On the graph, x=15x=15 is a vertical line — a vertical line has no width, so its base is zero.


P(x=15)=(base)(height)=(0)(120)=0P(x=15) = (\text{base})(\text{height}) = (0)\left(\frac{1}{20}\right) = 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)=0P(x=15)=0.

4.5

§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 xx — tabulated once.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

§4.5.2 — the running total behind every question

Cumulative Distribution Function (CDF)

Definition 4.5.2 — Cumulative Distribution Function (CDF)

The cumulative distribution function of a continuous random variable XX is

P(Xx)=the area under f(x) to the left of xP(X \leq x) = \text{the area under } f(x) \text{ to the left of } x

The complement: P(X>x)=1P(X<x)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.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

§4.5.2 — reading the split

The shaded block is P(X<x)P(X<x); the rest is P(X>x)P(X>x)

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(Xx)P(X \leq x) and P(X<x)P(X < x) are the same number for a continuous distribution — the endpoint contributes nothing either way.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

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.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

Your turn — draw it first, then measure the strip

Try It Now 4.5.2

Try It Now 4.5.2

Consider f(x)=18f(x) = \frac{1}{8} for 0x80 \leq x \leq 8. Draw the graph of f(x)f(x), scale both axes, shade the region between x=2.5x=2.5 and x=7.5x=7.5, and find P(2.5<x<7.5)P(2.5 < x < 7.5).

Base 5, height 18\frac{1}{8}

P(2.5<x<7.5)=(7.52.5)(18)=0.625P(2.5 < x < 7.5) = (7.5-2.5)\left(\frac{1}{8}\right) = 0.625

Check: 0.625 is between 0 and 1, and the shaded strip covers a bit more than half the rectangle — consistent.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

Worked example — a strip between two interior values

Example 4.5.2: A Probability Between Two Interior Values

Example 4.5.2

Return to f(x)=120f(x) = \frac{1}{20} on 0x200 \leq x \leq 20. Shade the region between x=2.3x=2.3 and x=12.7x=12.7 and find P(2.3<x<12.7)P(2.3 < x < 12.7).


Height 120\frac{1}{20}, base 12.72.3=10.412.7-2.3=10.4:

P(2.3<x<12.7)=(12.72.3)(120)=0.52P(2.3 < x < 12.7) = (12.7-2.3)\left(\frac{1}{20}\right) = 0.52

Figure 4.5.6 - The strip between x = 2.3 and x = 12.7 shaded under the flat density.

Figure 4.5.6: the strip between x=2.3x=2.3 and x=12.7x=12.7 shaded under the flat density.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

Try it in rāSHio — read the shaded area straight off the tool

Distributions → Normal shades the area for you

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(Xx)P(X \leq x), and whatever stays unshaded is P(X>x)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.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

§4.5.2 — watching the split move

rāSHio: Distributions → Normal

Figure 4.5.7: reading area to the left as a probability in rāSHio — Distributions → Normal.

Continuous Probability Functions · bookSHelf Intro Stats§4.5

Key Terminology — the four terms this section defined

The vocabulary

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)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(Xx)P(X \leq x), the area under f(x)f(x) to the left of xx.

4.5

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 cP(x=c) = (0)(\text{height}) = 0 \text{ for any continuous } X \text{ and any } c

† That is why P(X<x)P(X < x) and P(Xx)P(X \leq x) are the same number for a continuous variable — the endpoint contributes nothing.

4.5
Continuous Probability Functions · bookSHelf Intro Stats§4.5

§4.5 — conclusions

What §4.5 leaves you with

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(Xx)P(X \leq x) tabulates the area to the left so every other question becomes a subtraction.

The failure case

Treating f(x)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.