1 NAME ISyE 6644 Fall 14 Test 3 Solutions revised 8/4/18 You have 1 minutes for this test. You are allowed three cheat sheets. Circle all final answers. Good luck! 1. [4 points] Suppose that the joint p.d.f of X and Y is given by fx, y = c for < x < y < 1. Find c and E[Y ]. Solution: In order to have E[Y ] = 1 y f Y y dy where: f Y y = 1 1 y fx, y dx = fx, y dx dy = 1 we need c =. y dx = y, y 1 E[Y ] = 1 y dy = 3.. [4 points] If X and Y are i.i.d. Exp1, find E[X Y 3 ]. Solution: Since X and Y are independent, E[X Y 3 ] = E[X ] E[Y 3 ]. Also, E[X ] = E[Y 3 ] = x e x dx = y 3 e y dy = 6 x e x dx! }{{} =1, Gammak=3,λ=1 y 3 e y dy 3! }{{} =1, Gammak=4,λ=1 = = 6 Then, E[X Y 3 ] = 6 = 1.
3. [ points] You are playing Dungeons and Dragons and want to simulate a 13-sided die numbered with the even numbers 1, 1,...,,,..., 1. Give me a one-line algorithm to do so. Solution: 13U 6 4. [4 points] Consider the pseudo-random number generator X i = 5X i 1 + 3mod8, with seed X =. a Calculate X 1 along with the corresponding PRN U 1. Solution: X 1 = 5 and U 1 =.65. b What is X 5? Solution: Full period, then X 5 = X 8 = X =. 5. [4 points] Consider the simple PRN generator X i = 1687 X i 1 mod 31 1. a Is this a full period generator i.e., with period at least 31? Solution: Yes. b Suppose the seed X = 1,34,567,89. Calculate X 1. Solution: Using Excel: X 1 = 395,59,916. 6. [ points] Suppose U 1,..., U 6 are PRN s. What s the distribution of ln [ 3 U i 6 i=4 1 U i ]? Solution: ln [ 3 U i 6 i=4 1 U i ] lnu 1 U U 6 = ln 6 U i Erlang6 1/.
3 7. [8 points] Suppose that U 1 and U are i.i.d. U,1. Further suppose that Φx is the N,1 c.d.f. and that Z 1, Z are i.i.d. N,1. a What s the distribution of ΦZ 1? Solution: By the Inverse Transform Theorem, the distribution is U,1. b What s the distribution of ΦZ 1 + ΦZ? Solution: Since it is a sum of two U,1 s, it is Tria,1,. c What s the distribution of Φ 1 U 1 + Φ 1 U? Solution: Sum of standard normal variables, so it is N,. d What s the distribution of Φ 1 U 1 /Φ 1 U? Solution: Ratio of standard normal variables, so it is Cauchy. 8. [4 points] Suppose the random variable X has the following p.d.f. { if x < or x > π fx = sinx if x π. a Give an inverse transform method for generating realizations of X. Solution: If x [, π] the cumulative distribution is: F x = x ft dt = x sint dt = 1 1 cosx. Then, X = F 1 U is obtained by solving U = 1 1 cosx: U = 1 cosx 1 U = cosx X = F 1 U = arccos1 U.
4 b Use the U, 1 random number.45 to generate a realization of X. Solution: X = arccos1.45 = 1.471. 9. [ points] Consider the following 14 PRN s.88.87.33.69..79.1.96.11.4.1.86.43.51 Use the Central Limit Theorem method to generate a realization that is approximately standard normal. Solution: 14 U i 14 14 1 =.5. 1. [6 points] Suppose that the covariance matrix of a bivariate normal RV is Σ = 1.. 1 a Find the Cholesky matrix for Σ. If you can t do this, just make up an answer and go to b. Solution: C = 1..9798 b Now consider two i.i.d. Nor,1 realizations Z 1 = 1. and Z =.5. Using your answer to a, generate a bivariate normal RV with mean vector 1, and covariance matrix Σ. Solution: X1 X = 1 + C 1.5 = 1 + 1..9798 1.5 =.69 11. [4 points] Suppose that Wt is a standard Brownian motion process. Find the distribution of W + W1 + 3W.
5 Solution: First of all, note that W =, so the problem is a little easier than we might ve expected, i.e., just find the distribution of Y W1 + 3W. Since Y is a linear combination of normals, it is itself normal. E[Wt] = for all t, we have E[Y ] = E[W1 + 3W] = E[W1] 3 E[Wt] =. Moreover, since Further, since VarWt = t and CovWs, Wt = mins, t for all s and t [, 1], we have VarBt = VarW1 + 3W = 4 VarW1 + 9VarW + 3 CovW1, W = 41 + 9 + 31 = 34. Thus, we see that Y N, 34. 1. [4 points] If we define Bt tw1 Wt for t 1, then Bt is a standard Brownian bridge process. What is the probability that B.5 + B1 1? Solution: First of all, note that B1 = W1 W1 =, so the problem is a little easier than we might ve expected, i.e., just find PB.5 1. To this end, let s be real general and get the distribution of Bt which may or may not be given in the notes, but we ll derive it anyway. Since Bt = tw1 Wt is a linear combination of normals, it is itself normal. Moreover, since E[Wt] = for all t, we have E[Bt] = E[tW1 Wt] = t E[W1] E[Wt] = for all t [, 1]. Further, since VarWt = t and CovWs, Wt = mins, t for all s and t [, 1], we have VarBt = VartW1 Wt = t VarW1 + VarWt t CovW1, Wt = t 1 + t t min1, t = t t = t1 t. Thus, we see that Bt N, t1 t, and in particular, B.5 N,.5. Finally, P[B.5 1] = P [ N,.5 1 ] = P [ N, 1 ] = 1 Φ =.8.
6 13. [16 points] In the following questions, assume that X 1, X,... are i.i.d. with whatever distribution I tell you. a TRUE or FALSE? If S is the sample variance and σ = VarX i, then as + b is unbiased for aσ + b. Solution: TRUE. b TRUE or FALSE? If the X i s are Bernp, then the sample variance S is unbiased for p. Solution: FALSE. c Suppose that ˆθ is an estimator of some parameter θ such that E[ˆθ] = θ and Varˆθ = 1.5 θ. Find mean squared error of ˆθ MSE = bias + var. Solution:.5 θ d Suppose X 1 = 1, X = 5, and X 3 = 3 are i.i.d. Norµ, σ realizations. Calculate the MLE of σ. Solution:.67 e TRUE or FALSE? If the X i s are Expλ and X is the sample mean, then e X is the MLE for e λ. Solution: FALSE. f Suppose X 1 = 3, X = 15, and X 3 = are i.i.d. Unifθ,. Find the MLE for θ. Solution: 15 g TRUE or FALSE? In order to use the bisection method to solve for a zero of some function gx, you need to know the derivative d dx gx. Solution: FALSE.
7 h Describe the thinning method in your own words. Solution: Thinning. 14. [8 points] The number of defects in printed circuit boards is hypothesized to follow a Geometricp distribution. A random sample of n = 7 printed boards has been collected, and the number of defects observed. Here are the results. number of defects observed frequency 1 4 18 3 1 4 9 5 7 a What is the MLE of p for this data? Solution: ˆp = 1/ X =.419 b We are interested in performing a χ goodness-of-fit test to test the Geometric hypothesis. What is the test statistic, χ? Solution: Let X Geomp denote the number of defects on a board. Since the MLE of p is ˆp = 1/ X =.419, the Invariance Property of MLEs implies that the MLE of the probability that X equals a particular value k is PX = k = 1 ˆp k 1ˆp =.588 k 1.419, k = 1,,.... Therefore, the expected number of times out of 7 boards that we observe exactly k defects is approximated by E k = 7 PX = k =.588 k 1.419, k = 1,,.... This immediately yields the following augmented table, from which we ll be able to calculate the χ goodness-of-fit statistic.
8 # defects k O k E k 1 4 9.344 18 17.43 3 1 9.898 4 9 5.749 5 7 7.966 7 7 Note that the last row is denoted by 5, and the associated MLE of the probability is simply PX 5 = 1 4 PX = k =.1138, k so that things end up summing to one. We get that last expected value entry by 7 PX 5 = 7.966. Finally, we obtain the answer by adding up the stuff in the five rows as follows, χ = k O k E k E k = 3.43. c Suppose α =.5. What is the appropriate quantile to compare χ against? Solution: χ α,k 1 s = χ.5, 3 = 7.81 Note: Don t combine! Don t forget 5, else you will reject! d Reject or fail to reject the Geometric hypothesis? Solution: Fail to reject. 15. [4 points] Consider the PRN s U 1 =.6, U =.9, and U 3 =.1. Use Kolmogorov- Smirnov with α =.5 to test to see if these numbers are indeed uniform. Give me the test statistic, the quantile, and your accept/reject decision. Solution: Need to make a little table, where n = 3 and the R i s denote the ordered PRN s.
9 i 1 3 R i.1.6.9 i n i.33.67.1 R i i 1.1.67.33 n Thus, D + = max i { i R n i} =.33, and D = max i {R i i 1 } =.67, and so n finally the K-S test stat is D = maxd +, D =.67. The necessary quantile is D α,n = D.5,3 =.78. So we fail to reject uniformity. 16. [4 points] Suppose that Ȳ1,m = 1, Ȳ,m = 3, and Ȳ3,m = are three batch means resulting from a simulation run of total size n = 3. Find a 95% two-sided confidence interval for the mean. Solution: Note that we have b = 3 batches of size m = 1. The grand sample mean is Ȳ n = 1 b Ȳ i,m = 1.333, b while ˆV B = m b 1 So the 95% batch means CI for µ is b Ȳi,m Ȳn = 1 b Ȳi,m 1.333 = 33.35. µ Ȳn ± t α/,b 1 ˆVB /n = 1.5 ± t.5,.7778 = 1.5 ± 4.33.7778 = 1.5 ± 3.795 = [.46, 5.18]. 17. [4 points] Suppose that µ [ 1, 11] is a 9% confidence interval for the mean cost incurred by a certain inventory policy. Further suppose that this interval was based on 4 independent replications of the underlying inventory system. Unfortunately, the boss has decided that she wants a 95% confidence interval. Can
1 you supply it? Solution: The 9% confidence interval is of the form [ 1, 11] = X ± t α/,b 1 y = 5 ± t.5,3 y = 5 ±.353 y Since the half-length of the CI is 6, we must have that y = 6/.353 = 5.5. The 95% CI will therefore be of the form X ± t.5,3 y = 5 ± 3.185.5 = 5 ± 81.14 = [ 31.14, 131.14]. 18. [ points] TRUE or FALSE? Welch s method is a graphical technique to estimate truncation points for steady-state simulation. Solution: TRUE. 19. [4 points] Suppose that we re studying a stochastic process whose covariance function is R i = 3 i for i =, ±1, ±, and otherwise. Find the variance of X5 the sample mean of the first 5 observations. Solution: [ n 1 Var X n = 1 R + n = 1 [ 4 3 + 5 = 1 [ 3 + 5 = 1 [ 3 + 5 = 1.48 1 i ] R i n ] R i 1 i 5 1 i ] R i 5 4 5 + ] 3 1 5 since R 3 = R 4 =. [1 points] Short Arena Questions
11 a What word do you use to obtain a transporter in an LEAVE block? Solution: Request. b TRUE or FALSE? It is possible to conveniently use a PLAN block in Arena to force an entity to visit the same station or resource multiple times, each with different service times. Solution: FALSE. c TRUE or FALSE? An Arena resource can belong to more than one resource set. Solution: TRUE. d In what Arena template would you define an expression? Solution: Advanced Process. e TRUE or FALSE? You are allowed to use the same resource in two different PROCESS blocks. Solution: TRUE. f In Arena, what happens to an entity that attempts to enter a capacitated full queue? Solution: Killed off.