Uniform Distribution
Probability Distributions
Equal Probability Everywhere — Maximum Ignorance
The uniform distribution assigns equal probability density across an interval. It is the maximum entropy distribution — the most honest choice when you know nothing except the bounds.
- Random number generation — all PRNGs start with Uniform(0,1)
- Bayesian priors — "I have no prior information" → Uniform
- Rounding errors — modeling quantization noise
- Simulation — the source distribution for Monte Carlo methods
The uniform is the mother of all distributions — via the inverse transform, it births every other distribution.
Core Concepts
The continuous uniform distribution assigns equal probability density across an interval . It is the simplest continuous distribution and serves as the foundational building block from which all other continuous distributions can be derived via the inverse transform method.
DfUniform Distribution
A continuous random variable has a uniform distribution on if its probability density function is constant on and zero elsewhere. Written .
Formally, is if and only if for any measurable subset :
where denotes the Lebesgue measure (length) of .
PDF of Uniform Distribution
Here,
- =Lower bound of the interval
- =Upper bound of the interval
- =Constant density across [a, b]
ThUniform Distribution is the Maximum Entropy Distribution on [a, b]
Among all continuous distributions supported on with finite mean, the uniform distribution maximizes the differential entropy. That is, if is any other pdf on , then:
with equality if and only if .
Proof sketch: The differential entropy of the uniform is . For any other pdf on , by Gibbs' inequality (or KL divergence ):
Expanding: . Since is constant:
which equals .
Why It Matters
The uniform distribution is the foundation for random number generation. All pseudo-random number generators produce samples, and the inverse transform method converts these to any desired distribution: if is a CDF, then that distribution for .
Derivation of Mean and Variance
Uniform Mean and Variance
Here,
- =Interval endpoints
- =Midpoint of the interval
- =Variance depends on interval width
ThDerivation of E[X] and Var(X)
Mean:
Second moment:
Variance:
CDF and Its Properties
CDF of Uniform Distribution
Here,
- =Value at which to evaluate CDF
- =Interval endpoints
Linearity of the CDF
The CDF is linear in . This means: if , then for any . For example, the probability that falls in the left quarter of is exactly .
Higher Moments and Moment Generating Function
MGF of Uniform Distribution
Here,
- =Transform variable
- =Interval endpoints
ThDerivation of the MGF
From this, all moments follow by differentiation: . For instance:
nth Raw Moment (Closed Form)
Here,
- =Moment order
The Inverse Transform Method
ThInverse Transform Sampling Theorem
Let and let be any CDF with inverse (the quantile function). Then has CDF .
Proof: , since is uniform on and .
Worked Example: Generating Exponential Samples
To generate : its CDF is . Set and solve:
Since , we can simplify to . This is the standard method used in all statistical software.
Relationship to Other Distributions
- The order statistics of i.i.d. variables follow a Beta distribution: the -th order statistic is .
- The sum of i.i.d. variables follows the Irwin-Hall distribution, which approaches by the CLT.
- .
Specific Applications
- Random number generation — The is the source distribution for all Monte Carlo simulations and pseudo-random generators.
- Order statistics and ranking — The distribution of sorted uniform samples gives Beta distributions, used in nonparametric statistics.
- Bayesian noninformative priors — serves as a prior for probabilities in Bayesian inference (equivalent to ).
- Quantization and rounding errors — Modeling the distribution of continuous variables after discrete rounding.
Key Takeaways
Summary: Uniform Distribution
- Equal density across :
- Mean: midpoint , Variance:
- CDF is linear:
- Maximum entropy distribution on a bounded interval
- Foundation for random number generation via inverse transform method
- MGF:
- Order statistics of uniforms yield Beta distributions