HP 39gs Master Manual page 191

Graphing calculator
Hide thumbs Also See for 39gs:
Table of Contents

Advertisement

Eg. 1
MAKELIST( X2,X,1,10,2) L1
produces { 1, 9, 25, 49, 81 } as X goes from 1 to 3 to 5 to ...
and also stores the result into
Eg. 2
MAKELIST(RANDOM,X,1,10,1)
The
in this case serves only as a counter since it does not appear in the expression.
X
Eg. 3
MAKELIST(3,X,1,10,2)
produces {3,3,3,3,3,3,3,3,3,3}.
The
function can also be used to simulate observations on random variables.
MAKELIST
For example, suppose we wish to simulate 10 Bernoulli trials with
p = 0.75. We can use the fact that a test like X<4 or Y>0.2 returns a
value of either 1 (if the test is true) or 0 (if the test is false).
Thus:
MAKELIST(RANDOM<0.75,X,1,10,1)
will return a list of 1's and 0's corresponding
to the simulated Bernoulli trials.
Various examples of this process are given in the Expert User section which immediately follows the chapter
on Univariate Statistics on page 121.
π
LIST(<list>)
This function returns the product of all the elements of a list.
Eg.
LIST({2,3,5})
POS(<list>,<num>)
This function conducts a search of a list. It returns the position in the list
of the first occurrence of the number you specify (see example right). It
is of more use to programmers, who will not know in advance what a list
contains.
If the number specified is not in the list it returns zero. If the value occurs in more than one place then only the
first position is reported. The value specified can be either a number (as shown) or a variable or an
expression to be evaluated.
.
L1
produces a set of 10 random numbers.
would return a value of 30.
191

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

40gs

Table of Contents