Continuous Uniform Distribution
The continuous uniform distribution, also known as the rectangular distribution, is a probability distribution that has constant probability over a given interval. It is defined by two parameters: the minimum value and the maximum value.
Definition
The continuous uniform distribution is defined over the interval
The cumulative distribution function (CDF) is given by:
The parameters must satisfy the condition
Applications
Random number generation uses the uniform distribution as a basis for generating other distributions.
Quantization noise in digital signal processing is often modeled as uniformly distributed.
Game theory uses it to model random strategies when all options are equally viable.
Statistical testing employs it for generating null distributions.
Properties
Property | Value |
---|---|
Mean | |
Variance | |
Skewness | 0 |
Excess Kurtosis | |
Median | |
Mode | Any value in |
Entropy |
Notable properties include:
The characteristic function is
.The distribution has constant probability density over its support.
The distribution is symmetric about its mean.
Relationships to Other Distributions
The uniform distribution is a special case of the beta distribution with parameters
.It is the maximum entropy distribution for a bounded interval with no other constraints.
The sum of uniform random variables approaches a normal distribution by the central limit theorem.
The ContinuousUniformDistribution class
The uniform distribution is implemented by the ContinuousUniformDistribution class. It has three constructors. The first constructor takes no arguments. It creates the standard uniform distribution over the interval
The following constructs the uniform distribution over the interval
var uniform1 = new ContinuousUniformDistribution();
var uniform2 = new ContinuousUniformDistribution(1.0);
var uniform3 = new ContinuousUniformDistribution(0.0, 1.0);
The ContinuousUniformDistribution class has two specific properties, LowerBound and UpperBound, which return the lower and upper limits of the distribution.
ContinuousUniformDistribution has one static (Shared in Visual Basic) method, Sample, which generates a random sample using a user-supplied uniform random number generator. The second and third parameters are the minimum and maximum values of the distribution.
var random = new Pcg32();
double sample = ContinuousUniformDistribution.Sample(random, 0.0, 1.0);
The above example uses the Pcg32 class to generate uniform random numbers.
References
For more information on the uniform distribution, refer to the following sources:
Johnson, N. L., Kotz, S., & Balakrishnan, N. (1994). "Continuous Univariate Distributions, Volume 2", Chapter 26. Wiley Series in Probability and Statistics.
Forbes, C., Evans, M., Hastings, N., & Peacock, B. (2011). "Statistical Distributions", Chapter 41. Wiley Series in Probability and Statistics.
Evans, M., Hastings, N., & Peacock, B. (2000). Statistical Distributions. Wiley-Interscience.