Professional Documents
Culture Documents
SIMULATION
HOMEWORK 4 CHAPTER 2
RANDOM NUMBERS
1. Develop a generator for a triangular distribution with range (1, 10) and mode
at x=4. Generate 10 values of the random variable.
r x
0,22 3,44
0,55 5,07
0,82 6,88
0,05 2,16
0,19 3,26
0,59 5,29
0,52 4,91
0,01 1,52
0,97 8,73
0,31 3,89
Jose Alejandro Bastidas B.
2. Given the following cdf for a continuous variable with range from – 3 to 4,
develop a generator for the variable, generate 30 values, and plot a
histogram.
0, x −3
1 x
+ , −3 x 0
2 6
F ( x) = 2
1 + x , 0 x 4
2 32
1, x4
r x
0,25 -1,49
0,97 3,87
0,47 -0,16
0,64 2,15
0,03 -2,84
0,15 -2,08
0,28 -1,34
0,59 1,73
0,42 -0,46
0,27 -1,39
0,95 3,78
0,73 2,71
0,17 -1,97
0,46 -0,25
0,96 3,82
0,07 -2,58
0,26 -1,46
0,15 -2,09
0,77 2,92
0,85 3,37
0,97 3,86
0,60 1,82
0,96 3,84
0,84 3,32
0,55 1,20
0,90 3,56
0,01 -2,95
0,08 -2,51
0,61 1,85
0,05 -2,72
Jose Alejandro Bastidas B.
3. Given the cdf F(x) = x4/16 on 0<=x<=2, develop a generator for this
distribution. Generate 10 values of the random variable.
r x
0,47 1,66
0,87 1,93
0,77 1,88
0,17 1,29
0,85 1,92
0,64 1,79
0,60 1,76
0,21 1,36
0,31 1,49
0,74 1,86
Jose Alejandro Bastidas B.
4. Data have been collected on service times at a drive-in bank window at the
Shady Lane National Bank. This data are summarized into intervals as
follows:
5. Lead times have been found to be exponentially distributed with mean 3.7
days. Generate five random lead times from this distribution.
r x
0,79 0,86
0,42 3,20
0,51 2,50
0,70 1,32
0,29 4,52
C8 3, 5, 6, 11, 17