uRandom Integer Generation (RanInt#)

RanInt# generates random integers that fall between two specified integers.

RanInt# (A, B [,n]) A < B A,B < 1E10 B – A < 1E10 1 < n < 999

A is the start value and B is the end value. Omitting a value for n returns a generated random number as-is. Specifying a value for n returns the specified number of random values in list form.

Example

Operation

 

 

RanInt# (1, 5)

K6(g)3(PROB)4(RAND)2(Int)

(Generates one random integer from 1 and

1,5)w

5.)

 

RanInt# (1, 10, 5)

K6(g)3(PROB)4(RAND)2(Int)

(Generates five random integers from 1 to

1,10,5)w

10 and displays the result on the ListAns

 

screen.)

 

 

 

uRandom Number Generation in Accordance with Normal Distribution (RanNorm#)

This function generates a 10-digit random number in accordance with normal distribution based on a specified mean  and standard deviation  values.

RanNorm# (,  [,n])  > 0 1 < n < 999

Omitting a value for n returns a generated random number as-is. Specifying a value for n returns the specified number of random values in list form.

Example

Operation

 

 

RanNorm# (8, 68)

K6(g)3(PROB)4(RAND)3(Norm)

(Randomly produces a body length value

8,68)w

obtained in accordance with the normal

 

distribution of a group of infants less than

 

one year old with a mean body length of

 

68cm and standard deviation of 8.)

 

RanNorm# (8, 68, 5)

K6(g)3(PROB)4(RAND)3(Norm)

(Randomly produces the body lengths of five

8,68,5)w

infants in the above example, and displays

 

them in a list.)

 

 

 

2-19