Learn Without Walls

Lesson 5: The Uniform Distribution

Understanding distributions where all outcomes are equally likely

Introduction to the Uniform Distribution

While the normal distribution is characterized by values clustering around the mean, the uniform distribution represents the opposite scenario: a situation where all outcomes are equally likely.

Definition: Uniform Distribution

A continuous uniform distribution, denoted as U(a, b), is a probability distribution where:

  • All values between minimum (a) and maximum (b) are equally likely
  • The probability density is constant across the entire range
  • The graph is a rectangle (flat, not curved)
  • Values outside the range [a, b] have probability zero

The uniform distribution is sometimes called the rectangular distribution because of its flat, rectangular shape when graphed.

Visual Comparison:
  • Normal distribution: Bell-shaped curve with values clustering at the center
  • Uniform distribution: Flat rectangle with all values equally likely

Imagine a flat horizontal line (rectangle)

The height is constant from a to b, creating a rectangular shape.

Properties of the Uniform Distribution

The continuous uniform distribution U(a, b) is completely determined by two parameters:

Probability Density Function (PDF)

f(x) = 1 / (b − a)

for a ≤ x ≤ b

(and f(x) = 0 for x outside this range)

This constant height of 1/(b−a) ensures that the total area under the curve equals 1 (since area = base × height = (b−a) × 1/(b−a) = 1).

Mean (Expected Value)

μ = (a + b) / 2

The mean is the midpoint between a and b

This makes intuitive sense: if all values are equally likely, the average should be right in the middle.

Variance and Standard Deviation

σ² = (b − a)² / 12

Variance

σ = (b − a) / √12 ≈ (b − a) / 3.464

Standard Deviation

Important: Unlike the normal distribution (where σ can be any positive value), in a uniform distribution the standard deviation is completely determined by the range (b − a).

Calculating Probabilities

Because the uniform distribution is rectangular, calculating probabilities is straightforward—it's simply finding the area of a rectangle.

P(x₁ < X < x₂) = (x₂ − x₁) / (b − a)

Area = base × height = (x₂ − x₁) × [1/(b−a)]

Geometric Interpretation:
  • Base: The length of the interval (x₂ − x₁)
  • Height: The constant probability density 1/(b−a)
  • Probability: Base × Height = the area of the rectangle

Special cases:

Examples

Example 1: Bus Wait Time

Scenario: A bus arrives every 15 minutes. You arrive at the bus stop at a random time. Your wait time X is uniformly distributed: X ~ U(0, 15) minutes.

(a) What is the probability you wait between 5 and 10 minutes?

Solution:

  • a = 0, b = 15
  • P(5 < X < 10) = (10 − 5) / (15 − 0) = 5 / 15 = 1/3 ≈ 0.333
  • Answer: About 33.3%

(b) What is the probability you wait less than 3 minutes?

Solution:

  • P(X < 3) = (3 − 0) / (15 − 0) = 3 / 15 = 1/5 = 0.20
  • Answer: 20%

(c) What is the average wait time?

Solution:

  • μ = (a + b) / 2 = (0 + 15) / 2 = 7.5 minutes
  • Answer: 7.5 minutes

Example 2: Random Number Generator

Scenario: A computer generates random numbers uniformly distributed between 0 and 1: X ~ U(0, 1)

(a) What is the probability the number is greater than 0.75?

Solution:

  • P(X > 0.75) = (1 − 0.75) / (1 − 0) = 0.25 / 1 = 0.25
  • Answer: 25%

(b) What is the standard deviation?

Solution:

  • σ = (b − a) / √12 = (1 − 0) / √12 = 1 / 3.464 ≈ 0.289
  • Answer: σ ≈ 0.289

(c) What is the probability the number is exactly 0.5?

Solution:

  • For continuous distributions, P(X = any specific value) = 0
  • Answer: 0 (probability zero)

Example 3: Manufacturing Tolerance

Scenario: A machine cuts metal rods to a target length of 100 cm. Due to random variation, the actual length is uniformly distributed between 99.5 and 100.5 cm: X ~ U(99.5, 100.5)

(a) What percentage of rods are between 99.8 and 100.2 cm?

Solution:

  • a = 99.5, b = 100.5
  • P(99.8 < X < 100.2) = (100.2 − 99.8) / (100.5 − 99.5) = 0.4 / 1.0 = 0.40
  • Answer: 40%

(b) What is the mean length?

Solution:

  • μ = (99.5 + 100.5) / 2 = 200 / 2 = 100 cm
  • Answer: 100 cm (exactly on target)

(c) What is the variance?

Solution:

  • σ² = (b − a)² / 12 = (100.5 − 99.5)² / 12 = 1² / 12 = 1/12 ≈ 0.0833 cm²
  • Answer: σ² ≈ 0.0833 cm²

Example 4: Comparing Uniform to Normal

Scenario: Two processes produce items with mean 50 and range of 40-60:

  • Process A: Uniform distribution U(40, 60)
  • Process B: Normal distribution N(50, σ) where we set σ so 40 and 60 are ±3σ from mean

Question: Which process produces more values between 45 and 55?

Solution:

Process A (Uniform):

  • P(45 < X < 55) = (55 − 45) / (60 − 40) = 10 / 20 = 0.50
  • 50% of values

Process B (Normal):

  • If 60 = μ + 3σ, then 60 = 50 + 3σ, so σ ≈ 3.33
  • 45 = 50 − 5 = μ − 1.5σ
  • 55 = 50 + 5 = μ + 1.5σ
  • By the Empirical Rule (interpolating), approximately 86.6% of values fall within 1.5 SD

Answer: Process B (normal) produces more values between 45 and 55 because values cluster around the mean. Process A (uniform) spreads values evenly across the entire range.

When to Use the Uniform Distribution

The uniform distribution is appropriate when:

Use Uniform Distribution When:

  • All outcomes are equally likely (no value is more probable than any other)
  • You have a bounded range with known minimum and maximum values
  • There's no reason to expect clustering around any particular value
  • The process is truly random within the specified bounds

Common examples:

Warning: Don't assume uniform distribution without justification! In most natural phenomena, values cluster around central values (normal distribution is more common).

Uniform vs Normal Distribution

Understanding when to use each distribution is crucial:

Characteristic Uniform Distribution Normal Distribution
Shape Rectangular (flat) Bell-shaped (curved)
Probability All values equally likely Values near mean more likely
Parameters a (min), b (max) μ (mean), σ (standard deviation)
Range Finite: [a, b] Infinite: (−∞, +∞)
Standard Deviation Determined by range: (b−a)/√12 Independent parameter σ
Symmetry Symmetric around midpoint Symmetric around mean
When to Use Truly random within bounds, no clustering expected Natural variation, values cluster around mean

Real-World Application Guide

Use Uniform:

  • Spinner landing on any position 0° to 360°
  • Arrival time during a 1-hour window with no pattern
  • Random selection from a bounded interval

Use Normal:

  • Human heights, weights, IQ scores
  • Measurement errors in scientific experiments
  • Test scores, blood pressure readings

Check Your Understanding

Try these questions to test what you've learned in this lesson.

Question 1: A subway train arrives every 10 minutes. If you arrive at a random time, what is the probability you wait more than 7 minutes? (Assume wait time is uniform.)

Answer: 0.30 or 30%

Explanation: X ~ U(0, 10). P(X > 7) = (10 − 7) / (10 − 0) = 3/10 = 0.30

Question 2: For a uniform distribution U(20, 50), what is the mean?

Answer: 35

Explanation: μ = (a + b) / 2 = (20 + 50) / 2 = 70 / 2 = 35. The mean is always the midpoint.

Question 3: True or False: In a uniform distribution, the probability of getting a value between 10 and 20 is the same as getting a value between 30 and 40 (assuming both intervals are within the range).

Answer: True

Explanation: Since all values are equally likely in a uniform distribution, any two intervals of the same length have the same probability. Both intervals have length 10, so P(10 < X < 20) = P(30 < X < 40).

Question 4: A random number generator produces values uniformly between 0 and 100. What is the standard deviation?

Answer: σ ≈ 28.87

Explanation: σ = (b − a) / √12 = (100 − 0) / √12 = 100 / 3.464 ≈ 28.87

Question 5: Which statement best describes the key difference between uniform and normal distributions?

Answer: Uniform has all values equally likely (flat graph), while normal has values clustering around the mean (bell-shaped graph).

Explanation: This is the fundamental distinction. Uniform is rectangular with constant probability density, while normal is bell-shaped with higher probability near the center.

Key Takeaways from Lesson 5

← Back: Lesson 4 - Percentiles Next: Practice Problems →