Course contentsShow
← Data Science
Lesson 162 of 2,1455. Continuous Probability DistributionsFree lesson

Uniform Distribution: PDF and CDF

Deriving and interpreting the probability density and cumulative distribution functions for uniform variables.

Uniform Distribution: PDF and CDF

What you'll learn: How to mathematically describe and interpret the probability density and cumulative distribution functions for uniformly distributed continuous variables.

The Core Idea

You've learned that the continuous uniform distribution spreads probability evenly across an interval [a, b]. Now let's nail down the exact formulas.

The Probability Density Function (PDF) tells us the "height" of the distribution at any point. For a uniform distribution:

f(x) = 1/(b - a)  for a ≤ x ≤ b
f(x) = 0          otherwise

Think of it like spreading peanut butter: if your bread slice is (b - a) inches wide, the even layer has constant thickness 1/(b - a) so the total amount equals 1.

The Cumulative Distribution Function (CDF) gives the probability that X ≤ x:

F(x) = 0              for x < a
F(x) = (x - a)/(b - a)  for a ≤ x ≤ b
F(x) = 1              for x > b

This is a straight line climbing from 0 to 1 across the interval. At the midpoint, you've "accumulated" 50% of the probability.

Why These Make Sense

The PDF has constant height because every value is equally likely. Its area under the curve must equal 1 (guaranteed since height × width = 1/(b-a) × (b-a) = 1).

The CDF starts at 0 (no probability below a), increases linearly (adding probability uniformly), and reaches 1 at b (all probability accounted for).

Key Takeaway: For a uniform distribution on [a, b], the PDF is the constant 1/(b - a), and the CDF is the linear function (x - a)/(b - a), making probability calculations straightforward through simple geometry.