Difference between revisions of "Uniform distribution"

Line 11: Line 11:
 
If you set optional parameter Integer as true, it returns a discrete uniform distribution over the integers between a and b. For example:
 
If you set optional parameter Integer as true, it returns a discrete uniform distribution over the integers between a and b. For example:
 
  Uniform(1,100,Integer:True)
 
  Uniform(1,100,Integer:True)
is a discrete distribution where each integer 1, 2, .., 99, 100 has an equal probability of 1%.
+
is a discrete distribution where each integer 1, 2, .., 99, 100 has an equal probability of 1%.
 +
 
 +
If you want a discrete uniform distribution over each value of an index I, use Chancedist:
 +
ChanceDist(1/Size(I), I)
  
 
Like most distributions, you may use the Over parameter to generate an array of independent distributions for each combination of indexes.  For example:
 
Like most distributions, you may use the Over parameter to generate an array of independent distributions for each combination of indexes.  For example:
Line 20: Line 23:
 
==== Declaration ====
 
==== Declaration ====
  
  Uniform( min : numeric=0 ; max:numeric=1 ; integer:boolean=false ; over : ... optional atomic)
+
  Uniform(min: Numeric=0; max: Numeric=1; integer: Boolean=false; over: ... Optional Atomic)

Revision as of 02:39, 29 August 2007

Function Uniform(x, y)

Returns a variable with a uniform distribution between numbers x and y. For example,

Uniform(a, b)

is a continuous distribution in which all real numbers between a and b are equally probable.

If you omit x and y, it returns a unit uniform between 0 and 1.

[New to 4.0] If you set optional parameter Integer as true, it returns a discrete uniform distribution over the integers between a and b. For example:

Uniform(1,100,Integer:True)

is a discrete distribution where each integer 1, 2, .., 99, 100 has an equal probability of 1%.

If you want a discrete uniform distribution over each value of an index I, use Chancedist:

ChanceDist(1/Size(I), I)

Like most distributions, you may use the Over parameter to generate an array of independent distributions for each combination of indexes. For example:

Uniform(Over: I, J)

returns an independent Uniform(0,1) distribution for each combination of values in indexes I and J.

Declaration

Uniform(min: Numeric=0; max: Numeric=1; integer: Boolean=false; over: ... Optional Atomic)
Comments


You are not allowed to post comments.