ISyE 6644 — Summer 2019 — Test #1 Solutions, Assignments of Mathematical Modeling and Simulation

Solutions to a test in the course isye 6644, covering topics related to simulation, probability, and statistics. It includes various problems and their detailed solutions, providing insights into concepts such as bisection method, probability distributions, expected value, variance, correlation, and monte carlo simulation. Valuable for students studying simulation and related fields.

Typology: Assignments

2024/2025

Uploaded on 02/14/2025

wanglihui04
wanglihui04 🇺🇸

15 documents

1 / 16

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
ISyE 6644 Summer 2019 Test #1 Solutions
(revised 6/18/21)
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.
Solution: TRUE (of course!) 2
2. Use bisection (or any other method) to find xsuch that ex=x2.
(a) x.
=0.703
(b) x.
= 0.567
(c) x=e/2
(d) x=e2
(e) None of the above.
Solution: Let’s use bisection to find the zero of g(x) = exx2.
x g(x) comments
10.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.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download ISyE 6644 — Summer 2019 — Test #1 Solutions and more Assignments Mathematical Modeling and Simulation in PDF only on Docsity!

ISyE 6644 — Summer 2019 — Test #1 Solutions

(revised 6/18/21)

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.

Solution: TRUE (of course!) 2

  1. Use bisection (or any other method) to find x such that ex^ = x^2. (a) x =. − 0. 703 (b) x = 0.. 567 (c) x = e/ 2 (d) x = e^2 (e) None of the above.

Solution: Let’s use bisection to find the zero of g(x) = ex^ − x^2.

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.

Since g(− 0 .703125) = 0, we can stop and declare that. x =. − 0 .703 does the job. This is answer (a). 2

We can also do the problem via Newton’s method:

xn+1 ← xn − (^) gg′((xxn) n)^

= xn − e

xn (^) − x (^2) n exn^ − 2 xn Suppose x 0 = 1 (which is a terrible choice, actually. ,) Then

x 1 ← x 0 − e

x (^0) − x (^20) ex^0 − 2 x 0 = 1^ −^

e − 1 e − 2 =^ −^1.^39221 ,

x 2 ← x 1 − e

x (^1) − x (^21) ex^1 − 2 x 1 =^ −^0.^83509 , and, similarly, x 3 = − 0 .70983, x 4 = − 0 .70348, and x 5 = − 0 .70347, and we seem to have converged very quickly! In any case, x =. − 0 .70347; so the answer is (a). 2

  1. 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. (c) 0. (d) 0. (e) 1/

Solution: We have

Pr(X < 1 | X > 1 /2) = Pr(X <Pr(^ X >^1 ∩^ X > 1 /2)^1 /2)

= Pr(1Pr(/X >^2 < X < 1 /2)^ 1)

=

∫^1 /^2 (x/2)^ dx 2 1 / 2 (x/2)^ dx = 0. 2 ,

  1. If X has a mean of −2 and a variance of 3, find E[− 3 X − 7].

(a) − 13 (b) − 7 (c) - (d) 6 (e) 27

Solution: E[− 3 X − 7] = − 3 E[X] − 7 = −1, so the answer is (c). 2

  1. 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.

Solution: Let X ∼ Geom(p = 1/10) denote the number of tosses. Thus, E[X] = 1/p = 10, so that the answer is (d). 2

  1. 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/ (c) − 1 / 3 (d) 1/ (e) − 1

(f) 3

Solution: Corr = Cov/

Var(X)Var(Y ) = 0, so (a) is the answer. 2

  1. If X and Y are both Normal(4,10) with Cov(X, Y ) = 6, find Var(X − 2 Y ). (a) − 10 (b) 10 (c) 20 (d) 26 (e) 46

Solution: Var(X − 2 Y ) = Var(X) + Var(− 2 Y ) + 2Cov(X, − 2 Y ) = Var(X) + 4Var(Y ) − 4 Cov(X, Y ) = 26. So the answer is (d). 2

  1. 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/e^2 (e) 1 − (1/e^2 )

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

(e) Nor(0.9, 0.0009)

Solution: If Xi has mean μ and variance σ^2 , then the Central Limit Theorem implies that X¯ ≈ Nor

μ, σ

2 n

∼ Nor

So the answer is (e). 2

  1. Suppose U and V are i.i.d. Unif(0,1) random variables. What does d 10 U e + d 10 V 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

  1. If U 1 , U 2 , U 3 are i.i.d. Unif(0,1) random variables, what is the distribution of − 3 `n(U 1 (1 − U 2 )U 3 )? (a) Exp(λ = 1/3) (b) Exp(λ = 3) (c) Erlang 3 (λ = 1/3) (d) Erlang 3 (λ = 1) (e) Erlang 3 (λ = 3)

Solution: By symmetry of the Unif(0,1), we note that U 1 , 1 − U 2 , and U 3 are i.i.d. Unif(0,1). Therefore, − 3 n(U 1 (1 − U 2 )U 3 ) ∼ − 3n(U 1 ) − 3 n(1 − U 2 ) − 3n(U 3 ) ∼ − 3 n(U 1 ) − 3n(U 2 ) − 3 `n(U 3 ) ∼ Exp(1/3) + Exp(1/3) + Exp(1/3) ∼ Erlang 3 (1/3).

So the answer is (c). 2

  1. 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.

Solution: By the Inverse Transform Theorem, Φ(X) ∼ U ∼ Unif(0, 1). So we have Φ−^1 (U ) ∼ Φ−^1 (Φ(X)) = X ∼ Nor(0,1). (This is why Inverse Transform is so nice!) Thus, the answer is (c). 2

  1. 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/ (d) 0. (e) 1.

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!

Method (i): By Inverse Transform, F (X) ∼ Unif(0,1). Thus, if U denotes a Unif(0,1) random variable, we have E[F (X)] = E[U ] = 1/ 2. 2

(a) X 1 , X 2 ,... is a sequence of integers that will eventually cycle. (b) U 1 , U 2 ,... is a sequence of PRNs. (c) U 1 , U 2 ,... will appear to be Unif(0,1). (d) U 1 , U 2 ,... will appear to be independent. (e) All of the above.

Solution: (e). 2

  1. 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

  1. 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

  1. 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

  1. TRUE or FALSE? In an Arena PROCESS module, it is possible to do a DELAY without an accompanying SEIZE or RELEASE.

Solution: TRUE. 2

  1. TRUE or FALSE? An Arena DECIDE module looks like a diamond.

Solution: TRUE. 2

  1. Consider the differential equation f ′(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. (c) 2 (d) e (e) 3.

Solution: As usual, we start with f (x + h) = f (x) + hf ′(x) = f (x) + h(x − 3)f (x) = f (x)[1 + h(x − 3)] = f (x)(0.97 + 0. 01 x), from which we obtain f (0.01) = f (0)(0.97 + 0.01(0)) = 2(0.97) = 1. 94 and then f (0.02) = f (0.01)(0.97 + 0.01(0.01)) = 1.94(0.9701) = 1. 88199. Thus, the answer is (b). 2

  1. Suppose that you want to estimate the integral

I =

0

[1 + ex^4 ] dx

(which I don’t think has a closed form). Consider the following 4 Unif(0,1)’s:

0.42 0.11 0.73 0.

  1. 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.

YES or NO? The expected value of this mess is E[W ] = 1/2.

Hint: There are various ways to do this problem — either (i) Analytically (involving a cute trick), or (ii) “Pretend” Monte Carlo: Select a reasonable grid of X and Y values; then average the resulting W values; and then make a good guess. Good luck and have fun!

Solution: The answer is YES.

Proof: Hint (i) calls for a cute trick. Since X and Y are identically distributed, it follows that (^) XX+Y and (^) XY+Y are identically distributed. So

1 = E

[X + Y

X + Y

]

= E

[ X

X + Y

]

+ E

[ Y

X + Y

]

= 2E

[ X

X + Y

]

= 2E[W ],

so that E[W ] = 1/2. 2

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

  1. 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 U 1 , U 2 ,... , U 10 :

0.83 0.16 0.95 0.47 0.37 0.65 0.77 0.20 0.14 0.

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

Solution: p 1 = 0.7, so U 1 = 0.83 corresponds to a miss. Then p 2 = 0.6, so U 2 = 0.16 corresponds to a made shot (my 1st). Then p 3 = 0.9, so U 3 = 0.98 corresponds to a miss. Then p 4 = 0.6, so U 4 = 0.47 corresponds to a made shot (my 2nd). Then p 5 = 0.9, so U 5 = 0.37 corresponds to a made shot (my 3rd). Then p 6 = 0.9, so U 6 = 0.65 corresponds to a made shot (my 4th).

Thus, it took 6 shots, so the answer is (d). 2

  1. Joey works at a chocolate store. Starting at time 0, we have the following 4 customer interarrival times (in minutes):

Bill = 8 Tom = 2 Angie = 5 Ursula = 2

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

Suppose it takes Joey 3 minutes to prepare each chocolate product. Further suppose that he charges $2/chocolate. Unfortunately, the customers are unruly and each customer causes $0.50 in damage for every minute the customer has to wait in line.

When does the first customer leave?

(a) −$6. 00 (b) $0. (c) $6. (d) $36. (e) Not enough information to tell.

Solution: Joey makes 2(6 + 2 + 3 + 1) − 0 .5(0 + 25 + 11 + 24) = −$6.00. So the answer is (a). 2

  1. Which incredible musical act was inducted into The Rock and Roll Hall of Fame this year? (a) Justin Bieber (b) REO Speedwagon (c) REO Bieberwagon (d) The Zombies

Solution: (d). Duh. 2