Fiveable

🎲Intro to Statistics Unit 5 Review

QR code for Intro to Statistics practice questions

5.2 The Uniform Distribution

5.2 The Uniform Distribution

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
🎲Intro to Statistics
Unit & Topic Study Guides

The Uniform Distribution

The uniform distribution models situations where every value in a range is equally likely. Think of a random number generator that picks any real number between 0 and 10: no number is more likely than any other. This distribution comes up often as a building block in probability and is one of the simplest continuous distributions you'll work with.

Uniform Distribution Probability Calculations

The uniform distribution (also called the rectangular distribution) is a continuous probability distribution where the probability density stays constant across a specified range. You write it as XU(a,b)X \sim U(a, b), where aa is the minimum value and bb is the maximum value.

The probability density function (PDF) is:

  • f(x)=1baf(x) = \frac{1}{b - a} for axba \leq x \leq b
  • f(x)=0f(x) = 0 for x<ax < a or x>bx > b

The height of the PDF is always 1ba\frac{1}{b-a}, which ensures the total area under the curve equals 1. For example, if XU(2,8)X \sim U(2, 8), the PDF height is 182=160.167\frac{1}{8-2} = \frac{1}{6} \approx 0.167 across the entire interval.

To find the probability that XX falls within a subinterval [c,d][c, d]:

P(cXd)=dcbaP(c \leq X \leq d) = \frac{d - c}{b - a}

where ac<dba \leq c < d \leq b. The probability is just the length of the subinterval divided by the length of the full range. Using the example above, P(3X5)=5382=26=13P(3 \leq X \leq 5) = \frac{5 - 3}{8 - 2} = \frac{2}{6} = \frac{1}{3}.

The cumulative distribution function (CDF) gives the probability that XX is less than or equal to some value xx:

  • F(x)=0F(x) = 0 for x<ax < a
  • F(x)=xabaF(x) = \frac{x - a}{b - a} for axba \leq x \leq b
  • F(x)=1F(x) = 1 for x>bx > b

The CDF increases linearly from 0 to 1 across the interval, which makes sense given the constant density.

Uniform distribution probability calculations, Uniform distribution (continuous) - Wikipedia

Equal Likelihood in Uniform Distributions

The defining feature of a uniform distribution is that all values within the range are equally likely. Graphically, the PDF is a flat horizontal line, which is why it's sometimes called a rectangular distribution.

One thing that trips students up: the probability of any single exact value is 0. That's true for all continuous distributions, not just the uniform. Since there are infinitely many possible values in any interval, you always calculate probabilities over subintervals rather than at individual points.

The probability of landing in any subinterval is proportional to that subinterval's length. A subinterval twice as wide has twice the probability. For XU(0,10)X \sim U(0, 10), the interval from 1 to 4 (length 3) has probability 0.3, while the interval from 6 to 8 (length 2) has probability 0.2.

Uniform distribution probability calculations, Lesson 20: High level plotting — Programming Bootcamp documentation

Inclusive vs. Exclusive Endpoints

When solving uniform distribution problems, you'll sometimes see intervals written with square brackets [  ][ \; ] (inclusive, meaning the endpoint is included) or parentheses (  )( \; ) (exclusive, meaning the endpoint is not included).

Here's the key point: for continuous distributions, it doesn't matter whether endpoints are inclusive or exclusive. Since the probability of any single point is 0, including or excluding an endpoint doesn't change the answer.

  • P(cXd)=P(c<X<d)=P(cX<d)=P(c<Xd)=dcbaP(c \leq X \leq d) = P(c < X < d) = P(c \leq X < d) = P(c < X \leq d) = \frac{d - c}{b - a}

All four expressions give the same result. So if a problem asks for P(X>3)P(X > 3) versus P(X3)P(X \geq 3), you'll get the same number either way.

When using the CDF, the calculation is straightforward regardless of endpoint type:

P(cXd)=F(d)F(c)P(c \leq X \leq d) = F(d) - F(c)

You don't need to adjust for inclusive vs. exclusive endpoints with continuous distributions. This is different from discrete distributions, where the distinction does matter.

Measures of Central Tendency and Variability

Since the uniform distribution is symmetric, the mean (expected value) sits right at the midpoint of the interval:

E(X)=a+b2E(X) = \frac{a + b}{2}

The variance measures how spread out the values are:

Var(X)=(ba)212Var(X) = \frac{(b - a)^2}{12}

The standard deviation is the square root of the variance:

SD(X)=ba12SD(X) = \frac{b - a}{\sqrt{12}}

For a quick example: if XU(0,12)X \sim U(0, 12), then E(X)=6E(X) = 6, Var(X)=14412=12Var(X) = \frac{144}{12} = 12, and SD(X)=12123.46SD(X) = \frac{12}{\sqrt{12}} \approx 3.46.

Notice that the variance depends only on the width of the interval (ba)(b - a), not on where the interval is located. U(0,10)U(0, 10) and U(100,110)U(100, 110) have the same variance and standard deviation, even though their means are very different.