The Continuous Uniform Distribution or Rectangular
Distribution is a family of symmetric, continuous probability distributions such that for each member of the family, all
intervals of the same length on the distribution are equally probable.
Assumptions
a and b are real numbers, the minimum and maximum values, with a < b; a may be thought of as a location parameter,
(b - a) as a scale parameter.
Use
mctad.uniform(a, b)
Inline Comments
mctad.uniform=function(a,b){
Check that a < b.
if(a>=b){returnundefined;}vardfs={mean:(a+b)/2,median:(a+b)/2,mode:undefined,// not clear what to return, as any value in [a, b] is modalvariance:Math.pow(b-a,2)/12,skewness:0,entropy:Math.log(b-a),domain:{min:a,max:b},range:{min:0,max:Infinity},
mctad.uniform(10, 20).generate(100) will generate an Array of 100
random variables, distributed uniformly between 10 and 20, inclusive.
Uniform Distribution (Continuous)
The Continuous Uniform Distribution or Rectangular Distribution is a family of symmetric, continuous probability distributions such that for each member of the family, all intervals of the same length on the distribution are equally probable.
Assumptions
a
andb
are real numbers, the minimum and maximum values, with a < b; a may be thought of as a location parameter, (b - a) as a scale parameter.Use
mctad.uniform(a, b)
Inline Comments