EasyManuals Logo
Home>HP>Calculator>39G

HP 39G Master Guide

HP 39G
331 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 #267 background imageLoading...
Page #267 background image
267
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 ‘Tips and Tricks’ section
which immediately follows the chapter on Univariate Statistics. See page
130.
π
LIST({list})
This function returns the product of all the elements of a list.
Eg. LIST({2,3,5}) would return a value of 30.
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.

Table of Contents

Other manuals for HP 39G

Questions and Answers:

Question and Answer IconNeed help?

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

HP 39G Specifications

General IconGeneral
BrandHP
Model39G
CategoryCalculator
LanguageEnglish

Related product manuals