Professional Documents
Culture Documents
3 SKS
18 Oktober 2008
Dosen:
Prihadi Sumintadireja
Asep Kesumajana
GENERATING RANDOM VARIABLES
TABLE 3-1 General Classification of Types of Exogenous Inputs to Dynamic
Simulation Models, with Hypothetical Variables That could Be Used as Examples
General
Category Form Example
Number of eruptions per century of active
Discrete empiral distribution volcano
• Congruential Methods
TABLES 3-2 Calculation of Pseudorandom-
Numbers when a
0 2 0.125
1 7 7 10437
2 22 6 1.375
3 19 3 0.187
4 10 10 0.625
5 31 15 0.937
6 46 14 0.875
7 43 11 0.687
8 34 2 10.125
9 7 7 0.437
10 22 6 0.375
11 19 3 0.187
. . . .
. . . .
Number in column labeled xi are
pseudorandom integers; number in column
labeled xi/m are pseudorandom numbers in
the range 0.0 to 1.0
TABLE 3-3 FORTRAN Subroutine RANDOM for Generating
Pseudorandom Number by Mixed congruential Method
LX=1A*IX+IC
1X=MOD(LX, M)
X=IX
R=X/FM
RETURN
END
TABLE 3-4 FORTYRAN Subroutine RANDU for Generating Random
Numbers with a Uniform Distribution in the Range
a
0.0 to 1.0
SUBROUTINE RANDU (IX, IY, R)
IY=IX*65539
IF (IY) 5, 6, 6
5IY=IY+2147483647+1
6R=IY
R=R*.4656613E-9
RETURN
END
Figure 3-7 Histogram showing result of 1000 draw of uniform random distribution in
the range 20.0 to 130.0.
Figure 3-3 Three-dimensional histogram graphically displaying frequencies wiyh
which numbers in the ith frequency class are succeeded by those of the jth frequency
class, in a5x5 matrix containing five subintervals or frequency classes.
Figure 3-4 Histograms of hypothetical ash-fall frequency in inches per 50 years.
(a) Conventional frequency distribution; (b) cumulative frequency distribution based
on data in conventional distribution above. Left side of figure illustrates how random
numbers with uniform distribution in the range 0.0 to 1.0 are used to sample
cumulative distribution.
TABLE 3-5 Frequency of Occurrence of 1000 Ash-Fall-Thickness Values
Pertaining t a Hypothetical Ash-Fall Model, Illustrating the Preparation of a
Cumulative Frequency Distribution
Range of Cumulative
Frequency Frequency on
Class in Midrange Frequency Transformed
Interval Inches per Value of Transformed Scale
J 50 Years X(J) Occurrence Frequency FX(J)