EasyManuals Logo

HP 50G User Manual

HP 50G
887 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 #552 background imageLoading...
Page #552 background image
Page 17-3
Random number generators, in general, operate by taking a value, called the
seed” of the generator, and performing some mathematical algorithm on that
seed” that generates a new (pseudo)random number. If you want to generate
a sequence of number and be able to repeat the same sequence later, you can
change the "seed" of the generator by using function RDZ(n), where n is the
seed,” before generating the sequence. Random number generators operate
by starting with a "seed" number that is transformed into the first random
number of the series. The current number then serves as the "seed" for the next
number and so on. By "re-seeding" the sequence with the same number you
can reproduce the same sequence more than once. For example, try the
following:
RDZ(0.25) ` Use 0.25 as the "seed."
RAND() ` First random number = 0.75285…
RAND() ` Second random number = 0.51109…
RAND() ` Third random number= 0.085429….
Re-start the sequence:
RDZ(0.25) ` Use 0.25 as the "seed."
RAND() ` First random number = 0.75285…
RAND() ` Second random number = 0.51109…
RAND() ` Third random number= 0.085429….
To generate a sequence of random numbers use function SEQ. For example, to
generate a list of 5 random numbers you can use, in ALG mode:
SEQ(RAND(),j,1,5,1). In RPN mode, use the following program:
« n « 1 n FOR j RND NEXT n LIST » »
Store it into variable RLST (Random LiST), and use J5@RLST! to produce a
list of 5 random numbers.
Function RNDM(n,m) can be used to generate a matrix of n rows and m
columns whose elements are random integers between -1 and 1(see Chapter
10).
Discrete probability distributions
A random variable is said to be discrete when it can only take a finite number
of values. For example, the number of rainy days in a given location can be
considered a discrete random variable because we count them as integer
numbers only. Let X represent a discrete random variable, its probability mass

Table of Contents

Other manuals for HP 50G

Questions and Answers:

Question and Answer IconNeed help?

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

HP 50G Specifications

General IconGeneral
Digits33 digits
Battery typeCR2032
TypeScientific
Form factorPocket
Weight and Dimensions IconWeight and Dimensions
Weight220 g
Dimensions (WxDxH)87 x 184 x 23.5 mm

Related product manuals