Uniform Distribution
What is the uniform distribution?
The continuous uniform distribution (or simply, the uniform distribution) is used to find the probability of choosing any number at random in an interval (a, b). It is also commonly used for generating random numbers and simulating data. The probability is the same over the entire interval and zero elsewhere. This distribution is also sometimes called the rectangular distribution.
What are some examples of the uniform distribution?
Some examples of a uniform distribution are:
- Randomly generated numbers in a specified interval.
- Waiting times for events that happen on a predictable interval.
In statistical hypothesis testing, the distribution of a p-value over multiple samples when the null hypothesis is true follows a uniform distribution in many common situations.
When should I use a uniform distribution?
The uniform distribution is useful in modeling continuous data where every interval of the same length has the same probability of occurrence. The endpoints of the range of the distribution are fixed, and the probability of choosing a number in the interval e.g., (0, 1) that is less than a number x is the number x.
The discrete uniform distribution is used when picking a number in a finite set of numbers. The beta distribution with parameters $\alpha$ = 0.5 and $\beta$ = 0.5 is a uniform distribution on (0, 1).
Characteristics of a uniform distribution
| Model parameters | $a$, minimum of the interval $b$, maximum of the interval |
| Mass function | $p(X = x) = \frac{1}{b - a},\ a < x < b$ |
| Mean | $\frac{(a + b)}{2}$ |
| Variance | $\frac{(b - a)^2}{12}$ |
The graph below shows a continuous uniform distribution for the interval (a, b) where the probability for any number in the interval is the reciprocal of the difference between the high and low end of the interval.