Continuous probability distribution

Continuous Uniform distribution

X ~ Uniform(a, b)

Every value in the interval [a, b] is equally likely. It is the continuous analogue of the discrete uniform and the foundation of computer random-number generation.

Explore it interactively

Key facts

Notation
X ~ Uniform(a, b)
Type
continuous
Parameters
a, b — lower and upper bounds (a < b)
Support
[a, b]
PDF
f(x) = 1 / (b − a), for a ≤ x ≤ b
Mean
(a + b) / 2
Variance
(b − a)² / 12

When to use it

  • A random number in a fixed range
  • Rounding error
  • Arrival time within a known window

Related distributions