Appendix A
Appendix A
Problems
In solving the problems, the student will occasionally need one or more random
variates of the uniform type, u ~ U(0,1), or of the standard normal type, z ~ N(0,1).
These are provided in the Appendix with random variates of each type, Table A.3
for u ~ U(0,1) and Table A.4 for z ~ (N(0,1). On each problem, the student should
begin on the first row and first column to retrieve the random variate, then the first
row and second column, and so forth. Hence, for u ~ U(0,1), the variates are:
0.3650, 0.4899, and so forth. For z ~ N(0,1), they are: 0.058, 1.167, so forth.
Chapter 2
Chapter 3
3.1 The variable x is continuous with probability density f(x) ¼ 3/8x2 for 0 x
2. Use the inverse transform method to generate a random variate of x.
x 1 0 1 2 3 4
p(x) 0.10 0.20 0.30 0.20 0.15 0.05
[a,b) Frequency
[0, 10) 36
[10–20) 10
[20–30) 4
Chapter 4
4.1 The variable x is a continuous uniform for 10 < x < 30. Use the inverse
transform method to generate a random variate of x.
4.2 The variable x is exponential with E(x) ¼ 5. Generate a random variate of x.
4.3 The variable x is Erlang with k ¼ 5 and E(x) ¼ 20. Generate a random
variate of x.
Appendix B 155
4.4 The variable x is Gamma with sample data of x ¼ 5:0 and s2 ¼ 10.0.
Generate a random variate of x.
4.5 The variable x is Gamma with sample data of x ¼ 1:0 and s2 ¼ 10.0.
Generate a random variate of x.
4.6 The variable x is Beta with parameters, (k1, k2) ¼ (1, 8) and (a, b) ¼ (10, 90).
Two random Gammas are g1 ¼ 13 for (k1, k2) ¼ 10,1) and g2 ¼ 20 for (k1,
k2) ¼ (8,1). Find the random variate for the Beta.
4.7 The variable x is Weibull with parameters, (k1, k2) ¼ (2, 20). Generate a
random variate of x.
4.8 The variable x is Normal with mean ¼ 100 and variance ¼ 100. Use the
Sine-Cosine method to generate a random variate of x.
4.9 The variable x is Lognormal with mx ¼ 5 and sx ¼ 100. Generate a random
variate of x.
4.10 Generate a random variate for a chi-square variable with degrees of
freedom ¼ 5.
4.11 Generate a random variate for a chi-square variable with degrees of
freedom ¼ 153.
4.12 Generate a random variate for a student’s t with degrees of freedom ¼ 5. Get
z first.
4.13 Generate a random variate for an F distribution with degrees of freedom 5 and
2. Get chi square (df ¼ 5), first.
Chapter 5
x 1 0 1 2
P(x) 0.50 0.30 0.15 0.05
Chapter 6
6.1 The variables x1, x2, x3, x4 are jointly related by the following probabilities:
x1 0 1
x2 1 2 1 2
x3 x4
0 3 .01 .09 .02 .10
4 .03 .01 .04 .02
1 3 .05 .06 .06 .09
4 .07 .12 .08 .15
Generate one set of random variates for x1, x2, x3, x4.
6.3 Consider the multinomial distribution with k ¼ 4, p1 ¼ .4, p2 ¼ .3, p3 ¼ .2,
p4 ¼ .1 and n ¼ 5. Generate one set of random variates for x1, x2, x3, x4.
6.4 Consider x1, x2 that are related by the bivariate normal distribution with
m1 ¼ 1.0, m2 ¼ 0.8, s1 ¼ 0.2, s2 ¼0.1 and r ¼ 0.5. Generate one random
variate set of x1, x2.
6.6 Consider x1, x2 that are related by the bivariate lognormal distribution with
parameters my1 ¼ 20, my2 ¼ 2, sy1 ¼ 2, sy2 ¼ 0.5 and ry ¼ 0.8, where
yi ¼ ln(xi) for i ¼ 1,2. Generate one random variate set of x1, x2.
6.8 Generate the Cholesky matrix from the variance-covariance matrix:
2 3
16 4 2
4 4 4 15
2 1 1
6.9 The variables x1, x2, x3 are from a multivariate normal distribution with the
following matrices. Generate one random set of x1, x2, x3:
2 3 2 3
20 4 0 0
m¼4 6 5 C¼4 1 3 0 5
10 0:5 0:5 0:5
6.10 The variables x1, x2, x3 are from a multivariate lognormal distribution with the
following matrices from the transformed values of y1, y2, y3. Generate one
random set of x1, x2, x3:
2 3 2 3
2:0 4 0 0
my ¼ 4 0:6 5 Cy ¼ 4 1 3 0 5
1:0 0:5 0:5 0:5
Appendix B 157
Chapter 7
7.1 Consider a Poisson process where A(j) ¼ arrival rate, B(j) ¼ time for j ¼ 1,
2, 3, 4:
j 1 2 3 4 ......
AðjÞ 2 3 5 4
BðjÞ 0 1 2 3
Chapter 9
9.2 Simulation results of n ¼ 11 runs yields x ¼ 100 and s ¼ 18. Compute the
0.95 confidence limits for the true mean. Note, t10, 0.025 ¼ 2.228.
9.3 In Problem 9.2, the analyst wants (U – L) ¼ 5.0. How many more runs are
needed?
9.4 Simulation results of n ¼ 40 runs yield w ¼ 8 units with an attribute. Find the
0.95 confidence limits on the true proportion of units with the attribute.
9.5 In Problem 9.4, the analyst wants (U – L) ¼ 0.04. How many more runs are
needed?
9.6 Consider a machine shop where an order of No ¼ 15 is needed. A simulation
is run where the units started is Ns ¼ 20, and after n ¼ 1,000 simulation runs,
Ng ¼ 958 is the number of good units. The management wants to be 95%
certain that the number of good units will exceed No. Find the 0.95 confidence
interval on the probability that Ng will be equal or larger to No.
9.7 For Problem 9.6, how many more runs, if any, are needed so that the 0.95
confidence interval (from L to U) is always above the 0.95 specification mark?
158 Appendix B
9.9 Suppose two options are run in a simulation with results of n1 ¼ 20, x1 ¼ 1001
¼ 100 and s1 ¼ 30 for option 1, and n2 ¼ 20, x2 ¼ 95 and s2 ¼ 25 for
option 2. Assuming the two variances are the same, find the 0.95 confi-
dence limits on the difference between the two means.
9.10 A simulation is run with four options (i) and four observations (j) of each are
run with results in the table below. Use the one-way-analysis-of-variance
method to determine if all the means of the four options are the same at the
0.05 significance level. Note F3,12,0.05 ¼ 3.49.
Observations (j)
1 2 3 4
Options (i)
1 5 7 6 4
2 3 5 6 2
3 8 9 7 8
4 6 4 4 6
9.12 Using the results of Problem 9.10, compute the 0.95 confidence interval on the
difference between each pair of means, and label any that are significantly
different. Note, t0.025,12 ¼ 2.179.
Chapter 10
10.2 A sample of n ¼ 10 data entries are the following: (10, 13, 9, 7, 8, 12, 15, 10,
3, 8). Compute the following: x(1), x(n), x, s, cov, t.
10.3 From the data of Problem 10.2, compute the estimate of the location
parameter, g.
10.4 Consider the (n ¼ 15) sample data from a continuous uniform distribution:
(1.3, 1.4, 1.8, 2.3, 2.4, 2.5, 2.9, 3.1, 3.4, 3.9, 4.1, 4.7, 5.2, 5.7, 6.1). Find the
maximum likelihood estimates of the min and max parameters, (a, b). Now
find the method of moments estimators for a and b.
10.5 Suppose the n ¼ 12 sample data entries are the following: (10.4, 12.3, 13.5,
14.6, 15.1, 15.8, 16.2, 16.5, 17.3, 16.3, 15.1, 19.4). Assuming the data are
normally distributed, estimate the parameters of the mean and standard
deviation.
10.6 From the n ¼ 8 sample data: (0.7, 1.2, 1.8, 2.4, 4.0,10.3, 0.9, 1.4), estimate
the parameter for an exponential distribution.
10.7 Assume the lognormal variable x, with sample data: (10, 12, 15, 23, 40, 90,
217). Estimate the parameters for this distribution.
10.8 Suppose the variable x is assumed as gamma distributed and a sample of
n ¼ 50 yields the sample average of 33 and the sample variance of 342.
Estimate the parameters for the gamma distribution.
Appendix B 159
10.9 Suppose the variable x is assumed as beta distributed and estimates of the
following are given: mean ¼ 60, mode ¼ 80, min ¼ 0, max ¼ 100. Esti-
mate the parameters for the beta distribution.
10.10 The following (n ¼ 11) sample data are: (3, 3, 5, 7, 8, 8, 11,12,13,15,16).
Assuming the data comes from a discrete uniform distribution, estimate the
maximum likelihood estimate for the min and max (a, b). Now estimate the
parameters using the method of moments.
10.11 Suppose the variable x is from a binomial distribution with n ¼ 10, p is
unknown, and m ¼ 8 samples of x are (3, 2, 1, 5, 3, 4, 3, 2). Find the
maximum likelihood estimate of p.
10.12 Suppose the variable x is from a geometric distribution where p is unknown,
and m ¼ 6 samples of x are (3, 5, 8, 4, 7, 3). Find the maximum likelihood
estimate of p. Recall, x ¼ number of failures till a success.
10.13 Suppose the variable x is from a Pascal distribution with k ¼ 3, p is
unknown, and m ¼ 10 samples of x are (8, 9, 9, 12, 10, 13, 10, 12,
11, 13). Find the maximum likelihood estimate of p. Recall, x ¼ number
of failures till three successes.
10.14 Suppose the variable x is from a Poisson distribution where the parameter is
unknown, and m ¼ 7 samples of x are (3, 5, 2, 7, 4, 4, 1). Find the maximum
likelihood estimate of the parameter.
10.15 Consider the (n ¼ 15) sample data from Problem 10.4 and the maximum
likelihood estimates of the parameters. Assuming the continuous uniform
distribution, list the vectors Xs and Xf for the Q-Q Plot.
10.16 Consider the (n ¼ 11) sample data from Problem 10.10 and the maximum
likelihood estimates of the parameters. Assuming the discrete uniform
distribution pertains, list the vectors Fs and Ff for the P-P Plot.
Chapter 11
11.1 Suppose the variable x is from a continuous uniform distribution and an expert
estimates the minimum value is 50 and the 0.75-quantile is 90. Estimate the
parameters for this distribution.
11.2 Suppose the variable x is from a continuous uniform distribution and an expert
estimates the maximum value is 100 and the 0.20-quantile is 40. Estimate the
parameters for this distribution.
11.3 Assume a variable x from the triangular distribution where an expert estimates
the following: min ¼ 5, most likely ¼ 20 and the max ¼ 30. Estimate the
parameters for the standard triangular distribution.
11.4 Assume a variable x from the beta distribution where an expert estimates the
following: min ¼ 5, mean ¼ 18, most likely ¼ 20 and the max ¼ 30. Esti-
mate the parameters for the beta distribution.
160 Appendix B
Solutions
5.3 1
5.4 3
5.5 99
5.6 1
5.7 0
5.8 2
5.9 8
5.10 3
6.1 0,2,0,4
6.3 3,0,2,0
6.4 19.884, 2.326
6.6 2.686, 2.454
6.8 C¼ 4 0 0
1 1.732 0
0.5 0.289 0.666
6.9 X¼ 19.768
9.443
11.028
7.1 0.908, 2.865, 3.562
7.2 x¼6
7.3 67.14
7.5 193.76
7.7 8, 11, 3, 12, 6
7.8 8 H, AD, 6D, AS, KD
9.2 (L,U) ¼ (87.908, 112.091)
9.3 188 more
9.4 (L,U) ¼ (0.076, 0.324)
9.5 1,497 more’
9.6 (L,U) ¼ (0.946, 0.970)
9.7 1,415 more
9.8 (L,U) ¼ (12.11, 22.11)
9.9 (L,U) ¼ (0.1917, 0.0317)
9.10 F ¼ 6.61 Significant
9.12 1v2 0.476, 2.524 s
1v3 3.524, 1.475 s
1v4 0.524, 1.524 ns
2v3 5.024, 2.976 s
2v4 2.024, 0.024 ns
3v4 1.976, 4.024 s
10.2 x(1) ¼ 3
x(10) ¼ 15
x ¼ 9:5
s ¼ 3.375
cov ¼ 0.355
t ¼ 1.190
10.3 1
10.4 MLE: a ¼ 1.3, b ¼ 6.1
MOM: a ¼ 0.746, b ¼ 6.025
(continued)
Appendix C 163
Abramowitz, M., Stegun, I.A.: Handbook of Mathematical Functions with Formulas, Graphs and
Tables, pp. 931–937. U.S. Department of Commerce, Washington (1964)
Ahrens, J.H., Dieter, V.: Computer methods for sampling from gamma, beta, poisson and binomial
distributions. Computing 12, 223–246 (1974)
Barnett, V.: Probability plotting methods and order statistics. Appl. Stat. 24, 95–108 (1975)
Box, G.E.P., Miller, M.E.: A Note on the generation of random normal variates. Ann. Math. Stat.
29, 610–611 (1958)
Cheng, R.C.H.: The Generation of gamma variables with non-integral shape parameter. Appl. Stat.
26, 71–75 (1977)
Dubey, S.D.: On some permissible estimators of the location parameters of the Wiebull and certain
other distributions. Technometrics 9, 293–307 (1967)
Fishman, G.S., Moore, L.R.: A statistical evaluation of multiplicative congruent random number
generators with modulus 231 -1. J. Am. Stat. Assoc. 77, 129–136 (1982)
Gentle, J.E.: Cholesky Factorization. In: Numerical Linear Algebra for Applications in Statistics,
pp. 93–95. Springer, Berlin (1958)
Hahn, G.J., Shapiro, S.S.: Statistical Models in Engineering. Wiley, New York (1994)
Hastings Jr., C.: Approximation for Digital Computers. Princeton University Press, Princeton
(1955)
Hines, W.W., Montgomery, D.C., Goldsman, D.M., Borror, C.M.: Probability and Statistics in
Engineering. Wiley, New Jersey (2003)
Kelton, W.D., Sadowski, R.P., Sturrock, D.T.: Simulation with Arena. McGraw Hill, New York
(2007)
Law, A.M.: Simulation Modeling and Analysis, 4th edn. McGraw Hill, Boston (2007)
Lehmer, D.H.: Mathematical methods in large scale computing units. Ann. Comput. Lab. 26,
142–146 (1951). Harvard University
Lewis, P.S.W., Goodman, A.S., Miller, J.M.: A pseudo random number generator for the system/
360. IBM Syst. J. 8, 136–146 (1969)
Payne, W.H., Rabung, J.R., Bogyo, T.P.: Coding the lehmer pseudorandom number generator.
Commun. Assoc. Comput. Mach. 12, 85–86 (1969)
Rand Corporation: A Million Random Digits with 100,000 Normal Deviates, Santa Monica (1946)
Rose, C., Smith, M.D.: Order statistics. Math. Stat. Math. 9.4, 311–332 (2002)
Schever, E.M., Stoller, D.S.: On the generation of normal random vectors. Technometrics 4,
278–281 (1962)
Wilk, M.B., Gnanadesikan, R.: Probability plotting methods for the analysis of data. Biometrika
55, 1–17 (1968)
Zanakis, S.H.: A simulation study of some simple estimators for the three-paramater Weibull
distribtuion. J. Stat. Comput. Simul. 9, 101–116 (1979)
Cumulative distribution, 18, 20, 25, 36, 58, 59, Forecast model, 84–89
127, 130, 137, 143 FORTRAN, 2
Cumulative distribution function (CDF), Frontline, 3
16–18, 21, 23–25, 28, 30, 35, 46, 48, 51,
52, 126, 132–135
Cycle, 10–14, 81–84 G
Cyclical, 6, 79, 83, 84, 90 Gamma, 5, 27, 31–33, 41, 44, 74–76, 91,
116–118, 122–123
Gamma function, 31, 35
D Gas station, 54, 96
Data, 2, 9, 24, 69, 79, 91–112, 113, 137–145 GAUSS, 2
Database, 84–85, 90 Geometric, 5, 45, 51, 52, 55, 116, 119–120,
Defectives, 50, 60, 61, 99 125, 133, 134
Degrees of freedom, 40–44, 93–95, 102–105, Goodness-of-fit, 13, 126, 132
109–112
Demand history, 84, 85, 87–89
Demand pattern, 85–89 H
Digits, Hastings approximation, 36–37
Discrete, 3–5, 7, 15, 16, 21, 45–55, 57, 78, 113, Hastings method, 37
114, 116, 124, 132, 135 Horizontal, 84–87, 89
Discrete arbitrary, 5, 45–46 Hyper geometric, 5, 45, 50, 55
Discrete distributions, 119, 123–124 Hypothesis, 12, 108, 110
Discrete uniform, 5, 46–47, 76, 77, 116, 119,
123, 124, 133
Discrete variable, 15–17 I
Idle time, 55, 80, 92, 100, 101, 108
Independence, 114
E Inter-arrival time, 72
Empirical, 4, 7, 114, 126, 132, 135, 137, Inventory, 7, 55, 85–87, 90, 113
139–142, 144, 145 Inventory manager, 7, 85–89, 113
Empirical grouped data, 25–26 Inverse function, 16, 20–22, 126
Empirical probability, 127 Inverse transform method (IT), 5, 15–17, 19,
Empirical ungrouped data, 24–25 24–26, 29, 36, 37
Emulate, 4, 6, 7, 12, 26, 79, 90, 91, 113, 118
Equilibrium, 4, 6, 55, 79–82, 84, 90
Erlang, 5, 21, 27, 30–31, 44 J
Estimating parameters, 120–126 JAVA, 2
Excel, 3 Joint probability, 5, 57, 58
Expected value, 12, 13, 23, 28–30, 34, 35, 42,
43, 45, 47–51, 53, 63, 73, 99, 101, 105,
109, 124, 125 L
Exponential, 5, 27–29, 31, 35, 44, 53, 54, Lehmer, D.H., 10
71–75, 99, 116, 117, 121–122, 130–131 Length of the cycle, 12
Lexis ratio, 115, 119, 120
Linear congruent generators, 10–11
F Linear congruent method, 14, 153
F distribution, 43 Location parameter, 91, 115–116, 118,
Fishers’ F, 5, 27, 43–44 141–143
Fixed time horizon, 71 Lognormal, 5, 7, 27, 39–40, 44, 116–118, 122,
Flipping coins, 2, 4, 9 131, 132, 138, 141–142
Forecast, 84–89 Los Alamos National Laboratory, 1
Forecast error, 85–89 Lower limit, 104, 108, 111
Forecasting, 84–85, 87, 88, 90 Lower-tail, 43
Index 169
Upper and lower limits, 93–95, 97, 101–108, Vector, 66–69, 127, 128, 159
111 Visual Basic, 2
Upper-tail, 43, 94 Von Neumann, J., 1
U.S. Air Force, 1–2
W
V Weibull, 5, 7, 27, 35–36, 44, 117–119, 137,
Variable type data, 92–96, 101, 108–112 138, 142–145, 149, 155, 160
Variance, 4, 12, 23, 28, 30–35, 39–43, 45, What if, 6, 7, 91, 113
47–53, 58, 60, 63, 64, 66, 67, 92, 93, 95, When need more accuracy, 96, 98–100
97, 98, 101–104, 107–109, 111, When n is small, 48
118–124, 141, 155, 158 When s1=s2, 102–103
Variance-covariance, 67, 68, 156 When s16¼s2, 103
Variate, 12, 15, 26, 31, 32, 38, 49, 53, 55, Without replacement, 6, 50, 60, 61, 71,
58–59, 61, 69, 153 76–78, 157