The chapter's hinge, and a genuine change of machinery. A continuous random variable can take any value in an interval rather than isolated whole numbers, and its distribution is described by a probability density function whose defining property is that the area between it and the horizontal axis equals a probability. Since the largest probability is one, the largest area is one. Three consequences follow immediately: probabilities belong to intervals rather than to single values, the probability of any one exact value is zero because a vertical line has no width and therefore no area, and strict and non-strict inequalities give the same answer because they enclose the same region. The cumulative distribution function gives the area to the left of a value, and the area to the right is one minus it.
Subject: Statistics · 68 slides · symbolic lesson
Open the interactive version of this deck
Title
Statistics · Chapter 5 — Continuous Random Variables
When a variable is measured rather than counted, probability moves from heights to areas
Objectives
Chapter 4 handed every value of a random variable its own probability, a stem you could point at. That machinery breaks the moment the variable is measured instead of counted, because a measured quantity can take more values than any list could hold. This lesson rebuilds probability for that case, and the whole rebuild rests on one idea: probability is area under a curve.
Almost every number in this lesson comes from one simple graph, a flat line one twentieth high over the interval from 0 to 20. That is deliberate. With the arithmetic reduced to base times height, all of your attention can go to the reasoning, which is exactly where students lose marks in this chapter and the next.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, pp. 291-295 — the chapter introduction and Section 5.1
Warm-up
In Section 4.1 you built Nancy's distribution: she attends 0, 1, 2 or 3 classes a week with probabilities 0.01, 0.04, 0.15 and 0.80. Answer from memory, then read the answer.
Discussion prompt
Using Nancy's table, give the probability that she attends exactly 2 days, fewer than 2 days, and at most 2 days. Then say what would go wrong if you tried to draw a stem plot for a variable that could be any number between 0 and 20.
Notice how the three answers were built. Exactly 2 was one stem read off the table. Fewer than 2 and at most 2 were sums of stems, and the only difference between them was whether the boundary stem went in. Every probability in Chapter 4 was a height, or a sum of heights.
Keep both halves of that answer. The first half, where an endpoint changes the answer by a whole stem, is about to stop being true. The second half, too many values to list, is the reason it stops being true, and it is the problem this whole lesson solves.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §4.1, p. 230 — Nancy's table, Table 4.4
Section
Part 1
Concept
The book opens the chapter with a warning. The same everyday situation can give a discrete random variable or a continuous one, and the only thing that tells them apart is how you define X.
Figure (svg): Two number lines from 0 to 10. The top one has eleven separate yellow dots at the whole numbers, labelled the number of miles to the nearest mile, with a red mark at 7.36 saying it is not a value. The bottom one has a solid cyan bar covering the whole interval, labelled the distance to work, with a yellow point at 7.36 marked as a value.
Define X as the number of miles you drive to work, to the nearest mile, and you have made a count. Its values can be listed, 0, 1, 2 and so on, with gaps between them, so it is discrete, exactly like Chapter 4. Define X as the distance you drive, and you measure it. Now 7.36 miles is a value, and so is 7.361, and between any two values there is always another.
continuous random variable — A random variable whose values are measured rather than counted, so that they fill an interval of real numbers instead of forming a list with gaps.
The book's second pair works the same way. The number of books in a backpack is a count and is discrete. The weight of one of those books is measured and is continuous. Batting averages, IQ scores, the length of a phone call, the lifetime of a computer chip: the chapter introduction lists these as continuous variables, because each is the result of a measurement.
So before any calculation, read the definition of X and ask one question: does this number come from counting or from measuring? The answer decides which chapter's tools you are allowed to use.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5, p. 291 — Introduction and the NOTE on miles and books
Sorting
For each random variable, decide whether its values can be listed with gaps, or whether they fill an interval. Several come straight from the book.
Sort into buckets
Place each random variable in the right group.
The miles item is the one to think about. The distance is really a measurement, but the variable as written is the rounded count, and the book files it as discrete for exactly that reason. Read what X says, not what it is about.
The number of phone calls and the length of a phone call are another pair like this. Same situation, one counted and one measured, one from Chapter 4 and one from this chapter.
A useful test when you are unsure: ask whether a value halfway between two possible values could also happen. Halfway between 3 and 4 books is not a number of books, so the count is discrete. Halfway between 3.2 and 3.3 pounds is a perfectly good weight, and so is halfway between those, so the weight is continuous.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5, p. 291 — NOTE
Socratic
Homework 73 asks a question that seems to clash with the miles example you just sorted: when age is rounded to the nearest year, do the data stay continuous, or do they become discrete?
Discussion prompt
The book's answer is that age stays continuous, since it is a measurement whatever the accuracy. But the miles example called a rounded distance discrete. Are the two answers consistent? Explain what decides it.
Read the two book passages side by side and the apparent clash disappears. The miles NOTE says the number of miles to the nearest mile, which is a count by construction. Homework 73 asks about age, the quantity, and only mentions that the data are rounded. One defines a new variable; the other describes how an old one was recorded.
In practice, when a problem describes a measured quantity such as time, age, weight or length, treat it as continuous even if the numbers in the data are rounded. Treat it as discrete only when the problem itself defines X as a count.
You will see why this matters in Part 3: rounding turns a single recorded value into a small interval, and an interval of a continuous variable has a genuine, positive probability.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 324 — Homework 73; answer p. 331
Step zero
You are one of 100 people in a study of the percentage of nurses in America with an R.N. degree. You ask nurses whether they have one, they answer yes or no, you work out the percentage with the degree, and you give it to your supervisor.
Discussion prompt
Before anything is computed: which part of this experiment gives discrete data, and which part gives continuous data? Name each random variable in words.
Notice that each yes or no is not itself a number. It becomes data once you count the yeses. That is the step zero of every probability problem: name the variable in words, with what is counted or measured, before choosing any tool.
One study, two variables, two chapters. Most real studies are like this, which is why the definition always comes first.
It is tempting to call the percentage discrete, because with a fixed number of nurses it can only take certain values: with 50 nurses, only multiples of 2 percent. The book treats it as the continuous part of the experiment because what it estimates, the percentage of all nurses in America, is a proportion that can be any number between 0 and 100.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 324 — Homework 72
Prediction
Table 5.1 in the book lists 55 smiling times, in seconds, of an eight-week-old baby. Sorted into 5-second bins, the tallest bar of the relative frequency histogram is the bin from 10 to 15 seconds, with 15 of the 55 smiles, a height of about 0.27.
Predict first
Redraw the relative frequency histogram with 1-second bins. What happens to the height of the tallest bar?
Correct: It shrinks to roughly a quarter of its old height
Why: Each 1-second bin holds far fewer smiles than a 5-second bin, so its relative frequency is smaller. Counted in node, the tallest 1-second bin holds 4 smiles, a height of about 0.073, just over a quarter of 0.273. It is not exactly a fifth, because the smiles are not spread perfectly evenly inside each wide bin.
The bars shrink because a relative frequency is a share of the data, and a narrower bin catches a smaller share. Nothing about the baby changed; only the ruler did.
\[ \frac{15}{55} \approx 0.273 \quad \longrightarrow \quad \frac{4}{55} \approx 0.073 \]
Now push the idea to the end. Make the bins a tenth of a second wide, then a hundredth. Every bar keeps shrinking toward zero. That is the first sign that, for a measured variable, the probability of one exact value is going to be zero, and it is why the book needs a different kind of graph.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.2, p. 295 — Table 5.1, the 55 smiling times
Concept
Here is the prediction drawn. Both histograms use the same 55 smiles and the same vertical scale; only the width of the bins differs.
Figure (svg): Two histograms of the 55 smile times on the same vertical scale from 0 to 0.3, relative frequency against seconds. Left, with 5-second bins: five orange bars of heights 0.164, 0.255, 0.273, 0.218 and 0.091. Right, with 1-second bins: 23 thin cyan bars, none taller than 0.073.
On the left, five fat bars reach above a quarter. On the right, twenty-three thin bars barely clear seven hundredths. The total of the bar heights is 1 in both pictures, but on the right it is spread over almost five times as many bars.
\[ \text{5-second bins: } 9 + 14 + 15 + 12 + 5 = 55 \quad \text{smiles} \]
For a discrete variable this problem never arose, because the values were fixed in advance: 0, 1, 2, 3 days, and you could not split them further. A measured variable has no smallest bin. Keep narrowing and each bar heads to zero height, so bar height cannot be the thing that carries probability.
The fix, on the next slide, is to stop reading heights and start reading areas. An area can stay the same size while its bar gets thinner, as long as the bar gets proportionally taller.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.2, p. 295 — Table 5.1
Concept
Take each bar's relative frequency and divide it by the width of the bin. The new height is called a density, and the bar's area, width times height, gives you back the relative frequency.
\[ \text{height} = \frac{\text{relative frequency}}{\text{bin width}} = \frac{15/55}{5} \approx 0.0545 \]
\[ \text{area} = 5 \times 0.0545 \approx 0.273 = \frac{15}{55} \]
Figure (svg): A histogram of the 55 smile times with 5-second bins, drawn so that each bar's height is its relative frequency divided by 5: heights 0.033, 0.051, 0.055, 0.044 and 0.018. A yellow horizontal line at height 0.043 runs from 0 to 23 seconds, the uniform model. The bar from 10 to 15 is labelled: area 5 × 0.0545 = 0.273, which is 15 of 55.
Now the heights no longer collapse when you narrow the bins. Computed in node, the 1-second density bars top out at about 0.073, not far from the 5-second tallest bar of 0.055; the heights settle down instead of vanishing. What each bar tells you is carried by its area: the fraction of smiles in that stretch of time.
The yellow line is where Chapter 5 is heading. The book will model these smiles with a flat curve at one twenty-third from 0 to 23 seconds. Its total area is 23 times one twenty-third, which is 1, and the area above any stretch of seconds is the model's probability of a smile that long. The data and the model are not identical, 9 of 55 smiles fall under 5 seconds where the flat model says about 0.22, but the shape is the same idea: probability is area.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.2, p. 295 — Example 5.2, U(0, 23)
Intuition
Suppose, for a moment, that each exact value of a continuous variable did carry some small positive probability, say one thousandth. Watch what happens.
\[ P(15) = P(15.1) = P(15.01) = \cdots = 0.001 \]
There are infinitely many exact values between 0 and 20. Pick just a thousand of them, such as 15, 15.001, 15.002 and so on. They are mutually exclusive, so their probabilities add.
\[ 1000 \times 0.001 = 1 \]
A thousand values already use up all of the probability there is, and there are infinitely many more still waiting. Make the tiny probability smaller, a millionth, and a million values use it up instead. Whatever positive number you choose, enough values overrun the total of 1.
The only probability that every exact value can share without overrunning is zero. That is the conclusion Part 3 draws from the picture, but you can already see that it is forced: it is not a rounding convenience, it is the only possibility.
So a continuous variable cannot have a table of values and probabilities like Chapter 4. It needs something that hands out probability to intervals instead, and that something is a density curve.
Section
Part 2
Concept
The graph of a continuous probability distribution is a curve, and the curve is called the probability density function, or pdf. The book writes it f(x). The function is built for one purpose: the area between it and the horizontal axis is a probability.
Figure (svg): A smooth right-skewed curve f(x) starting at 0, peaking near x = 2 and tailing off to the right. The region under the curve between two marked values c and d on the x-axis is shaded blue. A label with an arrow says the shaded area is P(c < x < d); another says the total area under the curve is 1.
Why a curve rather than a table? Part 1 showed that no list of values could hold a measured variable, and that the smile histogram, redrawn as a density, carried its information in areas. A density curve is that histogram with the bins shrunk to nothing: the bars disappear, but the area under the outline keeps meaning the same thing.
Read the picture from the bottom up. The horizontal axis holds the values of X. The curve says where values are dense, more likely per unit of x, and where they are sparse. The shaded region over the interval from c to d is the probability that X lands in that interval.
\[ P(c < x < d) = \text{area under } f(x) \text{ between } c \text{ and } d \]
Since the largest probability is one, the largest area is one: the whole region under the curve and above the axis has area exactly 1. The book puts it in capitals, and you should too.
\[ \text{for continuous distributions: } \quad \text{PROBABILITY} = \text{AREA} \]
probability density function (pdf) — A function f(x), never negative, whose graph encloses total area 1 with the horizontal axis, such that the area above any interval is the probability that X falls in that interval.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 292 — PROBABILITY = AREA
Notation
One line of notation carries the whole section. Decode it piece by piece before you use it.
Annotate
On: \( P(c < x < d) = \text{area under } f(x) \text{ from } c \text{ to } d \)
Say the whole line aloud: the probability that X falls between c and d is the area under the density curve between c and d. Every probability in this chapter, uniform, exponential or normal, is an instance of that one sentence.
The letters c and d are placeholders, not special numbers. In Example 5.1 they will be 0 and 2, then 4 and 15, then 2.3 and 12.7. Whatever they are, the left one is where the shading starts and the right one is where it stops, and the probability grows as they move apart.
Notice what is missing. There is no P(x) standing on its own, the way Chapter 4 had P(2) equal to fifteen hundredths. For a continuous variable, a probability always belongs to an interval. The next Part explains why a lone value gets nothing.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 292 — P(c < x < d) is the area under the curve, to the right of c and the left of d
Intuition
The book lists the properties of every continuous distribution. They look like five separate facts, but each is a consequence of the single rule that probability equals area.
| property | in symbols | why it follows from area |
|---|---|---|
| outcomes are measured, not counted | X takes values in an interval | an interval has no gaps, so no listing |
| total area is one | area under f(x) = 1 | the total probability is one |
| probability belongs to intervals | P(c < x < d) | only a region with width has area |
| a single value has probability zero | P(x = c) = 0 | a vertical line has no width |
| endpoints do not matter | P(c < x < d) = P(c ≤ x ≤ d) | adding two lines adds no area |
Read the table from the top. The first row is about the variable, and the second is the rule that turns a curve into a density. The last three rows are all consequences of those two, and they are the ones that behave differently from Chapter 4: in a discrete table, single values carried probability and endpoints mattered.
Learn the right-hand column, not the middle one. If you remember why each property holds, you can rebuild the whole list from the one word area, and you will not be caught by a question phrased in a way you have not seen.
One more property is implicit in the book's Formula Review: the density is never negative. A negative height would enclose negative area, and a negative probability is impossible.
\[ f(x) \ge 0 \quad \text{for every } x \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 292 — the bulleted properties; Formula Review p. 316
Picture it
This chapter and the next study three continuous distributions. The book introduces them with one picture each, and each picture shades an interval to show a probability. They are redrawn here from the book's figures.
Figure (svg): Three density curves side by side, each with one interval shaded. Left: a flat uniform density of height 1/7 from 2 to 9, shaded from 3 to 6, area about 0.429. Middle: an exponential curve falling from 0.25 at x = 0, shaded from 2 to 4, area about 0.239. Right: the standard normal bell centred at 0, shaded from 1 to 2, area about 0.136.
The uniform density is flat: every stretch of the same length gets the same area. The exponential density starts high and decays, so short waiting times are more likely than long ones. The normal density is the symmetric bell of Chapter 6. Different shapes model different situations; the book's phrase is that the distribution is chosen to fit the situation in the best way.
The areas in the three labels were computed in node from parameters read off the book's pictures: uniform from 2 to 9, exponential with decay rate one quarter, and the standard normal. The book prints the pictures without numbers. For the uniform, the area is plain geometry.
\[ P(3 < x < 6) = (6 - 3)\left(\tfrac{1}{7}\right) = \tfrac{3}{7} \approx 0.429 \]
The other two areas need formulas or technology, which Section 5.3 and Chapter 6 supply. The idea behind them is the same shaded region.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 292 — Figures 5.2, 5.3 and 5.4
Matching
Practice 1 to 5 show five graphs. Match each description to the distribution it shows, or to the probability its shaded area represents.
Match the pairs
Why: A flat density is uniform, a decaying one is exponential, and a symmetric bell is normal. A shaded region between two values represents the probability that X falls between them, whatever the shape of the curve.
For the two shaded graphs, notice that the shape of the curve did not matter at all to the answer. The probability named by a shaded region is read off the two edges of the shading, and the curve only decides how big the area is.
Recognising the three shapes by sight matters more than it seems. In the next sections you will be told a situation in words, the length of a smile, the time until the next earthquake, the height of an adult, and the first move is always to picture which of these curves fits. The picture then decides which tool finds the area.
The book's answers for the odd ones are uniform, normal, and P(6 < x < 7). If you matched the shaded flat graph to the uniform distribution instead, you answered a different question: it is uniform, but the question asked what the shaded area represents.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, pp. 316-317 — Practice 1-5; answers p. 329
Worked example
Consider the function f(x) equal to one twentieth for x from 0 to 20. Its graph is a horizontal line segment. Check that it is a legitimate density by finding the total area under it.
\[ f(x) = \frac{1}{20}, \quad 0 \le x \le 20 \]
Draw the graph
Why: a horizontal line at height one twentieth, cut off at 0 and at 20, so the region under it is a rectangle.
\[ \text{base} = 20 - 0 = 20, \quad \text{height} = \frac{1}{20} \]
Figure (svg): The graph of f(x) = 1/20 for x from 0 to 20: a horizontal segment at height 1/20 with vertical edges at 0 and 20, the whole rectangle under it shaded blue. A label inside reads area = 20 × 1/20 = 1.
Area of a rectangle
Why: base times height, the book's reminder.
\[ \text{AREA} = (\text{base})(\text{height}) \]
Substitute
Why: the whole interval is the base.
\[ \text{AREA} = 20\left(\frac{1}{20}\right) \]
Multiply
Why: twenty twentieths.
\[ \text{AREA} = 1 \]
This is why the height is one twentieth and not some other number: the base is 20, and only a height of one twentieth makes the rectangle's area exactly 1. Change the interval and the height has to change with it. You will use that fact again and again in Section 5.2.
Check the other property too
Why: the height is positive everywhere on the interval, so no area is negative, and the total is exactly one: both conditions for a density hold.
\[ f(x) = \tfrac{1}{20} > 0 \quad \text{and} \quad 20 \times \tfrac{1}{20} = 1 \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 293 — Example 5.1, Figure 5.5
Worked example
With the same density, find the area between f(x) and the x-axis for x between 0 and 2, and say what probability it is.
Shade the region first
Why: a strip from 0 to 2 under the line at one twentieth; drawing it is not optional, it is how you see the base.
\[ P(0 < x < 2) \]
Figure (svg): The same rectangle with only the strip from x = 0 to x = 2 shaded. A yellow arrow points to the strip from a label reading area = 2 × 1/20 = 0.1.
Find the base
Why: right end minus left end.
\[ \text{base} = 2 - 0 = 2 \]
Multiply by the height
Why: the density is one twentieth everywhere on the interval.
\[ \text{AREA} = (2)\left(\frac{1}{20}\right) \]
Simplify
Why: two twentieths.
\[ \text{AREA} = \frac{2}{20} = 0.1 \]
The area is a probability, so the probability that x is between zero and two is one tenth. In words: over many repetitions, about one value in ten would fall in the first two units of the interval.
The book also writes this as the probability that x is less than 2, with no lower end. That is the same event here, because x cannot be below 0: the density is zero there, so there is no area to add.
\[ P(0 < x < 2) = P(x < 2) = 0.1 \]
Check against the share of the base
Why: for a flat density the probability is the interval's share of the whole range: 2 out of 20 is one tenth.
\[ \frac{2}{20} = 0.1 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 293 — Example 5.1, Figure 5.6
Worked example
Same density. Find the area between f(x) and the axis for x between 4 and 15.
Shade from 4 to 15
Why: the region is again a rectangle, now in the middle of the interval.
\[ P(4 < x < 15) \]
Figure (svg): The same rectangle with the region from x = 4 to x = 15 shaded. Inside it a label reads area = 11 × 1/20 = 0.55.
Base
Why: right end minus left end; the most common slip is to use 15 alone.
\[ \text{base} = 15 - 4 = 11 \]
Area
Why: base times the height of one twentieth.
\[ \text{AREA} = (11)\left(\frac{1}{20}\right) = \frac{11}{20} \]
As a decimal
Why: eleven twentieths.
\[ P(4 < x < 15) = 0.55 \]
In context: just over half of the probability sits between 4 and 15. The picture agrees, since the shaded part covers a little more than half of the rectangle, and that glance is worth making every time before you trust the arithmetic.
Notice how little the calculation depends on where the interval is. Any stretch 11 units long, from 0 to 11 or from 9 to 20, would have the same probability, because the density is flat. That is the defining feature of the uniform distribution in the next section.
Check with the complement
Why: the unshaded parts, 0 to 4 and 15 to 20, have bases 4 and 5; their areas plus the shaded area must make the whole rectangle.
\[ \tfrac{4}{20} + \tfrac{11}{20} + \tfrac{5}{20} = \tfrac{20}{20} = 1 \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, pp. 293-294 — Example 5.1, Figure 5.7
Worked example
The book asks you to shade the region between x equal to 2.3 and x equal to 12.7 under f(x) equal to one twentieth, and then compute its area.
Shade and label
Why: decimal endpoints are drawn exactly like whole-number ones.
\[ P(2.3 < x < 12.7) \]
Figure (svg): The rectangle of f(x) = 1/20 on 0 to 20 with the region from x = 2.3 to x = 12.7 shaded. Inside it a label reads area = 10.4 × 1/20 = 0.52.
Base
Why: subtract the endpoints.
\[ 12.7 - 2.3 = 10.4 \]
Area
Why: base times height.
\[ P(2.3 < x < 12.7) = (10.4)\left(\frac{1}{20}\right) \]
Divide
Why: 10.4 over 20.
\[ P(2.3 < x < 12.7) = 0.52 \]
The book introduces this example with Figure 5.9, an unlabelled rectangle, and the instruction to label the graph with f(x) and x and to scale both axes with their maximum values. That is not busywork. The height on the vertical axis and the ends of the range on the horizontal one are the two numbers every area calculation uses.
In context: a value drawn from this density lands between 2.3 and 12.7 a little more than half the time. The book prints the same formula with the words base and height written in, and you should keep writing them in until the pattern is automatic, because it is the pattern and not the numbers that transfers to the next section.
Check the share of the range
Why: 10.4 out of 20 units of base is 52 percent of the rectangle.
\[ \frac{10.4}{20} = 0.52 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, pp. 294-295 — Figures 5.9 and 5.10
Fill the middle
Practice 11: a continuous density is equal to one twelfth, restricted to x from 0 to 12. What is the probability that x lies between 0 and 12? Fill in the blanks.
Fill in the blanks
P(0 < x < 12) = (12)\left(\frac1___\right) = ___
Why: The interval from 0 to 12 is the whole range, so the base is 12 and the area is 12 times one twelfth, which is 1. The variable is certain to land somewhere in its own range.
Notice that the height, one twelfth, was not chosen at random. It is the only height that makes a rectangle 12 wide enclose an area of 1. Width times height is 1 for every flat density, and this blank is that fact written out.
This is Example 5.1's total-area check in disguise. When the interval is the whole range of the variable, the probability must be 1, and the arithmetic only confirms it.
The book's answer is one. Keep the question in mind when you meet its opposite in Part 3: the probability of landing outside the range, or exactly on one value, is zero for exactly the same geometric reason, no region, no area.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 318 — Practice 11; answer p. 329
Worked example
Consider the function f(x) equal to one eighth for x from 0 to 8. Draw the graph of f(x) and find the probability that x is between 2.5 and 7.5.
Confirm it is a density
Why: the range is 8 wide and the height is one eighth, so the total area is one.
\[ 8\left(\frac{1}{8}\right) = 1 \]
Draw and shade
Why: a rectangle of height one eighth from 0 to 8, shaded between 2.5 and 7.5.
\[ P(2.5 < x < 7.5) \]
Figure (svg): The graph of f(x) = 1/8 for x from 0 to 8: a rectangle of height 1/8. The region from 2.5 to 7.5 is shaded, labelled 5 × 1/8 = 0.625. The right edge is labelled b = 8.
Base
Why: subtract the endpoints.
\[ 7.5 - 2.5 = 5 \]
Area
Why: base times height.
\[ P(2.5 < x < 7.5) = (5)\left(\frac{1}{8}\right) = \frac{5}{8} \]
As a decimal
Why: five eighths.
\[ P(2.5 < x < 7.5) = 0.625 \]
In context: five eighths of the time, the value lands in the shaded stretch. Notice that the height changed from Example 5.1, one eighth instead of one twentieth, because the range changed; the method did not change at all.
Check with the unshaded pieces
Why: 0 to 2.5 and 7.5 to 8 have bases 2.5 and 0.5, a total of 3; three eighths plus five eighths must be 1.
\[ \tfrac{3}{8} + \tfrac{5}{8} = 1 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 295 — Try It 5.1
Estimation
Practice 12 shows the density f(x) equal to one ninth on 0 to 9, with the strip from 6 to 8 shaded. Before any arithmetic, estimate the probability from the picture.
Predict first
Roughly what fraction of the rectangle does a strip from 6 to 8 cover?
Correct: about 0.2
Why: The strip is 2 units wide out of 9, a bit more than a fifth of the base. For a flat density the probability is the same fraction, two ninths, which is about 0.222.
For a flat density, estimating is just comparing widths. Two units out of nine is between a fifth and a quarter, and that alone rules out the answers near a tenth, a half and more.
\[ \frac{2}{9} \approx 0.222 \]
If you picked a tenth, you probably compared the strip with the whole axis up to 10 or 20 rather than with the range of the density, which stops at 9. Always compare with the base of the whole rectangle, since that is what has area 1.
Make this glance a habit. When the shape is not flat, as in the exponential and normal chapters, an estimate from the picture is the only quick check you have on a calculator answer, and it catches the most common error of all: shading or computing the wrong side of a boundary.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 318 — Practice 12, Figure 5.42
Worked example
Now compute the probability that x falls in the shaded strip from 6 to 8, under the density one ninth on 0 to 9.
Figure (svg): The graph of f(x) = 1/9 on 0 to 9 with integer ticks from 0 to 10, and the strip from 6 to 8 shaded.
Read the edges from the graph
Why: the shading starts at the tick for 6 and stops at the tick for 8.
\[ P(6 < x < 8) \]
Base
Why: subtract.
\[ 8 - 6 = 2 \]
Height
Why: read from the vertical axis; it has to be one ninth, since the range is 9 wide.
\[ f(x) = \frac{1}{9} \]
Area
Why: base times height.
\[ P(6 < x < 8) = (2)\left(\frac{1}{9}\right) = \frac{2}{9} \]
As a decimal
Why: two ninths, computed in node.
\[ P(6 < x < 8) \approx 0.2222 \]
The estimate on the last slide said about a fifth, and the exact answer is a little more, which is what two units out of nine should give. Keep the exact fraction two ninths if you can; the decimal repeats, and rounding it early is how small errors creep into later steps.
Check the height against the range
Why: the whole rectangle must have area 1, which confirms the height of one ninth you read off the axis.
\[ 9\left(\tfrac{1}{9}\right) = 1 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 318 — Practice 12
Worked example
Practice 14 shows the density one tenth on 0 to 10 with a shaded region. Find the probability that x falls in it. The book prints no answer for this even-numbered exercise; the edges below were read from its figure.
Figure (svg): The graph of f(x) = 1/10 on 0 to 10 with integer ticks, and the region from 2.5 to 5.5 shaded.
Read the edges carefully
Why: each edge sits halfway between two ticks, at 2.5 and 5.5, not on a tick.
\[ P(2.5 < x < 5.5) \]
Base
Why: subtract.
\[ 5.5 - 2.5 = 3 \]
Area
Why: base times the height of one tenth.
\[ P(2.5 < x < 5.5) = (3)\left(\frac{1}{10}\right) \]
Simplify
Why: three tenths.
\[ P(2.5 < x < 5.5) = 0.3 \]
The arithmetic is trivial; the reading is not. Students who take the edges as 2 and 5, or 3 and 6, still get 0.3, because the width happens to survive. But a student who reads 2 and 6 gets 0.4. Always read both edges and subtract, rather than counting the ticks inside the shading.
Check with the unshaded area
Why: the two unshaded pieces have bases 2.5 and 4.5, a total of 7, and seven tenths plus three tenths must be 1.
\[ 0.7 + 0.3 = 1 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 319 — Practice 14, Figure 5.44
Concept
In Chapter 4, the height of a stem was a probability, so no stem could be taller than 1. A density is different: its height can be larger than 1, and nothing goes wrong.
Figure (svg): Three rectangles on one set of axes, all starting at x = 0. A tall narrow yellow one of height 2 and width 0.5; a cyan square of height 1 and width 1; a long low orange one of height 0.25 and width 4. Each is labelled with its area: 0.5 × 2 = 1, 1 × 1 = 1, 4 × 0.25 = 1.
All three rectangles are legitimate densities. The long low one is 4 wide and a quarter tall; the square is 1 by 1; the tall one is only half a unit wide, so it must be 2 tall to enclose an area of 1.
\[ \text{area} = (0.5)(2) = 1 \]
So a density of 2 does not mean a probability of 2. It means probability is packed densely there: 2 units of probability per unit of x, over a stretch only half a unit long. The word density is meant literally, like people per square mile. A crowded city block can have a density of thousands per square mile without containing thousands of people.
What can never exceed 1 is an area under the density, because that is a probability. And what can never be negative is the height, because a negative height would make a negative area.
\[ f(x) \ge 0 \quad \text{but } f(x) \text{ may exceed } 1 \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 316 — Formula Review: f(x) is at least 0, and the total area is one
Trap
Asked for the probability that x equals 15 under Example 5.1's density, a common line:
\[ P(x = 15) = f(15) \]
\[ = \tfrac{1}{20} = 0.05 \]
Wrong. That is the height of the curve at 15, not an area.
It is tempting because in Chapter 4 the height of a stem was exactly the probability of that value, and the graph here looks like it has a height at 15.
For a continuous variable, a probability is an area, and a single value is a line with no width:
\[ P(x = 15) = (0)\left(\tfrac{1}{20}\right) \]
\[ = 0 \]
The height is used, but only as one factor of an area. Ask yourself where the base is. If there is no base, there is no probability.
A second give-away: under the tall density of the previous slide, the same wrong reading would give a probability of 2, which is impossible.
And a third: the wrong reading gives the same one twentieth for every value from 0 to 20, infinitely many values each with a positive probability, which Part 1 showed cannot add up to one.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 294 — Example 5.1, P(x = 15)
Tweak it
The slider sets the width b of a flat density that starts at 0. For the area to stay equal to 1, the height has to be one over b. Watch the rectangle change shape.
Parameter explorer
Move b. For which widths is the height of the density greater than 1, and does that ever make it an illegal density?
\[ \text{height} = 1 / \text{width}, \quad \text{width} = {b} \]
Every setting of the slider gives a rectangle of area exactly 1. Wide and low, or narrow and tall, the product of base and height never changes.
\[ b \times \frac{1}{b} = 1 \quad \text{for every } b > 0 \]
Below a width of 1 the rectangle pokes above height 1, and at a width of 0.4 it stands two and a half units tall. None of that breaks a rule, because the height is not a probability. This is the same reason Example 5.1's height was one twentieth and Try It 5.1's was one eighth: the width chose the height.
Now imagine pushing b toward zero. The rectangle becomes an infinitely tall needle of area 1. That limiting case is not a density at all, and it is one more way to see why a continuous variable cannot pile its probability on a single point.
Counterexample
A classmate claims that any flat line above the x-axis is a probability density function. Refute the claim with one example, and then repair it.
Discussion prompt
Give a flat function on an interval that is not a density, say which property it breaks, and change one number to make it a density.
One counterexample kills the claim. A flat line is a density only when its height and its width multiply to exactly 1, and that is the only condition to check for a flat shape, apart from the height being positive.
For a curved density there is one more thing to check: the curve must never dip below the axis anywhere on its range. A curve that did would enclose negative area over some stretch, and the total could still come out to 1 while one of its intervals had a negative probability. That is the same trap as the discrete table that summed to one with a negative entry.
The reverse mistake is also common: rejecting the tall rectangle of height 2 on 0 to one half because its height exceeds 1. That function is a density, and you now know the one check that settles it: area, not height.
Section
Part 3
Concept
The book states the property flatly: the probability that x takes any single individual value is zero. The argument is one sentence long, and it comes straight from the picture.
\[ P(x = c) = 0 \]
The region below the curve, above the axis, and between x equal to c and x equal to c is not a region at all. It is a vertical line. A line has no width, so it has no area, and since probability is area, the probability is zero.
Figure (svg): Two panels. Left: Nancy's discrete distribution from Section 4.1 as orange stems at 0, 1, 2, 3 with heights 0.01, 0.04, 0.15, 0.80; the stem at 2 is yellow and labelled 0.15. Right: a flat density of height 1/3 on 0 to 3, with a yellow vertical line at x = 2 labelled width 0, area 0.
Compare the two panels. On the left, Nancy's discrete variable has a genuine stem at 2 days, fifteen hundredths tall, and that height is the probability. On the right, the continuous density has height one third at 2, but the event x equals 2 is only the yellow line, and its area is zero whatever height it reaches.
This is the sharpest difference between Chapters 4 and 5. In Chapter 4 the probability of a single value was the main thing you computed. In Chapter 5 it is always zero, and every useful question is about an interval.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 292 — P(x = c) = 0: the area has no width, and therefore no area
Worked example
Under the density one twentieth on 0 to 20, find the probability that x equals exactly 15.
Draw the region
Why: on an x-y graph, x equal to 15 is a vertical line, not a strip.
\[ x = 15 \]
Figure (svg): The rectangle of f(x) = 1/20 on 0 to 20 with a single yellow vertical line segment at x = 15 from the axis up to the top edge. A label above reads x = 15: width 0, area 0.
Find the base
Why: a vertical line has no width.
\[ \text{base} = 15 - 15 = 0 \]
Find the height
Why: the density at 15, the same one twentieth as everywhere else.
\[ \text{height} = \frac{1}{20} \]
Multiply
Why: zero times anything is zero.
\[ P(x = 15) = (0)\left(\frac{1}{20}\right) = 0 \]
The height is not zero here; the density is one twentieth at 15, exactly as at every other point of the interval. The probability is zero because the base is zero, and that is true under any density at all, flat or curved.
This is exact, not a rounded approximation. It is not that the probability is very small and rounds to 0.000. The area of a line is zero in the same sense that the area of a rectangle 11 by one twentieth is 0.55.
Check with a thin strip around 15
Why: a strip from 14.9 to 15.1 contains the line; its probability is small but positive, and it shrinks to zero as the strip closes up, as the next two slides show.
\[ P(14.9 < x < 15.1) = (0.2)\left(\tfrac{1}{20}\right) = 0.01 \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 294 — Example 5.1, Figure 5.8
Prediction
Commit to an answer before reasoning it through. The variable is continuous on the interval from 0 to 20.
Predict first
For a continuous X on 0 to 20, what is the probability that X equals exactly 7.4?
Correct: 0
Why: A single value is a vertical line with no width, so it encloses no area whatever the density looks like. The option about the shape is tempting but wrong: a curved density changes the areas of intervals, not the area of a line.
Every wrong option here is a Chapter 4 habit. One twentieth is the height, read as if it were a stem. The decimal 0.074 is 7.4 divided by 100, a number with no meaning at all. And the shape answer forgets that the argument used only the width of the region.
\[ P(X = 7.4) = (0)(\text{any height}) = 0 \]
If you chose the shape answer, you were half right about something real. Under a curved density, the probability of a small interval around 7.4 does depend on the height there: a taller curve packs more probability into the same small width. But a single value has no width to multiply by, so the height never gets used.
Contrast the question the book asks elsewhere: the probability that X lies between 7.3 and 7.5. That region has a width of 0.2 and so a genuine probability, one hundredth under this flat density. A question about a continuous variable is only interesting once it names an interval.
Picture it
Here is the zero drawn as the end of a process. Each row shows the same flat density, one twentieth high, over the stretch from 12 to 18, with a shrinking interval around 15 shaded.
Figure (svg): Four strips, each the band of the density f(x) = 1/20 drawn from 12 to 18. In the first the part from 14 to 16 is shaded; in the second, the much thinner part from 14.9 to 15.1; in the third, a hairline from 14.99 to 15.01; in the fourth only a yellow line at exactly 15. Each row is labelled with its area: 0.1, 0.01, 0.001 and 0.
Each shaded width is one tenth of the one above, and because the height never changes, each area is one tenth of the one above: one tenth, one hundredth, one thousandth. The bottom row is the single value itself, and its width, and so its area, is zero.
\[ 0.1, \quad 0.01, \quad 0.001, \quad \ldots, \quad 0 \]
Two lessons come out of this picture. First, the probability of landing near 15 is never zero, however narrow the interval, as long as it has some width. Second, you do not need a limit to get the bottom row: it is the same base times height with a base of zero.
If your intuition resists the zero, trust the top three rows. They show that the probability of being near a value is always about the width times the density. The density measures how crowded the values are; only a width turns that crowding into probability.
Worked example
Under the density one twentieth on 0 to 20, compute the probability of intervals of width 2, 0.2 and 0.02 centred on 15, then of the single value 15. Use the pattern to explain the zero.
Width 2: from 14 to 16
Why: base times height.
\[ P(14 < x < 16) = (2)\left(\tfrac{1}{20}\right) = 0.1 \]
Width 0.2: from 14.9 to 15.1
Why: the base is a tenth as wide.
\[ P(14.9 < x < 15.1) = (0.2)\left(\tfrac{1}{20}\right) = 0.01 \]
Width 0.02: from 14.99 to 15.01
Why: a tenth again.
\[ P(14.99 < x < 15.01) = (0.02)\left(\tfrac{1}{20}\right) = 0.001 \]
Width 0: the single value 15
Why: the same formula with a base of zero.
\[ P(x = 15) = (0)\left(\tfrac{1}{20}\right) = 0 \]
| interval around 15 | width | probability |
|---|---|---|
| 14 to 16 | 2 | 0.1 |
| 14.9 to 15.1 | 0.2 | 0.01 |
| 14.99 to 15.01 | 0.02 | 0.001 |
| exactly 15 | 0 | 0 |
Read down the table: the probability is the width divided by 20, every time. So the probability is proportional to the width, and a width of zero gives a probability of zero with no special pleading.
The pattern is reassuring, but it is not the proof. The proof is the one-line argument from Example 5.1: a line has no width. The table only shows that the zero sits at the natural end of a sequence you can compute.
Check the proportionality
Why: each probability divided by its width should give the density, one twentieth, in every row.
\[ \frac{0.1}{2} = \frac{0.01}{0.2} = \frac{0.001}{0.02} = 0.05 = \frac{1}{20} \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, pp. 293-294 — Example 5.1
Trap
A common conclusion from the last few slides:
\[ P(x = 15) = 0 \]
so the value 15 can never occur.
Wrong. Every value in the interval has probability zero, yet the experiment always produces some value.
It is tempting because, for a discrete variable, probability zero really does mean the value never happens.
Some value always occurs, and whichever one it is had probability zero beforehand:
\[ P(0 \le x \le 20) = 1 \]
\[ P(x = c) = 0 \text{ for each } c \]
There is no contradiction. The total of 1 belongs to the interval, which has width; it is not built by adding up single values, of which there are too many to add.
For a continuous variable, read a zero as no width, not as impossible. An impossible value is one outside the range, like 25 here.
A dart thrown at a board lands on some exact point, and that point had probability zero. Landing somewhere was certain all along.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 292 — P(x = c) = 0
Discrimination
All of these questions are about a continuous X with the density one twentieth on 0 to 20. Sort each one by its answer. Ask one question of each: does the region have width, and does it lie inside the range?
Sort into buckets
Sort each probability for X on 0 to 20.
The endpoints 0 and 20 feel special, since they are the edges of the rectangle, but the argument is unchanged. A line at the edge has no width, just like a line in the middle.
The less-than and greater-than items are regions that run to the edge of the range. Less than 12 is the region from 0 to 12, twelve units wide; greater than 12 runs from 12 to 20. Even without numbers on the ends, a region like that has width, so it goes in the positive group.
The tiny interval from 19.99 to 20 is worth a second look. Its probability, one hundredth times one twentieth, is only five ten-thousandths, but it is not zero. Width, however small, is what matters.
Worked example
Practice 6 to 10 are five short questions about continuous variables. Each answer is 0 or 1, and each is decided by one fact about area.
Practice 6: the range is 0 to 15; find P(x > 15)
Why: there is no density to the right of 15, so no area.
\[ P(x > 15) = 0 \]
Practice 7: the total area under a density
Why: the defining property: the whole area is the total probability.
\[ \text{area under } f(x) = 1 \]
Practice 8: the range is 0 to 10; find P(x = 7)
Why: a single value, a line with no width.
\[ P(x = 7) = 0 \]
Practice 9: the range is 0 to 7; find P(x = 10)
Why: outside the range and a single value, so zero twice over.
\[ P(x = 10) = 0 \]
Practice 10: f(x) is one fifth on 0 to 5; find P(x < 0)
Why: nothing lies below 0, so no area.
\[ P(x < 0) = 0 \]
Notice there are two different reasons for a zero in this set. A single value gets zero because its region has no width. A region outside the range gets zero because the density is zero there, so the region has no height. Both give no area, which is all the probability sees.
These are the questions most often lost in a hurry, because students reach for base times height and invent a base. Before you multiply, check that the region has a width and sits inside the range.
Check against the book's answers
Why: the odd-numbered answers are printed as one for Practice 7 and zero for Practice 9, matching the lines above.
\[ \text{7: one} \qquad \text{9: zero} \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 318 — Practice 6-10; answers p. 329
Real world
Real measurements are always recorded to some number of decimal places. Suppose X has the density one twentieth on 0 to 20, and a meter displays one decimal place.
Figure (svg): A close-up of the density f(x) = 1/20 between x = 14.8 and x = 15.2. The narrow band from 14.95 to 15.05 is shaded, labelled readings that display as 15.0, with area 0.1 × 1/20 = 0.005.
Discussion prompt
The meter displays 15.0. What values of X would produce that display, and what is the probability of seeing 15.0 on the meter? Why is this not zero, when the probability of X equal to 15 is zero?
This is how probability zero lives alongside everyday experience. You see 15.0 on meters all the time, because a recorded value is always a small interval of true values. What never happens, in the sense of probability zero, is that the true value is exactly 15 to infinitely many decimal places.
It also answers Homework 73 from Part 1 in a new way. Rounding age to the nearest year does not make age discrete; it turns each recorded age into an interval one year wide, with a positive probability.
Section
Part 4
Concept
The last property on the book's list follows in two lines from the one before it. Split the closed interval into its two endpoints and the open interval between them.
\[ P(c \le x \le d) = P(x = c) + P(c < x < d) + P(x = d) \]
The three pieces are mutually exclusive, since x cannot be both an endpoint and strictly inside, so their probabilities add. Now use Part 3: each endpoint is a single value, and each has probability zero.
\[ P(c \le x \le d) = 0 + P(c < x < d) + 0 = P(c < x < d) \]
Figure (svg): Two copies of the rectangle f(x) = 1/20 on 0 to 20 with the region from 4 to 15 shaded and labelled 0.55. On the left the corners at 4 and 15 carry hollow yellow circles, for 4 < x < 15; on the right they carry filled yellow dots, for 4 ≤ x ≤ 15.
In the picture, the hollow circles mean the endpoints are left out, and the filled dots mean they are put in. Either way the shaded region is the same rectangle, because the two edges are lines, and adding a line to a region adds no area.
So for a continuous variable, less than and less than or equal to are interchangeable, and so are greater than and greater than or equal to. You still write the inequality the problem gives you; you just do not have to worry about which kind it is when you compute.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 292 — P(c < x < d) is the same as P(c ≤ x ≤ d)
Worked example
Under the density one twentieth on 0 to 20, compute the probability of each of the four intervals with ends 4 and 15: both ends open, both closed, and each mixed.
Both ends open
Why: the region from Example 5.1.
\[ P(4 < x < 15) = (11)\left(\tfrac{1}{20}\right) = 0.55 \]
Both ends closed
Why: add the two endpoint lines, each of area zero.
\[ P(4 \le x \le 15) = 0 + 0.55 + 0 = 0.55 \]
Left closed, right open
Why: one line added.
\[ P(4 \le x < 15) = 0 + 0.55 = 0.55 \]
Left open, right closed
Why: the other line added.
\[ P(4 < x \le 15) = 0.55 + 0 = 0.55 \]
Four ways of writing the event, one number. The only thing that changes the probability is the width of the interval, 11 units here, and every version has that width.
Compare what this would have cost in Chapter 4. For a count, each of those four versions could give a different answer, because each endpoint could carry its own stem. Here, reading the inequality carefully still matters for knowing which region to shade, but not for deciding whether an endpoint is in.
Check with the complement of the closed interval
Why: outside 4 to 15 inclusive means below 4 or above 15, widths 4 and 5, and that must leave 0.55 for the closed interval.
\[ 1 - \left(\tfrac{4}{20} + \tfrac{5}{20}\right) = 1 - 0.45 = 0.55 \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, pp. 292-294 — the endpoint property and Example 5.1
Comparison
Put the two chapters side by side. Nancy's days are discrete, with probabilities 0.01, 0.04, 0.15 and 0.80; Example 5.1's X is continuous on 0 to 20 with density one twentieth. Fill in the blanks.
Comparison matrix
| question | Nancy's days (discrete) | Example 5.1's X (continuous) |
|---|---|---|
| P(X = 2) | 0.15 | 0 |
| P(X < 2) | 0.05 | 0.1 |
| P(X ≤ 2) | 0.20 | 0.1 |
| does including the endpoint change the answer? | yes, by one stem | no |
Read the table across. For Nancy, fewer than 2 and at most 2 differ by fifteen hundredths, the stem at 2. For the continuous X they agree at one tenth, because the value 2 carries nothing.
The less-than row for the continuous X is one tenth because the region from 0 to 2 is 2 units wide, and 2 times one twentieth is one tenth. It is the same number as Example 5.1's first probability, which is no accident: the event is the same region.
The single-value row is the root of every other difference. Wherever a single value has positive probability, the endpoint matters; wherever a single value has probability zero, it does not. That is why the endpoint rule of this section is not a new rule at all, only a consequence of Part 3.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §4.1, p. 230 — Nancy's table
Trap
Having learned that endpoints do not matter, a student computes, for Nancy's days:
\[ P(X < 2) = P(X \le 2) \]
\[ = 0.01 + 0.04 + 0.15 = 0.20 \]
Wrong. Nancy's X is discrete, and the value 2 carries fifteen hundredths.
It is tempting because the rule from this section is so clean, and it is easy to forget that it depends on the variable being continuous.
For a discrete variable, test the boundary exactly as in Chapter 4:
\[ P(X < 2) = 0.01 + 0.04 \]
\[ = 0.05 \]
The endpoint rule is not a rule about inequalities. It is a rule about continuous variables, because only there does a single value have probability zero.
So the first question on every problem is still the one from Part 1: counted or measured?
The answer is also a quarter of the wrong one. Being careless about the variable type costs a factor of four here.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §4.1, p. 230 — Nancy's table
Error analysis
Asked for the probability that x is at most 15 under the density one twentieth on 0 to 20, someone wrote the line below. Find the flaw before reading the notes.
Annotate
On: \( P(x \le 15) = \tfrac{15}{20} + \tfrac{1}{20} = \tfrac{16}{20} = 0.8 \)
This is the discrete habit in disguise. In Chapter 4, at most 15 would indeed mean adding the stem at 15. Here the extra one twentieth is a height, not an area, and it treats a single value as if it had a width of 1.
\[ P(x \le 15) = P(x < 15) = (15)\left(\tfrac{1}{20}\right) = 0.75 \]
Look at what the extra term assumes. Adding one twentieth is the area of a strip one unit wide, from 15 to 16, so the work quietly moved the right edge of the region from 15 to 16. The picture would have shown it at once: the shading would stop at the wrong tick.
A quick detector: the at most and the less than answers must be equal for a continuous variable. If your two answers differ, a single value has sneaked in with a positive probability, and that is always the error.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 294 — P(X ≤ x) can also be written as P(X < x) for continuous distributions
Section
Part 5
Concept
The density draws the distribution; a second function reads areas off it. The cumulative distribution function, or CDF, gives the probability that X is at most a given value x. For a continuous variable, at most and less than are the same thing, so the book writes it either way.
\[ \text{CDF: } \quad P(X \le x) = P(X < x) = \text{area to the left of } x \]
Figure (svg): Two panels. Left: the density f(x) = 1/20 on 0 to 20 with everything to the left of 12 shaded, labelled area 0.6. Right: the graph of the area to the left of x as x runs from 0 to 20, a straight orange line from (0, 0) to (20, 1), with the point (12, 0.6) marked and dashed guides to both axes.
On the left, shade everything under the density to the left of 12; the area is 12 times one twentieth, which is 0.6. On the right, that 0.6 becomes one point on a graph. Move the edge of the shading along the axis and record the area each time, and the whole graph appears: for this flat density it is a straight ramp from 0 at x equal to 0 up to 1 at x equal to 20.
\[ P(X < x) = \frac{x}{20}, \quad 0 \le x \le 20 \]
Two features hold for every CDF, not just this one. It never decreases, because moving right can only add area. And it runs from 0 at the far left to 1 at the far right, because it starts with no area and ends with all of it.
cumulative distribution function (CDF) — The function that gives, for each value x, the probability that X is at most x: the area under the density to the left of x.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 294 — the cumulative distribution function, Figure 5.9
Notation
The CDF only ever gives area to the left. For area to the right, the book gives one formula, and you should be able to read every symbol in it.
Annotate
On: \( P(X > x) = 1 - P(X < x) \)
That last note is where Part 3 pays off. For a discrete variable, the value x itself sits between left and right and has to be accounted for. For a continuous variable, left and right meet along a line of zero area, so they add to exactly 1.
\[ P(X < x) + P(X > x) = 1 \]
Be careful with the order inside the subtraction. It is one minus the left area, never the left area minus one, which would be negative. And the one is not a number from the problem; it is the total area, which is always one.
You will use this formula in every chapter from here to the end of the course, because every table and calculator command gives left areas. Right tails are always one subtraction away.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 294 — P(X > x) = 1 − P(X < x)
Worked example
Under Example 5.1's density, the CDF at 12 is 0.60. Find the probability that X is greater than 12, and say what it means.
Write the CDF value
Why: area to the left of 12; for this flat density you can confirm it directly.
\[ P(X < 12) = (12)\left(\tfrac{1}{20}\right) = 0.60 \]
Use the complement
Why: left and right share out the whole area of 1.
\[ P(X > 12) = 1 - P(X < 12) \]
Subtract
Why: one minus sixty hundredths.
\[ P(X > 12) = 1 - 0.60 = 0.40 \]
Figure (svg): The density f(x) = 1/20 on 0 to 20. The region from 0 to 12 is shaded lightly in blue and labelled P(X < 12) = 0.60; the region from 12 to 20 is shaded orange and labelled P(X > 12) = 1 − 0.60 = 0.40.
In context: forty percent of the time X lands above 12. The formula did not need the right-hand region's own base, which is the point: when the tool you have only reports left areas, the complement turns it into a right area in one step.
And because the variable is continuous, the answer to at least 12 is the same 0.40. The line at 12 belongs to neither side in any way that matters.
Check with the right-hand rectangle itself
Why: the region from 12 to 20 has base 8 and height one twentieth.
\[ (20 - 12)\left(\tfrac{1}{20}\right) = \tfrac{8}{20} = 0.40 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 294 — P(X > x) = 1 − P(X < x)
Worked example
The areas to the left of 18 and of 6 are 0.90 and 0.30. Find the probability that X is between 6 and 18, using only those two numbers.
Name the two CDF values
Why: each is an area to the left.
\[ P(X < 18) = 0.90, \quad P(X < 6) = 0.30 \]
Write the middle as a difference
Why: the area left of 18 contains the area left of 6; removing it leaves the region between them.
\[ P(6 < X < 18) = P(X < 18) - P(X < 6) \]
Subtract
Why: ninety hundredths minus thirty hundredths.
\[ P(6 < X < 18) = 0.90 - 0.30 = 0.60 \]
Figure (svg): Three copies of the band from 0 to 20. In the first, 0 to 18 is shaded blue, labelled 0.90. In the second, 0 to 6 is shaded purple, labelled 0.30. In the third, 6 to 18 is shaded green, labelled 0.90 − 0.30 = 0.60.
In context: X lands between 6 and 18 sixty percent of the time. This is the second of the two moves that every left-area tool forces on you. Right tails need one minus the CDF; middle regions need the CDF at the right end minus the CDF at the left end.
The two numbers here came from Example 5.1's density, but the method never looked at the density. It works under any curve, uniform, exponential or normal, as long as you have the two left areas. That is exactly how you will use normal tables in Chapter 6.
Check with the rectangle directly
Why: under the flat density the region from 6 to 18 has base 12.
\[ (18 - 6)\left(\tfrac{1}{20}\right) = \tfrac{12}{20} = 0.60 \quad \checkmark \]
Worked example
Practice 13 shows the density one eighth on 0 to 8 with everything from 0 to 5 shaded. Find the probability that x falls in the shaded area, then the probability that it does not.
Figure (svg): The graph of f(x) = 1/8 on 0 to 8 with the region from 0 to 5 shaded blue and labelled 0.625, and the unshaded region from 5 to 8 labelled 0.375.
Name the region
Why: the shading starts at the left end of the range, so it is a CDF value.
\[ P(x < 5) \]
Base and height
Why: from 0 to 5, under the height one eighth.
\[ P(x < 5) = (5)\left(\tfrac{1}{8}\right) \]
Simplify
Why: five eighths.
\[ P(x < 5) = 0.625 \]
Area to the right by the complement
Why: one minus the left area.
\[ P(x > 5) = 1 - 0.625 = 0.375 \]
The book's answer to Practice 13 is 0.625. The same five eighths appeared in Try It 5.1, for a different region: 2.5 to 7.5 there, 0 to 5 here. Any two stretches of equal width have equal probability under a flat density, which is worth noticing now because it stops being true under a curved one.
Check the right area directly
Why: from 5 to 8 the base is 3.
\[ (8 - 5)\left(\tfrac{1}{8}\right) = \tfrac{3}{8} = 0.375 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 318 — Practice 13, Figure 5.43; answer p. 329
Worked example
Practice 15: f(x) is one third, restricted to x from 1 to 4. Describe the probability that x is greater than three halves, and compute it.
Confirm the height
Why: the range is 4 minus 1, which is 3 wide, so the height must be one third.
\[ (4 - 1)\left(\tfrac{1}{3}\right) = 1 \]
Describe the region
Why: the book's answer: the area from three halves to 4, above the axis and under the height one third.
\[ P\left(x > \tfrac{3}{2}\right) = \text{area from } 1.5 \text{ to } 4 \]
Figure (svg): The graph of f(x) = 1/3 on 1 to 4. The thin strip from 1 to 1.5 is shaded red and labelled 0.167; the region from 1.5 to 4 is shaded blue and labelled 2.5 × 1/3 ≈ 0.833.
Direct route: base
Why: right end minus left end.
\[ 4 - 1.5 = 2.5 \]
Area
Why: base times height, computed in node.
\[ P(x > 1.5) = (2.5)\left(\tfrac{1}{3}\right) = \tfrac{5}{6} \approx 0.8333 \]
The trap here is the left end of the range. Taking the complement as one minus 1.5 over 3 is right; taking it as one minus 1.5 times one third, as if the density started at 0, gives one half, which is wrong. The area to the left of 1.5 is only the thin red strip from 1 to 1.5.
Check by the complement
Why: the red strip from 1 to 1.5 has base one half.
\[ 1 - (0.5)\left(\tfrac{1}{3}\right) = 1 - \tfrac{1}{6} = \tfrac{5}{6} \quad \checkmark \]
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 319 — Practice 15; answer p. 329
Matching
Under Example 5.1's density, the CDF gives the area to the left of any value. Match each region to the expression that finds it with left areas only.
Match the pairs
Why: A left area is the CDF itself; a right area is one minus it; a middle area is the difference of two left areas. A single value is a line and has no area, and the area left of the top of the range is all of it.
Two answers here are 0.60 and they are not the same question. The left area at 12 and the middle area from 6 to 18 happen to be equal because both regions are 12 units wide under a flat density. Match by the shape of the region, never by the number.
The last pair is a free check you can run on any CDF. At the top of the range the left area has swallowed the whole density, so it must be exactly one; at the bottom it must be exactly zero. If a table or a formula gives anything else there, something is wrong.
If you can match these five, you can handle every area question in the next two chapters: the density changes, the five shapes of question do not.
Ranking
All five probabilities are about X with the density one twentieth on 0 to 20. Put them in order from smallest to largest. Sketch the region for each in your head; the widths decide the order.
Put in order
Order from smallest probability to largest.
Why: The widths are 0, 3, 6, 10 and 19, so the probabilities are 0, 0.15, 0.30, 0.50 and 0.95. The single value has no width at all, and the at-most-19 region covers almost the whole rectangle.
For a flat density the ranking is purely a ranking of widths: 0, 3, 6, 10 and 19 units out of 20. The one people misplace is the right tail above 14, which looks small because 14 is a big number; its width is 20 minus 14, which is 6.
\[ 0 < 0.15 < 0.30 < 0.50 < 0.95 \]
Under a curved density the widths would no longer decide the order by themselves; a narrow interval under a tall part of the curve can beat a wide one under a low tail. The estimation habit from Part 2, comparing areas by eye, is what carries over.
Section
Part 6
Concept
Everything so far has been rectangles, because the density was flat. The book is explicit that areas are found in four ways, and which one you use depends on the shape of the curve.
Figure (svg): Four tiles. Geometry: a triangular density with the left half shaded, labelled one half times base times height. Formulas: a falling exponential curve with the area from 0 to 3 shaded, labelled a formula gives this area. Technology: a normal bell with everything left of 1 shaded, labelled a calculator key. Tables: a normal bell shaded left of 0.5 beside a small grid of numbers in which 0.691 is highlighted.
Geometry works when the region is a rectangle or a triangle: base times height, or half of base times height. Formulas are ready-made expressions for the area under a particular family of curves, such as the exponential in Section 5.3. Technology means a calculator or software command that returns an area, and tables are printed lists of areas, which is how the normal distribution was handled before calculators.
| route | used for | in this book |
|---|---|---|
| geometry | flat or straight-edged densities | this section, Section 5.2 |
| formulas | a named family of curves | the exponential, Section 5.3 |
| technology | any common distribution | calculator commands throughout |
| probability tables | the standard normal and others | Chapter 6 onward |
Behind the formulas and the technology sits integral calculus, the mathematics of area under a curve. The book does not use it, because most students in this course have not studied it; someone did the calculus once, and the formula or the calculator key is the result. You never need to redo it, but you do need to know that what comes out is always an area.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 292 — geometry, formulas, technology, or probability tables
Worked example
Not every density is flat. Take f(x) equal to x over 2 for x from 0 to 2. Confirm that it is a density, then find the probability that x is less than 1, using only geometry.
\[ f(x) = \frac{x}{2}, \quad 0 \le x \le 2 \]
The region is a triangle
Why: the line rises from height 0 at x equal to 0 to height 1 at x equal to 2.
\[ f(0) = 0, \quad f(2) = \tfrac{2}{2} = 1 \]
Total area
Why: half of base times height.
\[ \tfrac12 (2)(1) = 1 \]
Figure (svg): The graph of f(x) = x/2 for x from 0 to 2: a straight line rising from (0, 0) to (2, 1), then dropping vertically to the axis, forming a triangle. The part from 0 to 1 is shaded blue, a smaller triangle, labelled ½ × 1 × 0.5 = 0.25. The remaining part is labelled 0.75.
The left part is a smaller triangle
Why: base 1, and height f(1).
\[ f(1) = \tfrac{1}{2} \]
Its area
Why: half of base times height.
\[ P(x < 1) = \tfrac12 (1)\left(\tfrac12\right) = 0.25 \]
Area to the right by the complement
Why: one minus the left area.
\[ P(x > 1) = 1 - 0.25 = 0.75 \]
The interval from 0 to 1 is half of the range, yet it holds only a quarter of the probability. That is what a sloping density means: values are sparse near 0, where the curve is low, and crowded near 2, where it is high. Under a flat density the answer would have been one half.
Check the right part directly
Why: from 1 to 2 the region is a trapezoid with parallel sides one half and 1 and width 1.
\[ \tfrac12 \left(\tfrac12 + 1\right)(1) = 0.75 \quad \checkmark \]
Concept
Look at what the CDF, the tables and the calculator commands of the coming chapters all have in common: each one reports the area to the left of a value. That is a design choice, and it is a sensible one.
\[ \text{tool}(x) = P(X < x) \]
One number per value is enough, because every other area can be built from left areas with at most one subtraction. You have already met both of the builds, and there are no others.
\[ \text{right tail: } 1 - P(X < x) \]
\[ \text{middle: } P(X < d) - P(X < c) \]
So whenever you meet a new distribution, the procedure is the same. Draw the density. Shade the region the question asks about. Decide whether it is a left area, a right tail, or a middle. Then ask the tool for one or two left areas and do the subtraction. The shading comes first, every time, and the book's instruction for every homework problem in this chapter is exactly that: draw the picture.
And because the variable is continuous, you never have to wonder whether the tool includes the endpoint. Less than and at most give the same area.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, p. 294 — the CDF gives area to the left; Homework instruction p. 324
Section
Part 7
Pattern
Every problem in this section, and most of the next two chapters, follows one routine.
| question | area to find | flat density on 0 to 20 |
|---|---|---|
| P(c < x < d) | (d − c) × height | (d − c)/20 |
| P(x < x₀) | area to the left | x₀/20 |
| P(x > x₀) | 1 − area to the left | 1 − x₀/20 |
| P(x = c) | a line: no width | 0 |
| P(c ≤ x ≤ d) | same as P(c < x < d) | (d − c)/20 |
The table is written for Example 5.1's density, height one twentieth on 0 to 20, but only the last column depends on that. Change the range and the height changes with it; the middle column, the shape of each calculation, is the same for every continuous distribution you will meet.
The last two rows are the conceptual heart of the section, and they are the ones exam questions test. Everything else is base times height.
Notice where the checks come from. The unshaded area is one minus the shaded area, so every answer comes with a second route for free, and every answer must sit between 0 and 1. An answer above 1, or a negative one, means a region was misread, not a sum mis-added.
Check
Draw the rectangle before you choose. The height is set by the range.
Check your understanding
A continuous variable has density one tenth on the interval from 0 to 10. What is the probability that it lies between 3.5 and 8?
Answer: A
Why: The base is 8 minus 3.5, which is 4.5, and the height is one tenth, so the area is 4.5 times 0.1, which is 0.45.
Each wrong option is a correct answer to a different question: the left area at 8, the left area at 3.5, and the height. Shading the region is what tells you which one is being asked for.
The quick check: 4.5 units of a 10-unit range should be a little under half, and 0.45 is.
You can also reach the answer through the CDF, as a middle region: the area left of 8 is 0.80, the area left of 3.5 is 0.35, and their difference is 0.45. Two routes, one number, which is the confirmation you want before committing.
Check
Think about what region the event describes before you think about numbers.
Check your understanding
X is continuous with density one twentieth on 0 to 20. Which statement about the probability that X equals exactly 8 is correct?
Answer: B
Why: Probability is area, and the event that X equals 8 is a vertical line, which has no width. Its area, and so its probability, is exactly zero.
Two options give the right number. Only one gives the right reason, and on an exam the reason is what earns the marks, because a student who thinks zero means impossible will go wrong on the next question.
The value outside the range, such as 25, is the one for which impossible is the right word.
And the option that reads the height is the Chapter 4 reflex that this whole section is built to replace. If you picked it, go back to the trap in Part 2 and to the picture of the tall density, where the same reading would give a probability of 2.
Check
Decide which areas you have and which one you need before subtracting.
Check your understanding
For a continuous variable, the area to the left of 18 is 0.90 and the area to the left of 6 is 0.30. What is the probability that the variable is at least 6 and at most 18?
Answer: A
Why: The middle region is the left area at 18 minus the left area at 6, which is 0.90 minus 0.30, or 0.60. The endpoints add nothing, since the variable is continuous.
Any answer above 1 should stop you at once. Adding left areas is the classic slip; left areas overlap, so a middle is always a difference, never a sum.
The words at least and at most did not change anything. For a continuous variable they give the same area as strictly between.
Sketch it if you are unsure: a long bar shaded to 18, a short bar shaded to 6, and the part of the long bar that the short one does not cover. That leftover piece is the middle region, and its size is the difference of the two left areas.
Explain it to yourself
The zero probability of a single value is the idea in this section that students most often misstate. Explaining it in your own words is the best test of whether you have it.
Discussion prompt
In two or three sentences, explain to a classmate why the probability that a continuous X equals exactly 15 is zero, and why that does not mean X can never be 15. Use the words area and width.
A strong answer has two halves, one for each word. Area explains where probability lives; width explains why a single value gets none of it. Then the second half heads off the impossible misreading by pointing at intervals.
Compare your answer with how you would have explained a zero in Chapter 4. There, a value with probability zero simply was not in the table, it never happened. Here every value in the range has probability zero, and the table has been replaced by a curve. Saying why those two zeros differ is the whole point of the exercise.
If your explanation leaned on the number being very small, rework it with the shrinking-interval table from Part 3 in mind. The zero is not small; it is the result of a base of exactly zero.
Exit ticket
A continuous variable has density one twenty-fifth on the interval from 0 to 25.
Discussion prompt
Confirm that it is a density. Then find the probability that X is at most 10, the probability that X is greater than 10, and the probability that X is exactly 10. Finish with one sentence explaining why the first two add to one.
Notice the height first: one twenty-fifth, because the range is 25 wide. If you started with some other height, the first line would not come out to 1, and that line is there to catch exactly that.
Every Part of the lesson is in this one problem: the total area, a left area as base times height, a right tail through the complement, a single value with no width, and endpoints that do not matter.
Check your answers against the picture: 10 is two fifths of the way along a 25-unit range, so the left area should be two fifths, 0.4, and the right the remaining 0.6. If any step felt shaky, the matching Part is the one to revisit.
Recap
A measured variable fills an interval, so it cannot hand probability to single values. A probability density function hands it to intervals instead, as area under a curve, and the whole section follows from that.
| idea | in symbols | in words |
|---|---|---|
| probability is area | P(c < x < d) = area from c to d | shade the region, find its area |
| total area | area under f(x) = 1 | a density encloses exactly one |
| flat density | (d − c) × height | base times height |
| single value | P(x = c) = 0 | a line has no width |
| endpoints | P(c < x < d) = P(c ≤ x ≤ d) | lines add no area |
| CDF | P(X ≤ x) = P(X < x) | area to the left |
| right tail | P(X > x) = 1 − P(X < x) | one minus the left area |
\[ \text{Example 5.1: } P(0 < x < 2) = 0.1, \quad P(4 < x < 15) = 0.55, \quad P(x = 15) = 0 \]
The single-value and endpoint rows are where Chapter 5 breaks with Chapter 4, and they are also where most lost marks come from. If you remember only one sentence, remember the book's: for continuous probability distributions, probability equals area. Every row of the table is that sentence applied to a different region.
A density's height can exceed one; only its areas are probabilities. Areas are found by geometry, formulas, technology or tables, and nearly every tool reports area to the left. The companion business statistics text treats the same properties with different contexts, if you want more practice. Next, Section 5.2 names the flat density you used all lesson: the uniform distribution.
OpenStax Introductory Statistics 2e, §5.1 Continuous Probability Functions §5.1, pp. 291-295 — Section 5.1
OpenStax Introductory Business Statistics 2e, §5.1 Properties of Continuous Probability Density Functions §5.1 — Properties of Continuous Probability Density Functions
Want this taught 1-on-1? Alexander tutors Statistics — $55/session, free consultation.