EasyManuals Logo

HP 39gs Master Guide

HP 39gs
366 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #191 background imageLoading...
Page #191 background image
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
L1.
Eg. 2
MAKELIST(RANDOM,X,1,10,1) produces a set of 10 random numbers.
The
X in this case serves only as a counter since it does not appear in the expression.
Eg. 3
MAKELIST(3,X,1,10,2)
produces {3,3,3,3,3,3,3,3,3,3}.
The
MAKELIST function can also be used to simulate observations on random variables.
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.
LIST({2,3,5}) would return a value of 30.
Eg.
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.
191

Table of Contents

Other manuals for HP 39gs

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 39gs and is the answer not in the manual?

HP 39gs Specifications

General IconGeneral
TypeScientific
Form factorPocket
Product colorGray
Internal memory0.256 MB
Weight and Dimensions IconWeight and Dimensions
Weight249 g
Dimensions (WxDxH)187 x 94 x 31 mm

Related product manuals