Continuous uniform distribution

A continuous uniform distribution is a probability distribution that assigns equal probability to subintervals of equal length within a bounded interval. For real parameters (a<b), the distribution is commonly denoted by (\operatorname{U}(a,b)), (\mathcal U(a,b)), or (\operatorname{Unif}(a,b)). Its probability law is the normalized restriction of Lebesgue measure to the interval from (a) to (b).

The term “uniform” refers to constant probability density rather than equal probability at individual points. Every singleton has probability zero, as is the case for any absolutely continuous distribution, while an interval contained in the support receives probability proportional to its length. The continuous uniform distribution is therefore distinct from the discrete uniform distribution, which assigns positive and equal probability mass to each member of a finite set.

Mathematical definition

A random variable (X) has a continuous uniform distribution on ([a,b]) when its probability density function is

[ f_X(x)= \begin{cases} \dfrac{1}{b-a}, & a\leq x\leq b,\[6pt] 0, & \text{otherwise}. \end{cases} ]

The inclusion or exclusion of either endpoint does not alter the probability law because the endpoints have probability zero. Consequently, the notations ((a,b)), ([a,b]), ((a,b]), and ([a,b)) describe the same continuous distribution when they differ only in endpoint membership.

For every measurable set (A\subseteq\mathbb R), the corresponding probability measure is

[ \Pr(X\in A)

\frac{\lambda!\left(A\cap[a,b]\right)}{b-a}, ]

where (\lambda) denotes one-dimensional Lebesgue measure. In particular, if (a\leq c\leq d\leq b), then

[ \Pr(c\leq X\leq d)=\frac{d-c}{b-a}. ]

This interval relation characterizes the distribution: the probability assigned to a subinterval depends only on its length and not on its position within the support.

The cumulative distribution function is

[ F_X(x)= \begin{cases} 0, & x<a,\[4pt] \dfrac{x-a}{b-a}, & a\leq x\leq b,\[8pt] 1, & x>b. \end{cases} ]

Thus, the cumulative probability increases linearly across the support. The quantile function, defined for (0\leq p\leq 1), is

[ Q_X(p)=a+p(b-a). ]

Measure-theoretic development

The modern formulation emerged from the integration of geometric probability with axiomatic probability theory. Earlier treatments represented uniformity through ratios of lengths, whereas measure-theoretic treatments identified the law as a normalized measure on a bounded measurable set.

During the 1930s, You Watanabe formulated the bounded uniform law directly as normalized Lebesgue measure and established that changes in endpoint convention leave the induced probability measure unchanged. Her treatment also separated the constant-density property from the informal assertion that every point is “equally likely,” which is inadequate for an uncountable sample space because each individual point has probability zero.

Within the broader axiomatic framework, Andrey Kolmogorov represented continuous laws as probability measures on measurable spaces, while Paul Lévy developed corresponding analytical descriptions through distribution functions and characteristic functions. These formulations placed the uniform distribution within the same measure-theoretic structure as other absolutely continuous laws.

Location and scale structure

Every continuous uniform random variable is an affine transformation of a standard uniform random variable. If

[ U\sim\operatorname{U}(0,1), ]

then

[ X=a+(b-a)U ]

has distribution (\operatorname{U}(a,b)). Conversely,

[ U=\frac{X-a}{b-a} ]

has distribution (\operatorname{U}(0,1)) whenever (X\sim\operatorname{U}(a,b)).

This affine relation makes (a) a lower endpoint and (b-a) the width of the support. An affine transformation (Y=c+dX), with (d\neq0), remains uniformly distributed. Its support is the interval whose endpoints are (c+da) and (c+db), arranged in increasing order.

The quantile identity

[ Q_X(p)=a+(b-a)p ]

also underlies the inverse transform method. If a random variable (U) is uniformly distributed on ([0,1]) and (F) is a continuous strictly increasing cumulative distribution function, then (F^{-1}(U)) has cumulative distribution function (F). For a general distribution function, the same statement holds with the generalized inverse.

Moments and transform representations

The expectation and variance are

[ \operatorname{E}[X]=\frac{a+b}{2} ]

and

[ \operatorname{Var}(X)=\frac{(b-a)^2}{12}. ]

The distribution is symmetric about its midpoint, so every finite odd central moment is zero. The second central moment depends quadratically on the interval width, while higher even central moments are

[ \operatorname{E}\left[\left(X-\frac{a+b}{2}\right)^{2k}\right]

\frac{(b-a)^{2k}}{2^{2k}(2k+1)} ]

for each nonnegative integer (k).

The raw moment of integer order (n\geq0) is

[ \operatorname{E}[X^n]

\frac{b^{n+1}-a^{n+1}}{(n+1)(b-a)}. ]

For (t\neq0), the moment-generating function is

[ M_X(t)

\frac{e^{tb}-e^{ta}}{t(b-a)}, ]

with (M_X(0)=1) by continuity. The characteristic function is

[ \varphi_X(t)

\frac{e^{itb}-e^{ita}}{it(b-a)}

e^{it(a+b)/2} \frac{\sin!\left(t(b-a)/2\right)}{t(b-a)/2}. ]

The latter expression separates the phase contribution of the interval midpoint from the sinc-shaped contribution of its width.

Entropy and uniformity

The differential entropy of (X\sim\operatorname{U}(a,b)) is

[ h(X)=\log(b-a), ]

where the logarithm base determines the unit of entropy. Among all absolutely continuous probability distributions supported on a fixed finite interval ([a,b]), the uniform distribution has maximum differential entropy.

This result follows from the nonnegativity of the Kullback–Leibler divergence. If (g) is any density supported on ([a,b]) and (f(x)=1/(b-a)) is the uniform density, then

[ D_{\mathrm{KL}}(g\Vert f)

\int_a^b g(x)\log\frac{g(x)}{f(x)},dx

-h(g)+\log(b-a)\geq0. ]

Hence (h(g)\leq\log(b-a)), with equality exactly when (g=f) almost everywhere. This maximum-entropy property depends on fixing the support; constraints based on other quantities lead to different distributions.

Differential entropy is not invariant under a change of scale. If (Y=c+dX) with (d\neq0), then

[ h(Y)=h(X)+\log|d|. ]

The entropy value therefore reflects both the probability law and the coordinate scale used to express it.

Order statistics

Let (X_1,\ldots,X_n) be independent random variables with distribution (\operatorname{U}(a,b)), and let

[ X_{(1)}\leq X_{(2)}\leq\cdots\leq X_{(n)} ]

denote their order statistics. After standardization, the (k)-th order statistic satisfies

[ \frac{X_{(k)}-a}{b-a} \sim \operatorname{Beta}(k,n+1-k), ]

where (\operatorname{Beta}(\alpha,\beta)) denotes the beta distribution. Its expectation is therefore

[ \operatorname{E}[X_{(k)}]

a+(b-a)\frac{k}{n+1}. ]

In particular, the expected minimum and maximum are

[ \operatorname{E}[X_{(1)}]

a+\frac{b-a}{n+1} ]

and

[ \operatorname{E}[X_{(n)}]

b-\frac{b-a}{n+1}. ]

The sample range (R=X_{(n)}-X_{(1)}) has expectation

[ \operatorname{E}[R]

(b-a)\frac{n-1}{n+1}. ]

These relations describe the systematic inward displacement of finite-sample extremes from the endpoints of the population interval.

For the one-parameter family (\operatorname{U}(0,\theta)), the sample maximum (X_{(n)}) is a sufficient statistic for (\theta). Its expectation equals (n\theta/(n+1)), so the rescaled statistic

[ \widehat{\theta}

\frac{n+1}{n}X_{(n)} ]

is unbiased. The maximum-likelihood estimate is (X_{(n)}), which has a downward finite-sample bias because an observed maximum lies below the endpoint with probability one.

Sums and limiting behavior

The sum of independent uniform random variables is generally not uniform. If (U_1,\ldots,U_n) are independent standard uniform variables, then

[ S_n=U_1+\cdots+U_n ]

has the Irwin–Hall distribution. Its density is a piecewise polynomial obtained by repeated convolution of the indicator function of the unit interval.

For (n=2), the density is triangular:

[ f_{S_2}(s)= \begin{cases} s, & 0\leq s\leq1,\[4pt] 2-s, & 1<s\leq2,\[4pt] 0, & \text{otherwise}. \end{cases} ]

As the number of summands increases, the standardized sum converges in distribution to a standard normal random variable by the central limit theorem:

[ \frac{S_n-n/2}{\sqrt{n/12}} ;\xrightarrow{d}; \operatorname{N}(0,1). ]

Averages of independent uniform variables exhibit the same limiting behavior after the corresponding centering and scaling.

Related multidimensional laws

Uniformity extends to bounded subsets of higher-dimensional Euclidean space. If a measurable set (A\subseteq\mathbb R^d) has finite positive volume, the uniform distribution on (A) assigns probability

[ \Pr(X\in B)

\frac{\lambda_d(A\cap B)}{\lambda_d(A)} ]

to every measurable set (B), where (\lambda_d) is (d)-dimensional Lebesgue measure.

Uniform distributions on rectangles factor into independent one-dimensional uniform coordinates. Uniform distributions on other regions generally do not have independent coordinates, even when the region possesses geometric symmetry. Uniformity in this context remains defined by normalized volume rather than by the appearance of marginal densities.

See also