TOPICS
Search

Uniform Distribution


A uniform distribution, sometimes also known as a rectangular distribution, is a distribution that has constant probability.

UniformDistribution

The probability density function and cumulative distribution function for a continuous uniform distribution on the interval [a,b] are

P(x)={0 for x<a; 1/(b-a) for a<=x<=b; 0 for x>b
(1)
D(x)={0 for x<a; (x-a)/(b-a) for a<=x<=b; 1 for x>b.
(2)

These can be written in terms of the Heaviside step function H(x) as

P(x)=(H(x-a)-H(x-b))/(b-a)
(3)
D(x)=((x-a)H(x-a)-(x-b)H(x-b))/(b-a),
(4)

the latter of which simplifies to the expected D(x)=(x-a)/(b-a) for a<x<b.

The continuous distribution is implemented as UniformDistribution[a, b].

For a continuous uniform distribution, the characteristic function is

 phi(t)=2/((b-a)t)sin[1/2(b-a)t]e^(i(a+b)t/2).
(5)

If a=0 and b=1, the characteristic function simplifies to

phi(t)=(2sin(1/2t)e^(it/2))/t
(6)
=(i-icost+sint)/t.
(7)

The moment-generating function is

M(t)=<e^(xt)>
(8)
=int_a^b(e^(xt))/(b-a)dx=[(e^(xt))/(t(b-a))]_a^b
(9)
={(e^(tb)-e^(ta))/(t(b-a)) for t!=0; 1 for t=0,
(10)

and

M^'(t)=1/(b-a)[1/t(be^(bt)-ae^(at))-1/(t^2)(e^(bt)-e^(at))]
(11)
=(e^(bt)(bt-1)-e^(at)(at-1))/((b-a)t^2).
(12)

The moment-generating function is not differentiable at zero, but the moments can be calculated by differentiating and then taking lim_(t->0). The raw moments are given analytically by

mu_n^'=int_(-infty)^infty(H(x-a)-H(x-b))/(b-a)x^ndx
(13)
=int_a^b(x^n)/(b-a)dx
(14)
=(b^(n+1)-a^(n+1))/((n+1)(b-a)).
(15)

The first few are therefore given explicitly by

mu_1^'=1/2(a+b)
(16)
mu_2^'=1/3(a^2+ab+b^2)
(17)
mu_3^'=1/4(a+b)(a^2+b^2)
(18)
mu_4^'=1/5(a^4+a^3b+a^2b^2+ab^3+b^4).
(19)

The central moments are given analytically by

mu_n^'=int_(-infty)^infty(H(x-a)-H(x-b))/(b-a)[x-1/2(a+b)]^ndx
(20)
=int_a^b([x-1/2(a+b)]^n)/(b-a)dx
(21)
=((a-b)^n+(b-a)^n)/(2^(n+1)(n+1)).
(22)

The first few are therefore given explicitly by

mu_1=0
(23)
mu_2=1/(12)(b-a)^2
(24)
mu_3=0
(25)
mu_4=1/(80)(b-a)^4.
(26)

The mean, variance, skewness, and kurtosis excess are therefore

mu=1/2(a+b)
(27)
sigma^2=1/(12)(b-a)^2
(28)
gamma_1=0
(29)
gamma_2=-6/5.
(30)

See also

Continuous Distribution, Discrete Uniform Distribution, Equidistributed Sequence, Random Number, Rectangle Function, Triangular Distribution, Uniform Difference Distribution, Uniform Product Distribution, Uniform Ratio Distribution, Uniform Sum Distribution Explore this topic in the MathWorld classroom

Explore with Wolfram|Alpha

References

Beyer, W. H. CRC Standard Mathematical Tables, 28th ed. Boca Raton, FL: CRC Press, pp. 531 and 533, 1987.

Referenced on Wolfram|Alpha

Uniform Distribution

Cite this as:

Weisstein, Eric W. "Uniform Distribution." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/UniformDistribution.html

Subject classifications