📋

Continuous Uniform Distribution

continuous

The continuous uniform distribution assigns equal probability to all values in a specified interval [a, b]. It is the simplest continuous distribution and represents complete ignorance about which value in the interval is more likely. The uniform distribution serves as a baseline for random number generation and appears in many theoretical contexts, including as a component in simulation methods and probability integral transforms.

Formula

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

Mean (Expected Value)

(a + b) / 2

Variance

(b - a)² / 12

Parameters

a
Lower Bound

The minimum value of the distribution. Any real number with a < b.

b
Upper Bound

The maximum value of the distribution. Any real number with b > a.

Key Properties

  • The PDF is constant (flat) over the interval [a, b], giving every subinterval of equal length the same probability
  • The CDF is linear: F(x) = (x - a) / (b - a) for a ≤ x ≤ b
  • For any subinterval [c, d] within [a, b], P(c ≤ X ≤ d) = (d - c) / (b - a)
  • The standard uniform distribution U(0, 1) is the foundation of random number generation and simulation
  • The probability integral transform: if X has CDF F, then F(X) ~ U(0, 1). Conversely, if U ~ U(0, 1), then F⁻¹(U) has CDF F.

Example

A subway train arrives at a station every 8 minutes. You arrive at the station at a random time. What is the probability that you wait between 2 and 5 minutes?

Your wait time X follows a Uniform(0, 8) distribution. P(2 ≤ X ≤ 5) = (5 - 2) / (8 - 0) = 3/8 = 0.375.

Result: P(2 ≤ X ≤ 5) = 0.375, or 37.5%

There is a 37.5% chance that your wait time is between 2 and 5 minutes. This follows directly from the equal probability property: the 3-minute window from 2 to 5 is 3/8 of the total 8-minute interval. Your expected wait time is (0 + 8)/2 = 4 minutes.

When to Use

  • When every value in a range is equally likely and there is no reason to favor any particular value (random arrival times, rounding errors)
  • As a non-informative prior distribution in Bayesian statistics when nothing is known about a parameter's value within a bounded range
  • For generating random samples from other distributions using the inverse transform method
  • When modeling measurement errors that are equally likely to be any value within a tolerance band

Common Mistakes

  • Confusing the continuous uniform distribution with the discrete uniform distribution. The discrete version assigns equal probability to a finite set of distinct values (like a fair die), while the continuous version covers an entire interval.
  • Forgetting that for a continuous distribution, P(X = c) = 0 for any single point c. Probability only applies to intervals.
  • Incorrectly computing the variance. A common error is using (b - a)/12 instead of (b - a)²/12.
  • Assuming a uniform distribution when data is actually concentrated near certain values. Always check with a histogram or other exploratory analysis.

Need Help with Distribution Problems?

Snap a photo of any distribution problem for instant step-by-step solutions.

Download StatsIQ

FAQs

Common questions about Continuous Uniform Distribution

This is called the inverse transform method. If U ~ Uniform(0, 1) and F is the CDF of your target distribution, then X = F⁻¹(U) has the desired distribution. For example, to generate exponential random variables with rate λ, compute X = -ln(1 - U)/λ. This works because of the probability integral transform theorem. It is the foundation of most random number generation in computer simulations.

The continuous uniform distribution U(a, b) assigns equal probability density to every point in the interval [a, b]. Individual points have zero probability; only intervals have positive probability. The discrete uniform distribution assigns equal probability 1/n to each of n distinct outcomes (like rolling a fair die: each face has P = 1/6). The mean formula is the same for both: (a + b)/2, but the variance formulas differ. For discrete: (n² - 1)/12 for values 1 to n.

The variance measures the average squared deviation from the mean. For U(a, b), Var(X) = E[X²] - (E[X])². Computing: E[X²] = ∫ from a to b of x²/(b-a) dx = (a² + ab + b²)/3, and (E[X])² = ((a+b)/2)² = (a² + 2ab + b²)/4. Subtracting: Var(X) = (a² + ab + b²)/3 - (a² + 2ab + b²)/4 = (b - a)²/12. The factor of 12 arises naturally from the integration and is not arbitrary.

Related Distributions

All Distributions