Combination (C) C
Obtains the total number of r -combinations from set n .
Syntax: n C r n , r = integers
Random Number (0 to 1) Ran#
Each execution returns a 10 digit random number (from 0 to 1).
Syntax: Ran# [ a ] 1 ≤ a ≤ 9 ( a = integer)
• a : Specifies the random number sequence. If omitted, a true random number is returned. If specified, the
corresponding calculator random number sequence is invoked, and a fixed random number is returned. For
example, executing Ran# 1 after initializing the sequences
1 in order (0.701320948, 0.9297706456, 0.2939058016, ...)
* To initialize the sequences, execute Ran# 0. This also initializes the sequences in RanList#. The sequences
can also be initialized by using Ran# or RanList# to generate a series of random numbers that is different
from the last executed series or by generating a true random number.
Random Integer (n to m) RanInt#(,)
Generates an integer random number between two specified integers n and m .
Syntax: RanInt#( n , m [, a ]) n < m , | n | < 1×10
• a : Specifies the number of random numbers. If omitted, one random number is returned. If specified, returns
the specified number of random numbers in list form.
Random Number (Normal) RanNorm#(,)
Uses normal distribution to generate a 10-digit random number based on the specified mean μ and standard
deviation σ .
Syntax: RanNorm#( σ , μ [, n ]) σ > 0, 1 ≤ n ≤ 999
• n : Specifies the number of random numbers. If omitted, one random number is returned. If specified, returns
the specified number of random numbers in list form.
Example:
To generate a random number of height values obtained according to a normal distribution for a
group of children less than one year old with a mean height of 68 cm. Assume that the standard
deviation is 8: RanNorm#(8,68)
Random Number (Binomial) RanBin#(,)
Uses binomial distribution based on the specified number of trials n , and the value of probability p to generate
a random integer.
Syntax: RanBin#( n , p [, m ]) 1 ≤ n ≤ 100000, 1 ≤ m ≤ 999, 0 ≤ p ≤ 1
• m : Specifies the number of random numbers. If omitted, one random number is returned. If specified, returns
the specified number of random numbers in list form.
Random Num (0 to 1) to List RanList#()
Each execution returns, in list form, the specified number of random numbers (0 to 1, 10 digits).
Syntax: RanList#( n [, a ]) 1 ≤ a ≤ 9, 1 ≤ n ≤ 999 ( a , n = integers)
• n : Specifies the number of trials. This parameter specifies the number of random numbers to be generated.
• a : Same as Ran#.
Example:
(Immediately after Ran# 0 is executed) RanList#(3,1) =
{0.701320948,0.9297706456,0.2939058016}
Random Sample from List RanSamp#(,)
Randomly samples elements from a list and returns the result in list form.
Syntax: RanSamp#(List, n [, m ])
• List: A list variables (List 1 through List 26 or List Ans)
* List variables can also be specified using
• n : Number of trials (1 ≤ n ≤ 999 when m = 0, 1 ≤ n ≤ number of elements in List when m = 1)
• m : Specifies 0 or 1 (0 when omitted). When m = 0, each element can be extracted multiple times. When m
= 1, each element can be extracted only once.
Example:
To extract two random elements from {1,3,6,7}: RanSamp#({1,3,6,7},2,1)
To extract five random elements from {1,3,6,7}: RanSamp#({1,3,6,7},5)
*
always returns random numbers from Sequence
10
10
, | m | < 1×10
, m ‒ n < 1×10
*
or a list
sub-names (page
27).
225
10
, 1 ≤ a ≤ 999
Need help?
Do you have a question about the CLASSWIZ CG and is the answer not in the manual?
Questions and answers