HP 39gs Master Manual page 121

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

Advertisement

Simulation of a normal die
Similarly the expression
die. This means that
MAKELIST(INT(RANDOM*6+1),X,1,500,1)
simulate 500 rolls of a normal die. We therefore need only store the
resulting list into a Statistics aplet column to analyze and graph it. This
is shown in the series of screen shots to the right.
To simulate the adding of two six sided dice, use the similar expression
MAKELIST(INT(RANDOM*6+1)+INT(RANDOM*6+1),X,1,500,1)
Simulating Random Variables
It is occasionally handy to be able to simulate a set of observations on random variables of various sorts. This
can also be done using the
. It is also covered in more detail on page 190)
MAKELIST
Example 1:
Simulate 100 observations on a Uniform[0,1] random variable to be stored in
In the HOME view type:
Note: 1. The
appearing as
2. The
Example 2:
Simulate 50 observations on a discrete uniform[3,7] random variable
In HOME type:
Example 3:
Simulate 50 observations on a Binomial random variable with n = 20 and p = 0.75.
In
type:
HOME
Note: The Σ and the = are both on the keyboard. This will be a relatively slow calculation because it
involves evaluating 1000 random numbers.
will simulate one roll of the
INT(RANDOM*6+1)
menu function
MATH
MAKELIST(RANDOM,X,1,100,1) C2
symbol is one of the screen keys in the
and read as 'store'.
is simply a dummy variable here to count off the values.
X
MAKELIST(INT(5*RANDOM+3),X,1,50,1) C2
Σ
MAKELIST(
will
. See the previous page for the syntax of
MAKELIST
HOME
(I=1,20,RANDOM<0.75),X,1,50,1) C2
121
C2
view,
.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

40gs

Table of Contents