EasyManua.ls Logo

Casio FX-CG20 AU - Random Extraction of List Data Elements (Ransamp#); Random Number Generation in Accordance with Binomial Distribution

Casio FX-CG20 AU
608 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2-20
u Random Number Generation in Accordance with Binomial Distribution
(RanBin#)
This function generates random integers in accordance with binomial distribution based on
values specified for the number of trials
n and probability p.
RanBin# (
n, p [,m]) 1 < n < 100000 1 < m < 999 0 < p < 1
Omitting a value for
m returns a generated random number as-is. Specifying a value for m
returns the specified number of random values in list form.
Example Operation
RanBin# (5, 0.5)
(Randomly produces the number of heads
that can be expected in accordance with
binomial distribution for five coin tosses
where the probability of heads is 0.5.)
K6(g)3(PROB)4(RAND)4(Bin)
5,0.5)w
RanBin# (5, 0.5, 3)
(Performs the same coin toss sequence
described above three times and displays
the results in a list.)
K6(g)3(PROB)4(RAND)4(Bin)
5,0.5,3)w
u Random Extraction of List Data Elements (RanSamp#)
This function randomly extracts elements from list data and returns the results in list format.
RanSamp# (List X,
n [,m])
List X ... Any list data (List 1 to List 26, Ans, {list format data}, sub-name)
n ... Number of tries (When m = 1, the number of elements is 1 < n < List X. When m = 0,
1 < n < 999.)
m ... m = 1 or 0 (When m = 1, each element is extracted only once. When m = 0, each
element can be extracted multiple times.)
m = 0 is used when the m setting is omitted.
Example Operation
List 1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
RanSamp# (List 1, 3, 1)
(Randomly extracts three elements from
List 1 and displays the result on the ListAns
screen.)
!*({)1,2,3,4,5,6,7,8
,9,10!/(})a!b(List)bw
K6(g)3(PROB)4(RAND)6(Samp)
!b(List)b,3,1)w
List 2 = {1, 3, 6, 7}
RanSamp# (List 2, 10)
(Randomly extracts 10 elements from List
2 and displays the result on the ListAns
screen. Elements are extracted repeatedly.)
!*({)1,3,6,7!/(})a
!b(List)cw
K6(g)3(PROB)4(RAND)6(Samp)
!b(List)c,10)w

Table of Contents

Related product manuals