HP 10413 Datasheet Page 267

  • Download
  • Add to my manuals
  • Print
  • Page
    / 331
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 266
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.
Page view 266
1 2 ... 262 263 264 265 266 267 268 269 270 271 272 ... 330 331

Comments to this Manuals

No comments