5.2 The Uniform Distribution

Section 5.1's flat density, named and given parameters. The uniform distribution is a continuous distribution concerned with events that are equally likely to occur across an interval, written X follows U of a and b, where a is the lowest value the variable can take and b the highest. Its density is one over b minus a, a height forced by the requirement that a rectangle of that width enclose an area of one. Because the region is always a rectangle, every question reduces to arithmetic on a base and a height: a probability is base times height, the mean is the midpoint of a and b, the standard deviation is the width divided by the square root of twelve, a percentile is found by setting the area equal to the given proportion and solving for the boundary, and a conditional probability is found by redrawing the density on the reduced interval.

Subject: Statistics · 65 slides · symbolic lesson

Open the interactive version of this deck

What this lesson covers

The lesson, slide by slide

1. Section 5.2 The Uniform Distribution

Title

Statistics · Chapter 5 — Continuous Random Variables

The Uniform Distribution

2. By the end of this lesson you can

Objectives

Five outcomes, and each one is the same rectangle answering a different question.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, pp. 295-301 — the section these objectives are drawn from

3. What you already have

Warm-up

Section 5.1 worked with the flat density f(x) = 1/20 on the interval from 0 to 20 without ever naming it.

Discussion prompt

An eight-week-old baby's smiles last anywhere from 0 to 23 seconds, with every length equally likely. What height must the density have, and why can you not choose it freely?

Hint: The total area has to come out to one.

Answer:

The region is a rectangle of width 23, and its area must be exactly one, so the height has to be one twenty-third. There is no freedom in it at all — naming the interval names the height.

That is why this distribution needs only two numbers. Write down the lowest value and the highest, and the density follows; there is no third parameter to estimate the way a binomial needed both n and p.

It also means every question about the distribution is a question about one rectangle. This lesson asks five different questions of that rectangle — a probability, a mean, a spread, a percentile and a conditional probability — and none of them needs anything beyond base times height.

4. Equally likely across an interval, so the density is flat

Concept

The uniform distribution is a continuous probability distribution and is concerned with events that are equally likely to occur. The notation is X follows U(a, b), where a is the lowest value of x and b is the highest, and the density is one over b minus a for x between a and b.

uniform distribution — The continuous distribution of a variable equally likely to fall anywhere in an interval. Written X follows U(a, b) with a the lowest value and b the highest; its density is the constant one over b minus a.

\[ X \sim U(a, b), \qquad f(x) = \frac{1}{b - a} \;\text{ for } a \le x \le b \]

The book adds a warning at this point that is worth carrying: when working out problems that have a uniform distribution, be careful to note if the data is inclusive or exclusive of endpoints. Since section 5.1 established that endpoints contribute no area, this is not about the endpoints of a shaded region — it is about identifying a and b correctly from the wording, which is where the answer actually turns.

Figure (svg): A card giving the uniform distribution's notation, density and the parameters a and b

One parameter pair fixes everything, because the height is whatever makes the total area one.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, p. 295

5. Naming the distribution

Section

Section 1

6. Two numbers fix everything

Concept

Read the lowest and highest values the variable can take from the problem. Those are a and b, and the height of the density is one over their difference — a value forced rather than chosen, since the rectangle must enclose an area of one.

a and b — The lowest and highest values x can take. Neither is required to be zero: Example 5.6's repair times run from 1.5 to 4 hours, and the book notes explicitly that x cannot be less than 1.5.

\[ f(x) = \frac{1}{b - a}, \qquad (b - a) \cdot \frac{1}{b - a} = 1 \]

Example 5.2 is worth reading for how it justifies the model rather than assuming it. The book gives 55 measured smiling times, notes their sample mean of 11.65 and sample standard deviation of 6.08, and then says we will assume the times follow a uniform distribution between zero and 23 seconds — adding that the histogram from the sample is an empirical distribution that closely matches the theoretical uniform. The assumption is being checked against data, not imposed.

Figure (svg): A card giving the uniform distribution's notation, density and the parameters a and b

One parameter pair fixes everything, because the height is whatever makes the total area one.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, pp. 295-296 — Example 5.2, the notation and the density

7. The data behind the assumption

Picture it

The book's 55 smiling times, in five bins of equal width.

Figure (svg): A histogram of fifty-five smiling times in five bins, each bar close to the level eleven a perfect uniform would give

A perfectly uniform sample would put 11 in every bin. The bars are close to level, which is what justifies the model.

A perfectly uniform sample of 55 in five bins would put 11 in each, and the bars sit close to that level without matching it exactly — which is what a real sample from a uniform distribution looks like. The wobble is sampling variation, and chapter 11 will supply a formal test for whether wobble of that size is consistent with the model.

8. Worked example: writing the distribution

Worked example

Example 5.2. Reading the parameters off the problem.

\[ \text{smiling times from } 0 \text{ to } 23 \text{ seconds, all equally likely} \]

Define X in words

Why: The length of one smile.

\[ X =\text{ seconds of smiling} \]

Find the lowest value

Why: Zero seconds.

\[ a = 0 \]

Find the highest

Why: Twenty-three seconds.

\[ b = 23 \]

Write the density

Why: One over the width.

\[ f(x) = \frac{1}{23} \]

Figure (svg): The solution to Worked example writing the distribution shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ X \sim U(0, 23), \quad f(x) = \tfrac{1}{23} \text{ for } 0 \le x \le 23 \]

Verify: confirm the density integrates to one without any calculus

Why: The rectangle has width 23 and height one twenty-third, so its area is exactly 1. That check takes a second and it catches the commonest setup error, which is writing the height as one over b instead of one over b minus a. For Example 5.2 those coincide because a is zero, which is exactly why it is worth checking on a problem where they do not.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, pp. 295-296

9. Write the density

Faded example

Quiz completion times are uniform between 6 and 15 minutes.

Fill in the blanks

X \sim U(6, 15), \quad f(x) = \frac90.1111} \approx ___

Why: The width is 15 minus 6, which is 9, so the height is one ninth, about 0.1111. Nine times one ninth is exactly 1, which confirms it is a density.

10. Worked example: an interval not starting at zero

Worked example

Example 5.6, where one over b would be wrong.

\[ \text{furnace repairs take between } 1.5 \text{ and } 4 \text{ hours} \]

Find a and b

Why: From 1.5 to 4 hours.

\[ a = 1.5, b = 4 \]

Find the width

Why: Four minus one point five.

\[ 2.5 \]

Write the density

Why: One over the width.

\[ \frac{1}{2.5} \]

Evaluate

Why: As a decimal.

\[ f(x) = 0.4 \]

Figure (svg): The solution to Worked example an interval not starting at zero shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ f(x) = \frac{1}{4 - 1.5} = \frac{1}{2.5} = 0.4 \]

Verify: confirm why one over b would have failed here

Why: One over b would give 0.25, and a rectangle of width 2.5 and height 0.25 has area 0.625 rather than 1 — so it is not a density at all. The area check exposes the error immediately. This is also the example where the book warns that the shaded region for P(x < 3) starts at x = 1.5 rather than at zero, since x cannot be less than 1.5.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, pp. 300-301

11. Trap: writing the height as one over b

Trap

The trap

\[ X \sim U(1.5, 4) \;\Rightarrow\; f(x) = \tfrac{1}{4} = 0.25 \]

Divide one by the upper end

Why: In the smiling-times example the height was one over 23, and 23 was the upper end.

\[ (2.5)(0.25) = 0.625 \ne 1 \]

The coincidence in Example 5.2 was that a happened to be zero, so one over b and one over b minus a were the same number.

The fix

\[ f(x) = \frac{1}{b - a} = \frac{1}{2.5} = 0.4 \]

Divide one by the WIDTH of the interval

Why: The height is whatever makes a rectangle of that width have area one.

Learning the formula from an example with a equal to zero is how this error gets installed, which is why it is worth doing Example 5.6 immediately afterwards. The area check — width times height must give exactly 1 — catches it every time and costs one line.

12. Uniform, or not?

Sorting

Ask whether every value in the range is equally likely.

Sort into buckets

Sort each situation.

Reasonably uniform
a bus arrival time in the next 15 minutes; the position of a random point on a 10 cm line; the last digit of a randomly dialled phone number
Not uniform
adult heights in a population; time until a component fails
uni
No part of the range is favoured over any other of the same width.
not
Some values are much more likely than others — heights cluster at the middle and failure times cluster near zero.

Item (e) is uniform but discrete, which is a useful reminder that uniform describes equal likelihood rather than continuity. Item (d) is the exponential of section 5.3, whose whole character is that short times are commoner than long ones.

13. One of these is false

Two truths and a lie

All three concern the notation.

Eliminate the wrong options

Two are true. Knock those out and keep the false one.

  • A. a is the lowest value of x and b the highest
  • C. The height is forced by the requirement that the area be one
  • B. a is always zero in a uniform distribution

Survives elimination: B

Why: The survivor is false. Example 5.5's donut times run from 0.5 to 4 minutes and Example 5.6's repair times from 1.5 to 4 hours. Assuming a is zero is what produces the one-over-b error, so it is worth naming explicitly as a habit to avoid.

14. How tall is the density?

Estimation

A variable is uniform on the interval from 0 to 0.5.

Predict first

What is the height of its density?

  • 2
  • 0.5
  • 1
  • It cannot exceed 1

Correct: 2.

Why: One over 0.5 is 2, and a rectangle of width 0.5 and height 2 has area exactly 1. The last option restates the misconception section 5.1 corrected: it is the AREA that is capped at one, never the height. Narrow intervals force tall densities.

15. Probabilities as rectangles

Section

Section 2

16. Base times height, clipped to the interval

Concept

A probability for a uniform variable is the area of the rectangle standing on the interval in question: its base is the width of that interval and its height is the density. The only care needed is that the region cannot extend beyond a or b.

clipping to the interval — A region asked about must be intersected with the interval from a to b before its base is measured, since the density is zero outside. Asking for P(x > 2) when b is 4 gives a base of 2, not an unbounded one.

\[ P(c < x < d) = (d - c) \cdot \frac{1}{b - a} \]

The clipping is where most of the arithmetic errors in this section live, and they are quiet ones. For Example 5.6, P(x > 2) has base 4 minus 2 rather than anything involving 1.5, while P(x < 3) has base 3 minus 1.5 rather than 3 minus 0. Sketching the rectangle and marking a and b on it before measuring any base is what prevents both.

Figure (svg): The uniform density on zero to twenty-three with the region from two to eighteen shaded

Base 16, height one twenty-third. Nothing in the uniform ever needs more than this.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, p. 296 — Example 5.3(a)

17. One rectangle, one multiplication

Picture it

Example 5.3(a): the chance a smile lasts between 2 and 18 seconds.

Figure (svg): The uniform density on zero to twenty-three with the region from two to eighteen shaded

Base 16, height one twenty-third. Nothing in the uniform ever needs more than this.

The book leaves the answer as sixteen twenty-thirds, which is worth imitating when the fraction is exact — 0.6957 is a rounding of it. Later chapters will force decimals because their areas come from tables, but nothing is gained by rounding when the geometry gives an exact fraction.

18. Worked example: a smile between 2 and 18 seconds

Worked example

Example 5.3(a).

\[ X \sim U(0, 23); \text{ find } P(2 < x < 18) \]

Find the base

Why: Eighteen minus two.

\[ 16 \]

Find the height

Why: One over 23.

\[ \frac{1}{23} \]

Multiply

Why: Base times height.

\[ \frac{16}{23} \]

Convert if wanted

Why: As a decimal.

\[ 0.6957 \]

Figure (svg): The solution to Worked example a smile between 2 and 18 seconds shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ P(2 < x < 18) = (18 - 2)\left(\tfrac{1}{23}\right) = \tfrac{16}{23} \]

Verify: confirm against the interval's share of the range

Why: The interval from 2 to 18 covers 16 of the 23 seconds, so the probability must be sixteen twenty-thirds — the share of the range IS the probability when the density is flat. That makes every uniform probability checkable in one step, and it is the reason the uniform is a good place to build the habit before the normal removes the shortcut.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, p. 296

19. Clip to the interval

Faded example

For X ~ U(1.5, 4), find P(x > 2). The density is 0.4.

Fill in the blanks

P(x > 2) = (4 - 2)(0.4) = 0.8

Why: Greater than 2 means from 2 up to 4, since 4 is the largest value x can take, so the base is 2 and the answer 0.8. Treating the region as unbounded would give an infinite base and no answer at all.

20. Worked example: a bus arriving within 12.5 minutes

Worked example

Example 5.4(a). The lower end is zero, so the base is easy.

\[ X \sim U(0, 15); \text{ find } P(x < 12.5) \]

Write the density

Why: One over 15.

\[ f(x) = \frac{1}{15} \]

Find the base

Why: From 0 to 12.5.

\[ 12.5 \]

Multiply

Why: Twelve and a half fifteenths.

\[ 0.8333 \]

State it in words

Why: Waiting under 12.5 minutes.

\[ \text{about } 83 \% \]

Figure (svg): The solution to Worked example a bus arriving within 12.5 minutes shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ P(x < 12.5) = (12.5)\left(\tfrac{1}{15}\right) = 0.8333 \]

Verify: confirm the base runs from a rather than from zero by accident

Why: Here a is zero, so the base from a to 12.5 and the base from zero to 12.5 are the same — the distinction does not bite. It bites in Example 5.6, where P(x < 3) has base 3 minus 1.5 and not 3, and the book flags it: the shaded area starts at x = 1.5 rather than at x = 0, since x cannot be less than 1.5.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, p. 298

21. Error analysis: four attempts at P(x < 3) for X ~ U(1.5, 4)

Error analysis

Example 5.6(b). The density is 0.4 and the answer is 0.6.

Annotate

On: \( \begin{aligned} &(1)\; (3)(0.4) = 1.2 \\ &(2)\; (3 - 1.5)(0.25) = 0.375 \\ &(3)\; (4 - 3)(0.4) = 0.4 \\ &(4)\; (3 - 1.5)(0.4) = 0.6 \end{aligned} \)

  • (1) measures the base from zero rather than from a. It gives 1.2, which is not a probability at all, so the error announces itself.
  • (2) has the right base but the one-over-b height of 0.25. It gives 0.375, which looks entirely plausible.
  • (3) shades the wrong side, answering P(x > 3) instead. Also plausible, and caught only by checking the direction.
  • (4) is correct: base 1.5 from a to 3, height 0.4, giving 0.6.

Error (1) is harmless because 1.2 is impossible on its face. Errors (2) and (3) are the dangerous ones, since both produce numbers between zero and one — and both are caught by the same habit of sketching the rectangle with a and b marked before measuring anything.

22. Where does the base start?

Discrimination

For X ~ U(1.5, 4), decide the base of each region.

Sort into buckets

Sort each question by whether its base is measured from a or to b.

Base starts at a = 1.5
P(x < 3); P(x < 2.25); P(2 < x < 3)
Base ends at b = 4
P(x > 2); P(x > 3.375)
from
A less-than region begins at the bottom of the interval, which is a rather than zero.
to
A greater-than region runs up to the top of the interval, which is b rather than infinity.

23. One of these is false

Two truths and a lie

All three concern computing uniform probabilities.

Eliminate the wrong options

Two are true. Knock those out and keep the false one.

  • A. A region must be clipped to the interval from a to b
  • C. With a flat density, probability equals the interval's share of the range
  • B. P(x > c) always has base b minus a

Survives elimination: B

Why: The survivor is false: the base of P(x > c) is b minus c, not b minus a. It equals b minus a only when c is a itself, in which case the probability is 1. Reading the base off the sketch rather than from a remembered formula avoids this.

24. Which is larger?

Prediction

Commit before reasoning.

Predict first

For X ~ U(1.5, 4), which is larger: P(x < 3) or P(x > 3)?

  • P(x < 3), because its base is 1.5 against 1
  • P(x > 3), because 3 is below the midpoint
  • They are equal
  • It cannot be determined

Correct: P(x < 3).

Why: The midpoint of the interval is 2.75, so 3 sits above it and more of the range lies below 3 than above. The bases are 1.5 and 1, giving 0.6 and 0.4, which sum to 1 as they must. Comparing a cut-off against the midpoint answers this kind of question with no arithmetic at all.

25. The mean and standard deviation

Section

Section 3

26. The midpoint, and the width over root twelve

Concept

The theoretical mean of a uniform distribution is the average of a and b, which is the midpoint of the interval. The standard deviation is the square root of the width squared over twelve, which is the width divided by the square root of twelve.

the theoretical mean and standard deviation — The values the model predicts, as against the sample mean and sample standard deviation computed from data. For Example 5.2 the model gives 11.50 and 6.64 against the sample's 11.65 and 6.08.

\[ \mu = \frac{a + b}{2}, \qquad \sigma = \sqrt{\frac{(b-a)^2}{12}} \]

The mean needs no formula once you see it: a symmetric distribution has its balance point at the centre, and the uniform is as symmetric as a distribution can be. The standard deviation does need the formula, and the twelve in it is not guessable — it comes from an integral, which is precisely the kind of result section 5.1 said would be supplied rather than derived. Worth noticing is that the spread depends only on the width, so U(0, 23) and U(100, 123) have the same standard deviation.

Figure (svg): A card giving the uniform mean and standard deviation formulas and comparing them with the sample values

The mean is the midpoint, which needs no formula. The standard deviation does, and it is always the width over the square root of twelve.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, p. 296 — the formulas and Example 5.2's values

27. Theory against sample

Picture it

The formulas, and the 55 measured smiling times they are being checked against.

Figure (svg): A card giving the uniform mean and standard deviation formulas and comparing them with the sample values

The mean is the midpoint, which needs no formula. The standard deviation does, and it is always the width over the square root of twelve.

The book's remark is that the theoretical mean and standard deviation are close to the sample values, and it is worth noticing which is closer. The means agree to about a tenth of a second while the standard deviations differ by more than half a second — spread is estimated less precisely than centre from a sample of this size, which is a theme chapter 7 will make quantitative.

28. Worked example: the smiling times

Worked example

Example 5.2's second half.

\[ X \sim U(0, 23) \]

Average the endpoints

Why: Zero plus 23, halved.

\[ 11.50 \]

Find the width

Why: Twenty-three minus zero.

\[ 23 \]

Square it and divide by 12

Why: 529 over 12.

\[ 44.08 \]

Take the square root

Why: The standard deviation.

\[ 6.64 \]

Figure (svg): The solution to Worked example the smiling times shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \mu = \frac{0 + 23}{2} = 11.50, \qquad \sigma = \sqrt{\frac{23^2}{12}} \approx 6.64 \]

Verify: confirm the standard deviation is a plausible size for the interval

Why: The width is 23 and the square root of twelve is about 3.46, so the standard deviation must be a bit under a third of the width — about 6.6, as computed. That ratio is the same for every uniform distribution, which makes it a genuine check: a standard deviation larger than a third of the width, or smaller than a quarter of it, signals an arithmetic error.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, p. 296

29. Mean and spread

Faded example

Baseball season durations are uniform between 447 and 521 hours.

Fill in the blanks

\mu = \frac48421.36 = ___, \qquad \sigma = \frac______} \approx ___

Why: The midpoint of 447 and 521 is 484, and the width of 74 divided by about 3.464 gives 21.36. The spread is about 29 percent of the width, as it always is for a uniform.

30. Worked example: the bus wait

Worked example

Example 5.4(b). The book rounds the standard deviation to one decimal place.

\[ X \sim U(0, 15) \]

Average the endpoints

Why: Zero and 15.

\[ 7.5\text{ minutes} \]

Interpret the mean

Why: The long-run average wait.

\[ 7.5\text{ minutes} \]

Find the width over root twelve

Why: Fifteen over 3.464.

\[ 4.33 \]

Round as the book does

Why: One decimal place.

\[ 4.3\text{ minutes} \]

Figure (svg): The solution to Worked example the bus wait shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \mu = 7.5, \qquad \sigma = \sqrt{\frac{15^2}{12}} \approx 4.3 \]

Verify: confirm the mean matches the intuition for a random arrival

Why: Arriving at a random moment in a 15-minute gap should on average leave half the gap to wait, which is 7.5 minutes — so the formula agrees with common sense here. That is a genuinely useful check, and it also warns about a real-world subtlety: this assumes buses run exactly every 15 minutes, and the average wait rises above half the gap once the intervals themselves vary.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, p. 298

31. Trap: forgetting the square root

Trap

The trap

\[ \sigma = \frac{(b-a)^2}{12} = \frac{529}{12} \approx 44.08 \]

Read the formula as far as the fraction

Why: The expression under the root looks like the whole formula.

\[ \text{a spread of } 44 \text{ seconds on a } 23\text{-second range} \]

A standard deviation cannot exceed the width of the whole interval, let alone double it.

The fix

\[ \sigma = \sqrt{\frac{(b-a)^2}{12}} = \frac{b-a}{\sqrt{12}} \approx 6.64 \]

Take the square root, or use the width over root twelve directly

Why: The fraction is the VARIANCE; the standard deviation is its root.

The second form is worth preferring for exactly this reason: written as the width divided by the square root of twelve, there is no root left to forget. And the range check settles it either way — a standard deviation must be well under the width, in fact always about 29 percent of it for a uniform.

32. One of these is false

Two truths and a lie

All three concern the mean and spread.

Eliminate the wrong options

Two are true. Knock those out and keep the false one.

  • A. The mean is the midpoint of the interval
  • C. The standard deviation depends only on the width
  • B. The standard deviation is the width divided by twelve

Survives elimination: B

Why: The survivor is false: it is divided by the square ROOT of twelve, about 3.464, not by twelve. Dividing by twelve would give about 1.9 seconds for Example 5.2 instead of 6.64 — far too tight for a distribution spread evenly over 23 seconds.

33. Roughly how big?

Estimation

A variable is uniform on an interval of width 60.

Predict first

Roughly what is its standard deviation?

  • About 17
  • About 5
  • About 30
  • About 60

Correct: About 17.

Why: Sixty divided by the square root of twelve is about 17.3, which is a bit under a third of the width. The ratio of about 29 percent holds for every uniform distribution, so this can be estimated without computing: take roughly three tenths of the width.

34. Shifting the interval

Prediction

Commit before reasoning.

Predict first

U(0, 23) is replaced by U(100, 123). What happens to the mean and the standard deviation?

  • The mean rises by 100; the standard deviation is unchanged
  • Both rise by 100
  • The mean is unchanged; the standard deviation rises
  • Both are unchanged

Correct: The mean rises by 100; the standard deviation is unchanged.

Why: Sliding an interval moves its midpoint but not its width, and the spread depends only on the width. This is the general behaviour of centre and spread under a shift, first met in section 2.7: adding a constant to every value moves the centre and leaves the spread alone.

35. Percentiles: solving for the boundary

Section

Section 4

36. Given the area, find the cut-off

Concept

A percentile question reverses a probability question. Instead of being given a region and asked for its area, you are given the area and asked for the boundary. Set the area equal to the given proportion and solve for k.

the kth percentile — The value k below which the given proportion of the distribution falls. The book notes that k is sometimes called a critical value, a name that will matter from chapter 8 onward.

\[ P(x < k) = p \;\Longrightarrow\; (k - a)\cdot\frac{1}{b-a} = p \;\Longrightarrow\; k = a + p(b-a) \]

The book solves these by setting up the equation and rearranging rather than by quoting the closed form, and it is worth following that practice at least a few times. Writing P(x < k) = 0.30 and then (k minus 1.5)(0.4) = 0.30 keeps visible what is being asked; jumping straight to a plugged-in formula makes it easy to answer the wrong question, which is what the next worked example is about.

Figure (svg): The uniform density on zero to twenty-three with ninety percent of the area shaded and the cut-off marked at twenty point seven

A percentile question gives you the area and asks for the boundary — the reverse of a probability question.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, pp. 297-301 — Example 5.3(b) and Example 5.6(c)-(d)

37. Ninety percent of the area, and where it ends

Picture it

Example 5.3(b): the 90th percentile of smiling times.

Figure (svg): The uniform density on zero to twenty-three with ninety percent of the area shaded and the cut-off marked at twenty point seven

A percentile question gives you the area and asks for the boundary — the reverse of a probability question.

Notice that the shading is given and the dashed line is the unknown — the exact reverse of the earlier figures, where the line was given and the area was wanted. Recognising which of the two you are being asked is the whole skill here, and the phrase to watch for is one naming a proportion rather than a value.

38. Worked example: the 90th percentile of smiling times

Worked example

Example 5.3(b).

\[ X \sim U(0, 23); \text{ find } k \text{ with } P(x < k) = 0.90 \]

Write the equation

Why: Ninety percent falls below k.

\[ P(x < k) = 0.90 \]

Express the area

Why: Base times height.

\[ (k - 0) (\frac{1}{23}) \]

Set them equal

Why: And solve.

\[ \frac{k}{23} = 0.90 \]

Multiply through

Why: By 23.

\[ k = 20.7 \]

Figure (svg): The solution to Worked example the 90th percentile of smiling times shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ k = (0.90)(23) = 20.7 \text{ seconds} \]

Verify: confirm the answer sits where 90 percent should put it

Why: The 90th percentile must lie well up the interval but below the maximum of 23, and 20.7 is 90 percent of the way along — exactly right for a flat density, where percentiles are proportional to position. If a percentile ever comes out beyond b or below a, the equation has been set up the wrong way round.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, p. 297

39. Solve for the boundary

Faded example

For X ~ U(1.5, 4) with density 0.4, find the 30th percentile.

Fill in the blanks

(k - 1.5)(0.4) = 0.30 \;\Rightarrow\; k - 1.5 = 0.75 \;\Rightarrow\; k = 2.25

Why: Dividing by 0.4 gives 0.75, and adding 1.5 gives k = 2.25 hours — the book's answer. Thirty percent of repair times are 2.25 hours or less.

40. Worked example: the longest 25 percent of repairs

Worked example

Example 5.6(d), where the wording hides which percentile is wanted.

\[ X \sim U(1.5, 4); \text{ the longest } 25\text{ percent take at least how long?} \]

Read what is above k

Why: The longest quarter.

\[ P(x > k) = 0.25 \]

Convert to a left area

Why: One minus a quarter.

\[ P(x < k) = 0.75 \]

Set up the area

Why: Base times height.

\[ (k - 1.5) (0.4) = 0.75 \]

Solve

Why: Divide by 0.4, add 1.5.

\[ k = 3.375 \]

Figure (svg): The solution to Worked example the longest 25 percent of repairs shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ (k - 1.5)(0.4) = 0.75 \;\Rightarrow\; k = 1.5 + 1.875 = 3.375 \]

Verify: confirm the percentile named matches the question asked

Why: The question is about the longest 25 percent, but the percentile is the 75th, not the 25th — the two numbers name the same cut-off from opposite sides. The book asks explicitly what percentile this represents for exactly that reason. A quick sanity check: 3.375 is well up the interval from 1.5 to 4, which is where a boundary with only a quarter above it belongs.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, p. 301

41. Trap: answering the 25th percentile instead of the 75th

Trap

The trap

\[ \text{longest } 25\text{ percent} \;\Rightarrow\; P(x < k) = 0.25 \]

Take the 25 in the question as the left-hand area

Why: The number 25 appears, so 0.25 goes into the equation.

\[ k = 1.5 + (0.25)(2.5) = 2.125 \]

That is the boundary with a quarter BELOW it, which describes the shortest repairs rather than the longest.

The fix

\[ P(x > k) = 0.25 \;\Rightarrow\; P(x < k) = 0.75 \;\Rightarrow\; k = 3.375 \]

Convert to a left-hand area first, since that is what the area formula gives

Why: The percentile is always stated as the proportion below.

Both answers are inside the interval and neither looks wrong, which is what makes this the section's most dangerous error. The defence is to sketch it: shade the region the words describe, and then read off whether the shaded part is on the left or the right before writing any equation.

42. Which area goes in the equation?

Discrimination

Translate each phrase into a proportion BELOW k.

Sort into buckets

Sort each phrase by the left-hand area it gives.

P(x < k) = 0.90
the 90th percentile; the longest 10 percent take at least how long; ninety percent wait less than this
P(x < k) = 0.10
the 10th percentile; only 10 percent fall below this
p90
The cut-off has ninety percent below it, whether the phrase says so directly or names the ten percent above.
p10
The cut-off has only ten percent below it, so the small proportion is the left-hand area.

43. One of these is false

Two truths and a lie

All three concern percentiles.

Eliminate the wrong options

Two are true. Knock those out and keep the false one.

  • A. A percentile question gives the area and asks for the boundary
  • C. The book also calls k a critical value
  • B. The longest 25 percent is found from the 25th percentile

Survives elimination: B

Why: The survivor is false. The longest 25 percent lies ABOVE the 75th percentile, since a percentile always names the proportion below it. This is the section's commonest error and the reason the book asks what percentile this represents.

44. Where does the median sit?

Prediction

Commit before reasoning.

Predict first

For any uniform distribution, where is the 50th percentile?

  • At the midpoint, so equal to the mean
  • Below the mean
  • Above the mean
  • It depends on a and b

Correct: At the midpoint, equal to the mean.

Why: Half the area lies on each side of the centre, so the median is the midpoint — and so is the mean, since the distribution is symmetric. Section 2.6 said the mean and median coincide for a symmetric distribution, and the uniform is the cleanest possible instance of that.

45. Conditional probability: reducing the sample space

Section

Section 5

46. What you already know throws part of the interval away

Concept

A conditional probability question changes the sample space. Knowing that x exceeds some value c means the interval is now from c to b, so a new density can be written with the taller height one over b minus c, and the question answered on that.

reducing the sample space — Replacing the interval from a to b by the interval from c to b when it is known that x exceeds c. The new density is one over b minus c, and it is taller because the same total area of one now sits on a narrower base.

\[ f(x) = \frac{1}{b - c} \text{ for } c < x < b \]

The book gives both routes and stresses that they agree. The reduction is faster; the conditional formula from chapter 3 is more general, since it works when the condition is not a simple tail. Doing both once is worth the time because it connects this chapter back to section 3.3 — the rules of probability have not changed, only the way areas replace counts.

Figure (svg): Two panels showing a conditional probability computed first by redrawing the density on the reduced interval and second by dividing two areas from the original

The first way is quicker and the second generalises; the book teaches both, and they must agree.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, pp. 297-300 — Example 5.3(c) and Example 5.5(b), each solved two ways

47. The same answer twice

Picture it

Example 5.3(c): more than 12 seconds, given more than 8.

Figure (svg): Two panels showing a conditional probability computed first by redrawing the density on the reduced interval and second by dividing two areas from the original

The first way is quicker and the second generalises; the book teaches both, and they must agree.

The left panel is redrawn taller because the total area must still be one on the narrower interval — the same trade-off met when a uniform on [0, 20] became one on [0, 5]. The right panel keeps the original picture and divides two of its areas, which is section 3.3's formula unchanged.

48. Worked example: reducing the sample space

Worked example

Example 5.3(c), the book's first way.

\[ X \sim U(0, 23); \text{ find } P(x > 12 \mid x > 8) \]

Note what is known

Why: The baby smiled past 8 seconds.

\[ \text{the interval is now } 8\text{ to } 23 \]

Write the new density

Why: One over the new width.

\[ f(x) = \frac{1}{15} \]

Find the base above 12

Why: Twenty-three minus twelve.

\[ 11 \]

Multiply

Why: Base times new height.

\[ \frac{11}{15} \]

Figure (svg): The solution to Worked example reducing the sample space shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ P(x > 12 \mid x > 8) = (23 - 12)\left(\tfrac{1}{15}\right) = \tfrac{11}{15} \]

Verify: confirm the conditional exceeds the unconditional, and why it should

Why: Without the condition, P(x > 12) is eleven twenty-thirds, about 0.478; with it, the answer is 0.733. Knowing the smile has already lasted 8 seconds removes the short smiles that would have counted against the event, so the probability must rise. Any conditional that came out below its unconditional counterpart here would signal an error, since the condition can only eliminate unfavourable outcomes.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, p. 297

49. Reduce the sample space

Faded example

Donut times are U(0.5, 4). Find P(x > 2 given x > 1.5).

Fill in the blanks

\text2.5 = 4 - 1.5 = 0.8, \quad P = \frac______} = ___

Why: The condition moves the starting point from 0.5 to 1.5, giving a new width of 2.5, and the region above 2 has base 2 — so the answer is 0.8, the book's value for Example 5.5(b).

50. Worked example: the same by the conditional formula

Worked example

Example 5.3(c), the book's second way, using section 3.3's formula.

\[ P(A \mid B) = \frac{P(A \text{ and } B)}{P(B)}, \; A: x > 12, \; B: x > 8 \]

Identify A and B

Why: Above 12, and above 8.

Find P(A and B)

Why: Above 12 satisfies both.

\[ \frac{11}{23} \]

Find P(B)

Why: From 8 to 23.

\[ \frac{15}{23} \]

Divide

Why: The twenty-thirds cancel.

\[ \frac{11}{15} \]

Figure (svg): The solution to Worked example the same by the conditional formula shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \frac{11/23}{15/23} = \frac{11}{15} \approx 0.7333 \]

Verify: confirm why the denominators cancel, and what that means

Why: Both areas carry a factor of one over 23, so it cancels in the ratio — which is exactly why the answer depends on the interval from 8 to 23 and not on the original width at all. That cancellation is the algebraic version of what the first method does geometrically by redrawing the picture, which is why the two can never disagree.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, pp. 297-298

51. Trap: keeping the original height after conditioning

Trap

The trap

\[ P(x > 12 \mid x > 8) = (23 - 12)\left(\tfrac{1}{23}\right) = \tfrac{11}{23} \]

Use the reduced base but the original height

Why: The density of the distribution is one twenty-third.

\[ \tfrac{11}{23} \approx 0.478, \text{ which is just } P(x > 12) \]

Nothing has been conditioned on: this is the unconditional answer, so the information that the baby smiled past 8 seconds has been thrown away.

The fix

\[ P(x > 12 \mid x > 8) = (23 - 12)\left(\tfrac{1}{15}\right) = \tfrac{11}{15} \]

Change the height as well, so the reduced interval still carries area one

Why: A narrower sample space needs a taller density.

The self-check is to ask what the reduced density integrates to: fifteen times one twenty-third is fifteen twenty-thirds, not 1, so it cannot be a density on that interval. Whenever a sample space is reduced, verify that the new rectangle still has area one before computing anything with it.

52. One of these is false

Two truths and a lie

All three concern conditioning.

Eliminate the wrong options

Two are true. Knock those out and keep the false one.

  • A. Conditioning on x > c replaces a by c
  • C. The reduced density is taller than the original
  • B. The height stays the same after conditioning

Survives elimination: B

Why: The survivor is false, and using the old height is the section's standard error — it returns the unconditional probability while appearing to answer the conditional question. Checking that the new rectangle has area one catches it at once.

53. Which way does conditioning push?

Prediction

Commit before reasoning.

Predict first

For a uniform variable, how does P(x > 12 given x > 8) compare with P(x > 12)?

  • Larger, because the condition removes values that would have failed
  • Smaller, because the interval is narrower
  • The same, because the distribution is uniform
  • It depends on a and b

Correct: Larger.

Why: The condition eliminates the region below 8, all of which would have counted against the event, so the remaining proportion above 12 is higher: 0.733 against 0.478. For a uniform, learning that x has already passed a threshold always improves the chance of passing a later one — which is exactly the property section 5.3's exponential distribution does NOT have.

54. Explain the taller rectangle

Explain it

A classmate accepts that the interval narrows but not that the height changes.

Discussion prompt

In two sentences or fewer, justify the new height.

Hint: Ask what area their rectangle would enclose.

Answer:

Ask what area their rectangle has: a width of 15 at a height of one twenty-third gives fifteen twenty-thirds, not 1, so it is not a probability distribution at all.

Since the baby definitely smiled somewhere between 8 and 23 seconds, that interval must now carry the whole probability of one — which forces the height up to one fifteenth.

55. Five questions, one rectangle

Comparison

Fill the blanks. Each row is the same shape answering something different.

Comparison matrix

QuestionWhat is givenWhat you compute
A probabilityan intervalbase times height
The meana and bthe midpoint
A percentilean areathe boundary k
A conditionala condition x > cthe area on a redrawn, taller rectangle

The third row is the reverse of the first, and mixing them up is the section's most frequent confusion. The test is what the question hands you: a value means compute an area; a proportion means solve for a value.

56. Solving a uniform problem, in order

Pattern

Six steps, and the sketch in step two does most of the work.

  1. Read a and b from the problem — the lowest and highest values x can take — and write the density as one over b minus a.
  2. Sketch the rectangle, mark a and b on it, and shade what the question describes.
  3. If a condition is given, redraw on the reduced interval with the taller height, and check the new area is one.
  4. For a probability, measure the base of the shaded region after clipping it to the interval, and multiply by the height.
  5. For a percentile, set the shaded area equal to the given proportion and solve for k, converting right-hand proportions to left-hand ones first.
  6. Check the answer: a probability between zero and one and matching the region's share of the range, or a percentile lying between a and b.

The mean is the midpoint and the standard deviation is the width over the square root of twelve. Neither needs the sketch, and both are worth computing as a sanity check on the interval you have identified.

OpenStax Introductory Business Statistics 2e, §5.2 The Uniform Distribution §5.2 The Uniform Distribution

57. Check yourself 1 of 3

Check

The density.

Check your understanding

For X ~ U(1.5, 4), what is f(x)?

  • A. 0.4 (correct)
  • B. 0.25
  • C. 2.5
  • D. 1

Answer: A

Why: The height is one over the width, which is one over 2.5, or 0.4. A rectangle of width 2.5 and height 0.4 has area exactly 1.

Why B tempts people
That is one over b, which ignores the lower end of 1.5 and gives a total area of 0.625.
Why C tempts people
That is the width of the interval, not the height of the density.
Why D tempts people
That is the total area, which every density has. The height here is 0.4.

58. Check yourself 2 of 3

Check

A percentile.

Check your understanding

For X ~ U(0, 15), what is the 90th percentile?

  • A. 13.5 (correct)
  • B. 0.90
  • C. 7.5
  • D. 1.5

Answer: A

Why: Ninety percent of 15 is 13.5, so P(x < 13.5) = 0.90. Ninety percent of the time a person waits at most 13.5 minutes.

Why B tempts people
That is the proportion given in the question, not the value it corresponds to.
Why C tempts people
That is the mean, which is the 50th percentile rather than the 90th.
Why D tempts people
That is the remaining ten percent of the range, not the boundary itself.

59. Check yourself 3 of 3

Check

Conditioning.

Check your understanding

For X ~ U(0, 23), what density should be used to find P(x > 12 given x > 8)?

  • A. 1/15, on the interval from 8 to 23 (correct)
  • B. 1/23, on the interval from 0 to 23
  • C. 1/11, on the interval from 12 to 23
  • D. 1/23, on the interval from 8 to 23

Answer: A

Why: The condition reduces the sample space to the interval from 8 to 23, whose width is 15, so the new height is one fifteenth.

Why B tempts people
That is the original distribution, which answers the unconditional question instead.
Why C tempts people
That reduces to the event's own interval rather than the condition's, which would always give 1.
Why D tempts people
The interval is right but the height is not: a width of 15 at height one twenty-third does not enclose area 1.

60. Where this shows up outside the textbook

Real world

A commuter train runs every 12 minutes. A passenger who arrives at the platform without consulting a timetable claims their average wait must be 6 minutes, and that they will wait more than 10 minutes only about one time in seven.

Discussion prompt

Check both claims under a uniform model, then say what real-world feature would make the average wait longer than 6 minutes even with trains still averaging 12 minutes apart.

Hint: The second part is about the variability of the gaps, not of the arrival.

Answer:

Both claims are right under the model. Arriving at a random moment in a 12-minute gap makes the wait uniform on the interval from 0 to 12, so the mean is the midpoint, 6 minutes, and the standard deviation is 12 over the square root of twelve, about 3.46 minutes.

\[ P(x > 10) = (12 - 10)\left(\tfrac{1}{12}\right) = \tfrac{1}{6} \approx 0.167 \]

The second claim is very slightly off in the passenger's favour: the probability is one sixth, about 0.167, rather than one seventh at about 0.143. Both are small, and the difference would not change any decision.

The feature that breaks it is variability in the gaps themselves. The model assumes every gap is exactly 12 minutes. If instead half the gaps are 6 minutes and half are 18 — still averaging 12 — then a randomly arriving passenger is more likely to land inside a long gap simply because long gaps occupy more of the timetable, and the average wait rises to 7.5 minutes rather than 6.

This is the inspection paradox, and it is worth recognising because the reasoning error is so natural: the passenger samples time, not gaps, so the gaps they experience are weighted by their own length. Two practical consequences follow. Reported average waits on unreliable services are always worse than half the advertised headway, and improving reliability — reducing the variability of the gaps — shortens average waits even when the average frequency is unchanged.

61. How sure are you?

Commit first

Answer, then rate your confidence honestly.

Predict first

Why does the density get taller when you condition on x > c?

  • Because probabilities always increase when you condition
  • Because the same total area of one must now sit on a narrower interval
  • Because c replaces b
  • Because the mean shifts upward

Correct: Because the same total area of one must sit on a narrower interval.

\[ (b - c) \cdot \frac{1}{b - c} = 1 \]

Why: Once x is known to exceed c, the interval from c to b carries the whole probability, so its rectangle must still have area one — and a narrower base forces a taller height. The mean does shift upward as a consequence, but that is a result rather than the reason, and conditioning does not always raise a probability.

62. Explain it to someone a year behind you

Explain it

They found the longest 25 percent of repair times for X ~ U(1.5, 4) by computing the 25th percentile, getting 2.125 hours.

Discussion prompt

In three sentences or fewer, show them the error.

Hint: Ask them to shade the region they mean.

Answer:

Ask them to shade the longest 25 percent on a sketch: it is the strip at the RIGHT-hand end, above the cut-off, not the one below it.

A percentile always names the proportion below it, so a cut-off with a quarter above it has three quarters below — the 75th percentile, not the 25th.

Solving (k minus 1.5)(0.4) = 0.75 gives 3.375 hours, and the check is that it sits high in the interval from 1.5 to 4 while their 2.125 sits low.

63. Exit ticket

Exit ticket

Name the weakest spot before you close the deck.

Predict first

Which of these would you least want handed to you cold?

  • Reading a and b and writing the density
  • Computing a probability with the region clipped to the interval
  • Turning a worded proportion into the right percentile
  • Conditioning by reducing the sample space

Correct: Whichever you picked is tonight's ten minutes, and each has a one-line fix.

Why: For the first, the height is one over b minus a, and width times height must give 1. For the second, sketch and mark a and b before measuring any base. For the third, translate every phrase into a proportion BELOW k. For the fourth, replace a by the condition and recompute the height. Do five problems of your chosen kind rather than twenty mixed ones.

64. Draw the lesson on one page

Connect it up

Paper. Twenty minutes.

Draw it

At the top, write X follows U(a, b) with a and b labelled in words, and the density as one over b minus a. Beneath it, draw the rectangle for Example 5.2's smiling times on the interval from 0 to 23 four times. On the first, shade from 2 to 18 and write the base, height and product. On the second, shade ninety percent of the area and solve for the boundary, marking 20.7. On the third, redraw the density on the reduced interval from 8 to 23 at its taller height of one fifteenth, shade above 12, and compute the conditional. On the fourth, keep the original height and shade above 8 and above 12 separately, then divide the two areas and check you get the same eleven fifteenths. To the right, write the mean and standard deviation formulas, evaluate both for this distribution, and write beside them the sample mean of 11.65 and sample standard deviation of 6.08 from the 55 measured times. At the bottom, redo the whole exercise for Example 5.6's furnace repairs on the interval from 1.5 to 4, computing the density, P(x > 2), P(x < 3), the 30th percentile and the 75th — and mark clearly which of those last two answers the question about the longest 25 percent.

Check the third and fourth rectangles against each other: they must give the same eleven fifteenths, and if they do not, the likely cause is keeping the original height on the reduced interval. Check the furnace density by multiplying 2.5 by 0.4, which must give exactly 1.

65. What you can do now

Recap

Five things, and all of them are one rectangle.

If you seeThen
Equally likely across an intervalUniform: X follows U(a, b)
An interval not starting at zeroThe height is one over b minus a, not one over b
A greater-than regionThe base runs up to b, not to infinity
A proportion given, a value wantedA percentile: set the area equal and solve
The longest or highest given percentConvert to a left-hand area first
A given or knowing clauseReduce the interval and raise the height
A standard deviation above a third of the widthAn error: check for a missing square root

Section 5.3 keeps the continuous machinery and changes the shape. The exponential distribution describes waiting times where short waits are commoner than long ones, and its defining oddity is the exact reverse of what conditioning did here: knowing you have already waited a while tells you nothing at all about how much longer you must wait.

OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution §5.2, pp. 295-301 — everything on these slides traces back here

Sources

  1. OpenStax Introductory Statistics 2e, §5.2 The Uniform Distribution — Illowsky & Dean, OpenStax / Rice University, CC BY 4.0, pp. 295-301
  2. OpenStax Introductory Business Statistics 2e, §5.2 The Uniform Distribution — Illowsky & Dean, OpenStax / Rice University, CC BY 4.0

Want this taught 1-on-1? Alexander tutors Statistics — $55/session, free consultation.

Book on Wyzant · Text (657) 465-8108