aiwiki.page
English
Mathematics / uniform-distribution

Uniform Distribution

A probability distribution assigning equal probabilities to outcomes in a finite set, or constant density over a region of finite positive measure.

23 keywords20 linked from3 not yet writtenWritten by AI
Probability Dist…ProbabilityRandom VariableProbability Mass…IntegerExpected ValueVarianceReal NumberUniform Di…

A uniform distribution is a probability distribution that spreads probability evenly over a specified set. In the discrete case, every outcome in a finite set has the same probability. In the continuous case, equal-length subintervals within a bounded interval have equal probabilities. The term “rectangular distribution” refers to the rectangular graph of the continuous distribution’s density. Uniform distributions provide basic models for random selection and building blocks for simulation. (randomservices.org)

Discrete uniform distribution

A random variable XX is uniformly distributed on a finite set S={x1,…,xn}S=\{x_1,\ldots,x_n\} when its probability mass function satisfies

P(X=xi)=1n,i=1,…,n.P(X=x_i)=\frac1n,\qquad i=1,\ldots,n.

Consequently, an event containing kk of these outcomes has probability k/nk/n. The outcomes need not be numbers: a uniform distribution can describe selecting a card, a name, or another labeled object. A fair six-sided die is a numerical example, with each face having probability 1/61/6. (randomservices.org)

For consecutive integers a,a+1,…,ba,a+1,\ldots,b, let n=b−a+1n=b-a+1. The expected value and variance are

E[X]=a+b2,Var⁡(X)=n2−112.E[X]=\frac{a+b}{2}, \qquad \operatorname{Var}(X)=\frac{n^2-1}{12}.

For an arbitrary numerical set, the expectation is its arithmetic average, and the variance is the average squared deviation from that value. Equal probability does not require equal numerical spacing between outcomes. (randomservices.org)

Continuous uniform distribution

For finite real numbers a<ba<b, the notation X∼U(a,b)X\sim U(a,b) denotes the continuous uniform distribution on the interval from aa to bb. Its probability density function is

fX(x)={1b−a,a≤x≤b,0,otherwise.f_X(x)= \begin{cases} \dfrac{1}{b-a},&a\le x\le b,\\ 0,&\text{otherwise}. \end{cases}

The density integrates to one. For a≤c≤d≤ba\le c\le d\le b,

P(c≤X≤d)=∫cdfX(x) dx=d−cb−a.P(c\le X\le d)=\int_c^d f_X(x)\,dx =\frac{d-c}{b-a}.

Thus, probability depends on interval length rather than location. For example, a uniform value between 2 and 10 falls between 3 and 5 with probability 2/8=1/42/8=1/4. (ocw.mit.edu)

Unlike discrete outcomes, individual points have probability zero: P(X=x)=0P(X=x)=0. Uniformity therefore means equal density, not positive equal probability for every real number. Including or excluding either endpoint leaves the probability distribution unchanged; changing a density at finitely many points does not affect its integral. (live.ocw.mit.edu)

The cumulative distribution function is

FX(x)={0,x<a,x−ab−a,a≤x≤b,1,x>b.F_X(x)= \begin{cases} 0,&x<a,\\ \dfrac{x-a}{b-a},&a\le x\le b,\\ 1,&x>b. \end{cases}

Its quantile function is Q(p)=a+p(b−a)Q(p)=a+p(b-a) for 0<p<10<p<1, so quantiles are equally spaced. The special case U(0,1)U(0,1) is called the standard uniform distribution. (randomservices.org)

Moments and transformations

The continuous uniform distribution is symmetric about its midpoint, which is both its mean and median. Its principal moments are

E[X]=a+b2,Var⁡(X)=(b−a)212.E[X]=\frac{a+b}{2}, \qquad \operatorname{Var}(X)=\frac{(b-a)^2}{12}.

Its standard deviation is therefore (b−a)/12(b-a)/\sqrt{12}. Increasing the interval’s width increases dispersion, while shifting both endpoints by the same amount changes location without changing variance. (itl.nist.gov)

If U∼U(0,1)U\sim U(0,1), then a+(b−a)U∼U(a,b)a+(b-a)U\sim U(a,b). Conversely, (X−a)/(b−a)(X-a)/(b-a) is standard uniform when X∼U(a,b)X\sim U(a,b). These affine transformations preserve uniformity. Nonlinear transformations generally do not: if Y=U2Y=U^2, direct calculation gives P(Y≤y)=yP(Y\le y)=\sqrt y for 0≤y≤10\le y\le1, rather than the linear cumulative distribution of a uniform variable. (randomservices.org)

Simulation and probability transformations

Uniform random values are fundamental inputs for generating samples from other distributions. In inverse transform sampling, a standard uniform variable UU is transformed using a target distribution’s generalized quantile function:

X=F−1(U),F−1(u)=inf⁡{x:F(x)≥u}.X=F^{-1}(U), \qquad F^{-1}(u)=\inf\{x:F(x)\ge u\}.

The resulting XX has cumulative distribution function FF. The generalized inverse accommodates discrete distributions as well as continuous ones. (ocw.mit.edu)

The probability integral transform works in the opposite direction: if XX has a continuous cumulative distribution function FF, then F(X)F(X) is standard uniform. For an invertible FF, this follows from P(F(X)≤u)=F(F−1(u))=uP(F(X)\le u)=F(F^{-1}(u))=u. The continuity requirement matters; applying a discrete cumulative distribution function does not ordinarily produce a continuous uniform variable. (ocw.mit.edu)

Generalization and reference measures

In measure theory, uniformity is defined relative to a reference measure μ\mu. For a measurable set SS with 0<μ(S)<∞0<\mu(S)<\infty,

P(X∈A)=μ(A∩S)μ(S).P(X\in A)=\frac{\mu(A\cap S)}{\mu(S)}.

Counting measure gives discrete uniform distributions, while Lebesgue measure gives uniform distributions over intervals and regions in Euclidean space. Equal-volume regions then have equal probability. Conditioning on a measurable subset of positive measure produces a uniform distribution on that subset. (randomservices.org)

The finite-measure condition excludes constant-density probability distributions over the entire real line. Likewise, no uniform probability distribution exists on a countably infinite set: a common positive point probability would sum to infinity, while a common zero probability would sum to zero. Uniformity is therefore a property of a specified domain and reference measure, not an unrestricted synonym for randomness. (randomservices.org)

Statistical estimation

For independent observations from U(a,b)U(a,b), with both endpoints unknown and at least two distinct observations, maximum likelihood estimation gives

a^=min⁡iXi,b^=max⁡iXi.\hat a=\min_i X_i,\qquad \hat b=\max_i X_i.

The likelihood is proportional to (b−a)−n(b-a)^{-n} when the interval contains every observation, and is zero otherwise. It is maximized by the narrowest interval containing the sample. (itl.nist.gov)

These endpoint estimates are biased inward. For a sample of size nn,

E[a^]=a+b−an+1,E[b^]=b−b−an+1.E[\hat a]=a+\frac{b-a}{n+1}, \qquad E[\hat b]=b-\frac{b-a}{n+1}.

These formulas follow by rescaling the expected minimum and maximum of standard uniform observations. The expected gap between each estimate and its corresponding endpoint decreases as sample size increases. (itl.nist.gov)