Fiveable

🎲Intro to Probability Unit 9 Review

QR code for Intro to Probability practice questions

9.1 Uniform distribution

9.1 Uniform distribution

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

Uniform Distribution Properties

The uniform distribution is the simplest continuous probability distribution. It models situations where every outcome in a range is equally likely. Think of a random number generator that picks any real number between 0 and 10 with no preference for any value over another.

Probability Density Function and Parameters

A uniform distribution is defined by just two parameters:

  • Lower bound (aa): the smallest possible value
  • Upper bound (bb): the largest possible value
  • The only constraint is a<ba < b

Because every value in the interval is equally likely, the probability density function (PDF) is flat:

f(x)=1bafor axbf(x) = \frac{1}{b - a} \quad \text{for } a \leq x \leq b

Outside that interval, f(x)=0f(x) = 0. Graphically, the PDF looks like a rectangle, which is why you'll sometimes hear this called the "rectangular distribution."

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

F(x)=xabafor axbF(x) = \frac{x - a}{b - a} \quad \text{for } a \leq x \leq b

This is a straight line that climbs from 0 at x=ax = a to 1 at x=bx = b.

Statistical Measures and Characteristics

Because the distribution is perfectly symmetric, the mean and median are the same:

μ=a+b2\mu = \frac{a + b}{2}

The variance measures how spread out the values are:

σ2=(ba)212\sigma^2 = \frac{(b - a)^2}{12}

The interquartile range (IQR) is (ba)/2(b - a)/2, which is exactly half the width of the interval.

One especially common version is the standard uniform distribution, U(0,1)U(0, 1). It's the building block for random number generation and for a technique called the probability integral transform, which converts samples from one distribution into another.

Probabilities and Quantiles for Uniform Variables

Probability Density Function and Parameters, Lesson 20: High level plotting — Programming Bootcamp documentation

Probability Calculations

Calculating probabilities with a uniform distribution is straightforward because the PDF is constant. The probability that a uniform random variable falls within a subinterval [c,d][c, d] inside [a,b][a, b] is just the ratio of the subinterval's length to the total interval's length:

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

For example, if XU(2,10)X \sim U(2, 10) and you want P(4X7)P(4 \leq X \leq 7):

P(4X7)=74102=38=0.375P(4 \leq X \leq 7) = \frac{7 - 4}{10 - 2} = \frac{3}{8} = 0.375

A few things to keep in mind:

  • Any subinterval outside [a,b][a, b] has probability 0, since the PDF is 0 there.
  • The probability of the variable equaling any single exact value is 0. This is true for all continuous distributions, not just the uniform.
  • Two subintervals of equal length within [a,b][a, b] always have the same probability, no matter where they sit in the range.

Quantile Determination

Quantiles answer the reverse question: given a probability pp, what value does the variable fall below with that probability? You find them using the inverse of the CDF:

Q(p)=a+p(ba)Q(p) = a + p(b - a)

Here are the key quantiles for any U(a,b)U(a, b):

QuantileFormulaDescription
10th percentileQ(0.10)=a+0.10(ba)Q(0.10) = a + 0.10(b - a)10% of values fall below this
25th percentile (Q1)Q(0.25)=a+0.25(ba)Q(0.25) = a + 0.25(b - a)First quartile
50th percentile (median)Q(0.50)=(a+b)/2Q(0.50) = (a + b)/2Middle value
75th percentile (Q3)Q(0.75)=a+0.75(ba)Q(0.75) = a + 0.75(b - a)Third quartile
90th percentileQ(0.90)=a+0.90(ba)Q(0.90) = a + 0.90(b - a)90% of values fall below this
For a quick example, if XU(5,25)X \sim U(5, 25), the 75th percentile is 5+0.75(20)=205 + 0.75(20) = 20.

Applications of the Uniform Distribution

Probability Density Function and Parameters, Uniform distribution (continuous) - Wikipedia

Modeling Equal Likelihood Scenarios

The uniform distribution fits any situation where outcomes in a range are equally likely:

  • Rounding errors: When a digital scale rounds to the nearest gram, the actual rounding error is roughly uniformly distributed across the rounding interval.
  • Waiting times: At an automated car wash with a fixed 5-minute cycle, your wait time if you arrive at a random moment is approximately U(0,5)U(0, 5) minutes.
  • Random selection: Picking a random real number between two bounds, such as a spinner landing anywhere on a circular dial.

Computer Science and Simulation

  • Random number generation: Most pseudo-random number generators produce values from U(0,1)U(0, 1) as their starting point. Other distributions are then built from these uniform samples.
  • Cryptography: Generating encryption keys and initialization vectors requires uniformly distributed random bits so that no key is more predictable than another.
  • Monte Carlo simulations: These methods rely on uniform random samples to estimate complex quantities, from option prices in finance to particle behavior in physics.

Other Fields

  • Manufacturing and quality control: Measurement errors within a known tolerance range are sometimes modeled as uniform.
  • Insurance and actuarial science: When claim sizes are known to fall within fixed bounds but no value is more likely, a uniform model can serve as a starting assumption.
  • Game theory: Mixed strategy equilibria often involve players randomizing uniformly over a set of actions.