The constant uniform distribution , also called rectangular distribution , continuous uniform distribution , or uniform distribution , is a constant probability distribution . It has a constant probability density over an interval . This is synonymous with the fact that all sub-intervals of the same length have the same probability.
![[from]](https://wikimedia.org/api/rest_v1/media/math/render/svg/9c4b788fc5c637e26ee98b45f89a5c08c85f7935)
The possibility of simulating the constant uniform distribution on the interval from 0 to 1 forms the basis for generating numerous randomly distributed random numbers using the inversion method or the rejection method .
definition
A continuous random variable is called uniformly distributed over the interval if the density function and distribution function are given as
![X](https://wikimedia.org/api/rest_v1/media/math/render/svg/68baa052181f707c662844a465bfeeb135e82bab)
![F (x)](https://wikimedia.org/api/rest_v1/media/math/render/svg/71a82805d469cdfa7856c11d6ee756acd1dc7174)
|
|
|
|
Often or is used as an abbreviation for the constant uniform distribution . In some formulas one also sees or as a designation for the distribution. The constant uniform distribution is completely described by its first two central moments, i.e. H. all higher moments can be calculated from expected value and variance.
![{\ mathcal U} (a, b)](https://wikimedia.org/api/rest_v1/media/math/render/svg/7db59725558a835be6944d93345f46a987a46b1e)
![{\ mathcal {SG}} (a, b)](https://wikimedia.org/api/rest_v1/media/math/render/svg/2029c7ee3a8587e4d35a72c3cb6ca3d4ee6d545d)
![{\ text {Equals}} (a, b)](https://wikimedia.org/api/rest_v1/media/math/render/svg/fc9707d7b2f20dd505168e6545b9ace307ee9621)
![{\ text {uniform}} (a, b)](https://wikimedia.org/api/rest_v1/media/math/render/svg/532e567aac56a07c6571caac88273c5cef3a22a9)
properties
Probabilities
The probability that an evenly distributed random variable lies in a sub-interval is equal to the ratio of the interval lengths:
![[from]](https://wikimedia.org/api/rest_v1/media/math/render/svg/9c4b788fc5c637e26ee98b45f89a5c08c85f7935)
![X](https://wikimedia.org/api/rest_v1/media/math/render/svg/68baa052181f707c662844a465bfeeb135e82bab)
![[c, d] \ subseteq [a, b]](https://wikimedia.org/api/rest_v1/media/math/render/svg/32c4b90060cfad2522da60caeab608de43226f6e)
-
.
Expected value and median
The expected value and the median of the constant uniform distribution are equal to the middle of the interval :
![[from]](https://wikimedia.org/api/rest_v1/media/math/render/svg/9c4b788fc5c637e26ee98b45f89a5c08c85f7935)
![{\ displaystyle \ operatorname {E} (X) = \ int \ limits _ {- \ infty} ^ {\ infty} xf (x) \, dx = {\ frac {1} {ba}} \ int \ limits _ {a} ^ {b} x \ cdot 1 \, dx = {\ frac {1} {2}} {\ frac {b ^ {2} -a ^ {2}} {ba}} = {\ frac { a + b} {2}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/454d02837940f0bd135f556c12b85d688d91c1fc)
-
.
Variance
The variance of the constant uniform distribution is
![{\ displaystyle {\ begin {aligned} \ operatorname {Var} (X) & = \ operatorname {E} (X ^ {2}) - \ left ({\ operatorname {E} (X)} \ right) ^ { 2} = {\ frac {1} {ba}} \ int \ limits _ {a} ^ {b} {x ^ {2} \ cdot 1 \, dx} - \ left ({\ frac {a + b} {2}} \ right) ^ {2} = {\ frac {1} {3}} {\ frac {b ^ {3} -a ^ {3}} {ba}} - \ left ({\ frac { a + b} {2}} \ right) ^ {2} \\ & = {\ frac {1} {12}} \ left ({4b ^ {2} + 4ab + 4a ^ {2} -3a ^ { 2} -6ab-3b ^ {2}} \ right) = {\ frac {1} {12}} (ba) ^ {2}. \ End {aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/55f4009a40e77886d2e534c13131cd70bc03af0c)
Standard deviation and other measures of variance
The standard deviation is obtained from the variance
-
.
The mean absolute deviation is , and the interquartile range is exactly twice as large. The uniform distribution is the only symmetrical distribution with monotonic density with this property.
![(ba) / 2](https://wikimedia.org/api/rest_v1/media/math/render/svg/1c5b6cf4b9cf4660045bb044ff59b829f335f784)
Coefficient of variation
The following results for the coefficient of variation :
-
.
symmetry
The constant uniform distribution is symmetrical around .
![{\ displaystyle {\ frac {a + b} {2}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1325e0aa44cdaf4b2e765a44c7109e6b9ed74e77)
Crookedness
The skew can be represented as
-
.
Bulge and excess
The bulge and the excess can also be represented as closed
![\ beta _ {2}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8d30285b40d7488ae6caef3beb7106142869fbea)
![\ gamma _ {2} = \ beta _ {2} -3](https://wikimedia.org/api/rest_v1/media/math/render/svg/cd967a16baf8b83f52a383bda39dcc1f1b7b3cc5)
-
or.
-
.
Moments
-th moment
|
|
-th central moment
|
|
Sum of uniformly distributed random variables
Distribution densities of the sum of up to 6 uniform distributions U (0.1)
The sum of two independent and continuously uniformly distributed random variables with the same carrier width is triangularly distributed , otherwise a trapezoidal distribution results. More accurate:
Let two random variables be independent and continuously evenly distributed, one on the interval , the other on the interval . Be and . Then their sum has the following trapezoidal distribution :
![[from]](https://wikimedia.org/api/rest_v1/media/math/render/svg/9c4b788fc5c637e26ee98b45f89a5c08c85f7935)
![[CD]](https://wikimedia.org/api/rest_v1/media/math/render/svg/d85b3b21d6d891d97f85e263d394e3c90287586f)
![\ alpha = \ min \ {dc, ba \}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d858191703c49abe808e36df16d118d8ab058a79)
![\ beta = \ max \ {dc, ba \}](https://wikimedia.org/api/rest_v1/media/math/render/svg/71c6d42e51f429d51c33b40adb8330e4b2b5b13d)
![{\ displaystyle f \ colon \ mathbb {R} \ to \ mathbb {R}, x \ longmapsto {\ begin {cases} 0 & x \ not \ in [a + c, b + d] \\ {\ frac {x} {\ alpha \ beta}} - {\ frac {a + c} {\ alpha \ beta}} & x \ in [a + c, a + c + \ alpha] \\ {\ frac {1} {\ beta}} & x \ in [a + c + \ alpha, a + c + \ beta] \\ {\ frac {b + d} {\ alpha \ beta}} - {\ frac {x} {\ alpha \ beta}} & x \ in [a + c + \ beta, b + d] \ end {cases}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/3873fa7a21bbd83e45689defa7c5dd2cf85458bf)
The sum of independent, uniformly distributed random variables on the interval [0; 1] is an Irwin-Hall distribution ; it approximates the normal distribution ( central limit theorem ).
An occasionally used method ( rule of twelve ) for the approximate generation of (standard) normally distributed random numbers works like this: one adds up 12 (independent) random numbers uniformly distributed over the interval [0,1] and subtracts 6 (this provides the correct moments, since the variance of a U (0,1) -distributed random variable is 1/12 and it has the expectation value 1/2).
Characteristic function
The characteristic function has the form
-
,
where represents the imaginary unit .
![i](https://wikimedia.org/api/rest_v1/media/math/render/svg/add78d8608ad86e54951b8c8bd6c8d8416533d20)
Moment generating function
The moment-generating function of the constant uniform distribution is
![m_ {X} (s) = {\ begin {cases} {\ frac {\ displaystyle e ^ {{bs}} - e ^ {{as}}} {\ displaystyle (ba) s}} & s \ neq 0 \ \ 1 & s = 0. \ End {cases}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1bdce73f3e1361e5d61eac80636d24a20cf38ede)
and especially for and![a = 0](https://wikimedia.org/api/rest_v1/media/math/render/svg/90d476e5e765a5d77bbcff32e4584579207ec7d8)
![m_ {X} (s) = {\ frac 1s} (e ^ {s} -1).](https://wikimedia.org/api/rest_v1/media/math/render/svg/4e1a86248b8dc2334b95dfbd5dad30342a93ecd9)
Relationship to other distributions
Relationship to the triangular distribution
The sum of two independent and continuously equally distributed random variables has a triangular distribution .
Relationship to beta distribution
If there are independent random variables that are constantly uniformly distributed, then the order statistics have a beta distribution . More precisely applies
![X_1, X_2, \ dotsc, X_n](https://wikimedia.org/api/rest_v1/media/math/render/svg/29f695cbbfd7caccec825add6601fa8ec884f2ee)
![X _ {{(1)}}, X _ {{(2)}}, \ dotsc, X _ {{(n)}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/869af91e085a75497220fb3211b66bac67c9dc93)
![X _ {{(k)}} \ sim B (k, n-k + 1)](https://wikimedia.org/api/rest_v1/media/math/render/svg/caaa1f26db50db7f4b585f6cc1193a66b94b2a90)
for .
![k = 1, \ dotsc, n](https://wikimedia.org/api/rest_v1/media/math/render/svg/3bb5dd7f3f51d1527d26a66075244a8bda35e4b6)
Simulation of distributions from the constant uniform distribution
With the inversion method, uniformly distributed random numbers can be converted into other distributions. If is a uniformly distributed random variable, then, for example, the
exponential distribution with the parameter is sufficient .
![X](https://wikimedia.org/api/rest_v1/media/math/render/svg/68baa052181f707c662844a465bfeeb135e82bab)
![Y = - {\ tfrac 1 \ lambda} \ ln (X)](https://wikimedia.org/api/rest_v1/media/math/render/svg/eb4ebe646a500ec236db1e50c6360ce02ade9b07)
![\ lambda](https://wikimedia.org/api/rest_v1/media/math/render/svg/b43d0ea3c9c025af1be9128e62a18fa74bedda2a)
Generalization to higher dimensions
The continuous uniform distribution can be from the interval in any measurable subsets of with Lebesgue measure generalize. Then you bet
![[from]](https://wikimedia.org/api/rest_v1/media/math/render/svg/9c4b788fc5c637e26ee98b45f89a5c08c85f7935)
![\Omega](https://wikimedia.org/api/rest_v1/media/math/render/svg/24b0d5ca6f381068d756f6337c08e0af9d1eeb6f)
![0 <\ lambda ^ {n} (\ Omega) <\ infty](https://wikimedia.org/api/rest_v1/media/math/render/svg/2a01123a4e51858d51ddd3faa0a0055d1726ac99)
![{\ mathcal {U}} _ {\ Omega} (A) = \ int _ {A} {\ frac {1} {\ lambda ^ {n} (\ Omega)}} \, dx = {\ frac {\ lambda ^ {n} (A)} {\ lambda ^ {n} (\ Omega)}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/678979198b693ade846bf42d7df752a193e00d01)
for measurable .
![A \ subseteq \ Omega](https://wikimedia.org/api/rest_v1/media/math/render/svg/d5d4ebbcaa2e17dc177807e3735798388bb6c4b3)
Discreet case
The uniform distribution is also defined on finite sets, then it is called discrete uniform distribution .
Example for the interval [0, 1]
Often it is and assumed, that is, considered. Then the density function on the interval is constant equal to 1 and the distribution function there applies . The expected value is accordingly , the variance and the standard deviation , whereby the latter two values also apply to any intervals of length 1. See also the section above, Sum of uniformly distributed random variables .
![a = 0](https://wikimedia.org/api/rest_v1/media/math/render/svg/90d476e5e765a5d77bbcff32e4584579207ec7d8)
![b = 1](https://wikimedia.org/api/rest_v1/media/math/render/svg/3f55bc77dec8088791b5c1ed51e634cc1b431fd0)
![{\ displaystyle X \ sim {\ mathcal {U}} (0,1)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b1c560e530cf75bc82ef9b5fc3a69624da5057f5)
![f](https://wikimedia.org/api/rest_v1/media/math/render/svg/132e57acb643253e7810ee9702d9581f159a1c61)
![[0.1]](https://wikimedia.org/api/rest_v1/media/math/render/svg/738f7d23bb2d9642bab520020873cccbef49768d)
![F (x) = x](https://wikimedia.org/api/rest_v1/media/math/render/svg/44e1cf18eb890214752fa45602f92cc8e8b85f89)
![{\ displaystyle E (X) = {\ tfrac {1} {2}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/61257e46c481aa1b44df869b1de6f5f49784faad)
![{\ displaystyle \ operatorname {Var} (X) = {\ tfrac {1} {12}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/acea0c1a4fd0089daa7aee9845f3939c385f947d)
![{\ displaystyle \ sigma (X) = {\ sqrt {\ tfrac {1} {12}}} = {\ tfrac {1} {6}} {\ sqrt {3}} \ approx 0 {,} 29}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5d6fab679f13847311f77fefa495601ce307d808)
![{\ displaystyle [a, a + 1]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b53692e0b256c365ff55b9d84ac933484c3c09f6)
Is a -distributed random variable, then is
![X](https://wikimedia.org/api/rest_v1/media/math/render/svg/68baa052181f707c662844a465bfeeb135e82bab)
![{\ displaystyle {\ mathcal {U}} (0,1)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/20e4f0d55bdc44c403908ad0509a6bb4f20fa2ad)
![{\ displaystyle Y = (ba) X + a}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0db232fc90a12ca80b834ee09419e2310bb3d30e)
-distributed.
See also
literature
Web links
Discrete univariate distributions
Continuous univariate distributions
Multivariate distributions