The Uniform Distribution is a probability distribution where all outcomes in an interval \([a, b]\) are equally likely. It is also called the rectangular distribution because its probability density function forms a rectangle.
It represents perfect randomness where all outcomes within a specified range are equally likely, serving as a cornerstone for random number generation and modeling fair processes.
| Symbol | Description |
|---|---|
| \(X \sim U(a,b)\) | A random variable X follows a uniform distribution on the interval [a, b]. |
| \(a, b\) | Parameters representing the lower and upper bounds of the distribution. |
| \(f(x)\) | The Probability Density Function, which is constant over [a, b]. |
| \(F(x)\) | The Cumulative Distribution Function, representing \(P(X \leq x)\). |
| \(\mu\) | The mean or expected value of the distribution. |
| \(\sigma^2\) | The variance of the distribution. |
The diagram of a continuous uniform distribution's probability density function (PDF) is a simple rectangle. The base of the rectangle lies on the x-axis and extends from the lower bound, \(a\), to the upper bound, \(b\). The height of the rectangle is constant at \(1/(b-a)\). The area of this rectangle is its width (b-a) times its height (1/(b-a)), which equals 1, as required for any PDF.
Constant Probability Density: The PDF is a constant value \(1/(b-a)\) for all outcomes within the interval \([a, b]\) and zero everywhere else. This gives it a characteristic rectangular shape.
Symmetry: The distribution is symmetric about its mean. The mean is the midpoint of the interval, \((a+b)/2\).
Maximum Entropy: Among all continuous distributions defined on a finite interval \([a, b]\), the uniform distribution has the highest entropy, meaning it represents the greatest uncertainty or lack of bias.
The mean (or expected value) \(E[X]\) of a continuous random variable is found by integrating the product of the variable \(x\) and its probability density function \(f(x)\) over its entire range.
For the uniform distribution \(U(a,b)\), the PDF \(f(x)\) is \(1/(b-a)\) inside the interval \([a, b]\) and 0 outside. Therefore, the integral is only non-zero over this interval.
We can pull the constant term \(1/(b-a)\) out of the integral and evaluate the integral of \(x\).
Now, substitute the bounds of the integral.
Using the difference of squares factorization, \(b^2 - a^2 = (b-a)(b+a)\), we can simplify the expression.
Computer Science & Simulations: The uniform distribution is the foundation for most random number generators. It is used in Monte Carlo simulations, randomized algorithms, cryptography, and for generating random variables from other, more complex distributions via the inverse transform method.
Quality Control: In manufacturing, if a machine produces components with a tolerance between a minimum and maximum value, and any value in that range is equally likely, the uniform distribution can model the variation.
Statistics and Machine Learning: It is often used as a non-informative prior in Bayesian statistics, representing a state of no prior knowledge about a parameter's value within a given range. It's also used in sampling techniques like bootstrap resampling.
Physics and Engineering: Used to model events where the exact timing or position is unknown but bounded, such as the position of a particle in a box in quantum mechanics or random arrival times in queuing theory.
Lottery Drawings: In a fair lottery where numbered balls are mixed in a machine, each ball has an equal chance of being selected. The selection of the first ball can be modeled by a discrete uniform distribution.
Digital Sampling: When an analog signal is digitized, the quantization error (the difference between the true analog value and the discrete digital value) is often modeled as having a uniform distribution over the range of one quantization step.
Waiting for a Train: If a train runs every 30 minutes and you arrive at the station at a random time without knowing the schedule, your waiting time is uniformly distributed between 0 and 30 minutes.
The uniform distribution is primarily classified into two types: continuous and discrete.
| Feature | Continuous Uniform Distribution | Discrete Uniform Distribution |
|---|---|---|
| Outcomes | Any real number in an interval \([a, b]\) | A finite set of integers, e.g., \({1, 2, ..., n}\) |
| Function | Probability Density Function (PDF) | Probability Mass Function (PMF) |
| Formula | \(f(x) = 1/(b-a)\) | \(P(X=k) = 1/n\) |
| Example | Random number generator between 0 and 1 | Rolling a fair six-sided die |
Special Case: The Standard Uniform Distribution is the continuous uniform distribution with parameters \(a=0\) and \(b=1\), denoted \(U(0,1)\). It is fundamental because random variates from any other continuous distribution can be generated using the inverse transform sampling method applied to a standard uniform random variable.
Forgetting the PDF is zero outside the interval. When calculating probabilities or expected values, always remember to use the bounds [a, b]. The probability of an event entirely outside this range is 0.
Calculating a non-zero probability for a single point. For any continuous distribution, including the uniform, the probability of the variable taking on a specific single value is always zero, i.e., P(X = c) = 0. Probability is only defined over intervals.
Confusing discrete and continuous variance formulas. The variance for a continuous uniform distribution is \((b-a)^2/12\), while for a discrete uniform distribution on integers from 1 to n, it is \((n^2-1)/12\). The formulas are similar but distinct.