2019 Practice Exam 1
2019 Practice Exam 1
This test is 120 minutes. You’re allowed one cheat sheet (both sides).
This test requires a proctor. All questions are 3 points, except 33, which is 4 points. ,
Good luck! I want you to make this test wish that it had never been born!!!
1. TRUE or FALSE? Simulation can be used to analyze supply chain models that
are too complicated to solve analytically.
x g(x) comments
−1 −0.6321
0 1 look in [−1, 0]
−0.5 0.3565 look in [−1, −0.5]
−0.75 −0.09013 look in [−0.75, −0.5]
−0.625 0.1446 look in [−0.75, −0.625]
−0.6875 0.0302 look in [−0.75, −0.6875]
−0.71875 −0.0292 look in [−0.71875, −0.6875]
.
−0.703125 0.00065 = 0 OK, stop here.
2
. .
Since g(−0.703125) = 0, we can stop and declare that x = −0.703 does the job.
This is answer (a). 2
3. Suppose that X is a continuous random variable with p.d.f. f (x) = x/2 for 0 <
x < 2. Find Pr(X < 1 | X > 1/2).
(a) 0
(b) 0.2
(c) 0.5
(d) 0.8
(e) 1/16
Solution: We have
Pr(X < 1 ∩ X > 1/2)
Pr(X < 1 | X > 1/2) =
Pr(X > 1/2)
Pr(1/2 < X < 1)
=
Pr(X > 1/2)
R1
1/2
(x/2) dx
= R2
1/2
(x/2) dx
= 0.2,
3
(a) 0.096
(b) 0.192
(c) 0.819
(d) 0.973
(e) 1
Solution: The number of trials until the first success is X ∼ Geom(0.6). Thus,
(a) 1
(b) e/2
(c) (1 + e)/2
(d) 0.347
(e) 1.38
(f) None of the above.
(a) −13
(b) −7
(c) -1
(d) 6
(e) 27
7. Toss a 10-sided Dungeons and Dragons die repeatedly. What is the expected value
of the number of tosses until you observe a 5?
(a) 1/10.
(b) 1/6.
(c) 6.
(d) 10.
(e) 90.
8. Suppose that X and Y are identically distributed with a mean of −2, a variance of
3, and Cov(X, Y ) = 0. Find Corr(X, Y ).
(a) 0
(b) 1/9
(c) −1/3
(d) 1/3
(e) −1
5
(f) 3
p
Solution: Corr = Cov/ Var(X)Var(Y ) = 0, so (a) is the answer. 2
Solution:
Var(X − 2Y ) = Var(X) + Var(−2Y ) + 2Cov(X, −2Y )
= Var(X) + 4Var(Y ) − 4Cov(X, Y )
= 26.
So the answer is (d). 2
10. Consider a Poisson process with rate λ = 1/2. What is the probability that the
time between the 1st and 2nd arrivals is less than 1?
(a) 1/e
(b) 1 − (1/e)
√
(c) 1 − (1/ e)
(d) 1/e2
(e) 1 − (1/e2 )
Solution: All interarrivals are i.i.d. Exp(λ). In particular, let X ∼ Exp(λ = 1/2)
denote the time between the 1st and 2nd arrivals. Then
Pr(X < 1) = 1 − e−λx = 1 − e−(1/2)(1) = 0.393.
Thus, the answer is (c). 2
6
(a) 0.05
(b) 0.159
(c) 0.5
(d) 0.841
(e) 0.95
0−2
Solution: Pr(X > 0) = Pr(Z > √ )
4
= Pr(Z > −1) = 0.8413. So the answer is
(d). 2
12. Suppose X and Y are i.i.d. Exp(λ = 1). Find Pr(X + Y < 2).
(a) 1/e2
(b) 1 − (1/e2 )
(c) 0.5
(d) 0.406
(e) 0.594
13. Suppose X1 , . . . , Xn are i.i.d. from a Bern(0.9) distribution. What is the approxi-
mate distribution of the sample mean X̄ for n = 100?
(a) Bern(0.009)
(b) Bin(100, 0.9)
(c) Nor(0.9, 0.9)
(d) Nor(0.9, 0.09)
7
Solution: If Xi has mean µ and variance σ 2 , then the Central Limit Theorem
implies that
σ2 (0.9)(0.1)
X̄ ≈ Nor µ, ∼ Nor 0.9, .
n 100
So the answer is (e). 2
14. Suppose U and V are i.i.d. Unif(0,1) random variables. What does d10U e + d10V e
do? (Recall that dxe is the “ceiling” function.)
(a) This gives a continuous Unif(0,20) random variate.
(b) This gives a continuous triangular random variate.
(c) This gives a normal random variate.
(d) This is a simulated Dungeons and Dragons 10-sided die toss.
(e) This simulates the sum of two Dungeons and Dragons 10-sided dice tosses.
Solution: (e). 2
16. Suppose X has the Nor(0,1) distribution with c.d.f. Φ(x). Suppose that U is a
Unif(0,1) number. What is the distribution of the inverse Φ−1 (U )?
(a) Unif(0,1)
(b) Exponential
(c) Nor(0,1)
(d) Weibull
(e) None of the above.
17. If X is a continuous random variable with p.d.f. f (x) and c.d.f. F (x), find E[F (X)].
(Hint: Don’t panic on this problem. One approach might be to use Inverse Trans-
form, or another might be to use LOTUS.)
(a) e
(b) e − 1
(c) 1/2
(d) 0.876
(e) 1.876
Solution: The answer turns out to be (c). Since it’s Summertime Summertime in
Atlanta and the livin’ is easy, I’ll give you two methods to prove this!
18. Consider the linear congruential generator Xi+1 = (5Xi + 1)mod(8). Using X0 = 0,
calculate the 99th integer X99 .
(a) 0
(b) 1
(c) 7
(d) 8
(e) 16
Solution: We have
i 0 1 2 3 4 5 6 7 8
Xi 0 1 6 7 4 5 2 3 0
Solution: (e). 2
20. YES or NO? Is it possible for an arrival event to initiate insertions, deletions, and
swaps of events in a simulation’s future events list?
Solution: YES — for instance, that arrival is deleted from the FEL; a subsequent
arrival might be scheduled; some future events might be deleted; and some future
events might be re-ordered. 2
21. TRUE or FALSE? Deep, deep down in the heart of almost every discrete-event
simulation language, there’s a future events list that the simulation maintains in
order to do event scheduling.
Solution: TRUE. 2
22. TRUE or FALSE? Most discrete-event simulations proceed by jumping from event
to event in time order; and nothing of significant interest happens between events.
Solution: TRUE. 2
Solution: TRUE. 2
Solution: TRUE. 2
25. Consider the differential equation f 0 (x) = (x − 3)f (x) with f (0) = 2. Use Euler’s
method with increment h = 0.01 to find the approximate value of f (0.02).
(a) 1
(b) 1.88
(c) 2
(d) e
(e) 3.72
f (x + h) = f (x) + hf 0 (x)
= f (x) + h(x − 3)f (x)
= f (x)[1 + h(x − 3)]
= f (x)(0.97 + 0.01x),
and then
Use the Monte Carlo method from class to approximate the integral I via the
estimator I¯4 .
(a) 1
(b) 1.881
(c) 2.308
(d) e
(e) 3.726
Solution:
n
b−aX
I¯4 = g(a + (b − a)Ui )
n i=1
4
1−0X
= g(Ui )
4 i=1
4
1X 4
= [1 + eUi ]
4 i=1
= 2.308.
27. Suppose I inscribe a circle of radius 1/2 in a unit square. Now I randomly toss
1000 darts in the square and 796 happen to land in the circle. Use this sample in
conjunction with the example we did in class to give me an estimate of π.
(a) π
(b) π/2
(c) 3.082
(d) 3.184
(e) 3.248
Solution: Let p̂n = 0.796 be the proportion of darts that hit the circle. Then we
know that the estimate π̂n = 4p̂n = 3.184. The answer is therefore (d). 2
13
28. If X and Y are i.i.d. Unif(0,1), it turns out that the p.d.f. of the nasty joint
random variable W ≡ X/(X + Y ) is somewhat interesting looking.
Proof: Hint (i) calls for a cute trick. Since X and Y are identically distributed, it
X Y
follows that X+Y and X+Y are identically distributed. So
X +Y X Y X
1 = E = E +E = 2E = 2E[W ],
X +Y X +Y X +Y X +Y
Another approach is to use Hint (ii)’s suggestion of “pretend” Monte Carlo. For
instance, take X and Y equal to all combinations of the reasonable grid 0.2, 0.4,
0.6, 0.8, and then take the average of the resulting 16 values of W . Amazingly,
you’ll get an average of exactly 0.5! 2
29. Suppose that the probability that I make my first foul shot is 0.7. Also suppose
that if I make shot i (i = 1, 2, . . .), then I become very confident and will make shot
i + 1 with probability 0.9. However, if I miss shot i, then I become discouraged and
make shot i + 1 with probability of only 0.6.
Let’s do Monte Carlo sampling to see how many shots I make. Suppose that
I generously give you the following 10 Unif(0, 1) random numbers; call them
U1 , U2 , . . . , U10 :
0.83 0.16 0.95 0.47 0.37 0.65 0.77 0.20 0.14 0.13
14
Our simulation will declare that I make shot i if Ui < pi , where pi is the condi-
tional probability that I make shot i (as discussed above). Using the given random
numbers, how many shots will I have to take until I make my 4th one?
(a) 3
(b) 4
(c) 5
(d) 6
(e) 7
30. Joey works at a chocolate store. Starting at time 0, we have the following 4 customer
interarrival times (in minutes):
Customers are served in alphabetical order (though once you start service, you don’t
get displaced by a higher-priority customer). The 4 customers order the following
numbers of chocolate products, respectively:
6 2 3 1
(a) 8
(b) 18
(c) 26
(d) 41
(e) Not enough information to tell.
cust arrl time serv start serve time depart wait sys time
Bill (1) 8 8 18 26 0 18
Tom (2) 10 35 6 41 25 31
Angie (3) 15 26 9 35 11 20
Ursula (4) 17 41 3 44 24 27
The first customer (Bill) leaves at time 26. So the answer is (c). 2
31. Under the same set-up as in Question 30, what is the average number of customers
in the system during the first 20 minutes?
(a) 1.5
(b) 17/5
(c) 7
(d) 18
(e) Not enough information to tell.
Solution: Let Xi denote the amount of time Customer i spends in the system
during the time interval [0,20]. In particular, X1 = 20 − 8 = 12, X2 = 20 − 10 = 10,
X3 = 5, and X4 = 3. The average number of customers in the system during the
first 20 minutes is
total customer time 12 + 10 + 5 + 3
= = 1.5.
20 20
Thus, the answer is (a). 2
32. Under the same set-up as in Question 30, how much money will Joey make or lose
with the above 4 customers?
16
(a) −$6.00
(b) $0.00
(c) $6.00
(d) $36.00
(e) Not enough information to tell.
33. Which incredible musical act was inducted into The Rock and Roll Hall of Fame
this year?