Previous Up Next

7.4.13  The uniform distribution

The probability density function for the uniform distribution: uniform uniformd

Given two values a and b with a < b, the uniform distribution on [a,b] has density function 1/(ba) for x in [a,b]. The uniform (or uniformd) command will compute this; uniform(a,b,x) = 1/(ba). If you enter

uniform(2.2,3.5,2.8)

you will get

0.769230769231

The cumulative distribution function for the uniform distribution: uniform_cdf uniformd_cdf

Given two values a and b with a <b, the cumulative distribution function for the uniform distribution on [a,b] is (for x in [a,b]) uniform_cdf(a,b,x) = Prob(Xx) = (xa)/(ba). If you enter

uniform_cdf(2,4,3.2)

you will get

0.6

With an extra argument y in [a,b], uniform_cdf will compute uniform_cdf(a,b,x,y) = Prob(xXy) = (yx)/(ba). If you enter

uniform_cdf(2,4,3,3.2)

you will get

0.1

The inverse distribution function for the uniform distribution: uniform_icdf uniformd_icdf

Given a value h, the inverse distribution function for a uniform distribution is the value of x with Prob(Xx) = uniform_cdf(a,b,x) = h. This value is computed with the uniform_icdf command. If you enter

uniform_icdf(2,3,.6)

you will get

2.6

Previous Up Next