Finals - W09 - University of Waterloo tudent Last(Family...

This preview shows page 1 - 14 out of 14 pages.

Image of page 1

Subscribe to view the full document.

Image of page 2
Image of page 3

Subscribe to view the full document.

Image of page 4
Image of page 5

Subscribe to view the full document.

Image of page 6
Image of page 7

Subscribe to view the full document.

Image of page 8
Image of page 9

Subscribe to view the full document.

Image of page 10
Image of page 11

Subscribe to view the full document.

Image of page 12
Image of page 13

Subscribe to view the full document.

Image of page 14

Unformatted text preview: University of Waterloo tudent Last (Family) Name: Student First (Given) Name: UW Dir (i.e. jsmith): -_ Course Abbreviation and Number Course Title Please Circle your section: Instructor University of Waterloo Final Examination Term: Winter Year: 2009 S UW Student ID Number (i.e. 2020,2020): STAT 340 & CS 437 Computer Simulation of Complex Systems STAT 340 001 — 10-1 1 :20 Tues and Thurs CS 437 001 — 10-11220 Tues and Thurs Deferred - Details: Riley Metzger Date of Exam Time Period Duration of Exam Number of Exam Pages (including this cover sheet) Exam Type Additional Materials Allowed Total Marks Available: Thursday, April 16th, 2009 Start time: 9:00am End time: 11:30am 2.5 hours 14 Closed Book One Math Faculty Approved Calculator \1 95 Stat 340 Winter 2009 \ 1. [14 Marks] Fill in the blanks. Each blank is worth 2 marks. (a) Given X ~ N (2,4) and Y ~ N (0, 1), o HOW would you generate a random variable from a X2 7 (2) \ o How would you generate a random variable from a N (37 9)? 1 o How would you generate a random variable from a Gama (1, —> ? o How would you generate a random variable from an Exp (A = —> '? (b) Given an MMl queue, state the name of the distribution of the random variable representing... 0 The time of the first arrival? o The time before the second arrival? o The number of events up to time T? Page 2 of 14 Stat 340 Winter 2009 2. At a particular McDonalds there are 3 tills inside and 1 drive thru outside. (a) [4 Marks] Suppose that we have random variables X1, X2, ..., X", which are mutually independent and have distribution functions 171,172, ..., Fn respectively. Show that the distribution of the maximum, X(n) : T : max(X1,X2, ...,Xn) is given by F(t) : H2121 E(t) by starting from the definition of the CDF of T. (b) [5 Marks] It is known that for each of the 3 tills inside the time between departures is independent of the other tills with f (t) : sin(t) Where 0 S t 3 12E 0 Determine the GDP of the random variable re presenting the time the first person leaves from any one of the 3 tills. Show your work. 0 If Greg is at the front of till 1, his friend Clarise is at the front of till 2 and I am at the front of till 3, 7r . find the probability that the last of us to exit, leaves the line in the next — minutes. Page 3 of 14 Stat 340 Winter 2009 \ (c) [7 Marks] At the drive thru, it is thought that the arrivals follow a poisson process. For 50 one hour intervals throughout the month, the number of cars going through the drive thru was recorded. Calculate the observed test statistic (OTS) that could be used to confirm our suspicion (that this is poisson distributed). One of the bins must have, as its interval, [2, 00]. The PDF of a Poism) is f(x) = m where :c E {0,1,2,3, ...} and E (X) : p. The sorted numbers from R are below: 1‘. mean(x) length(x) table(x) [1] 1 [1] 50 x 0 1 2 3 En count 17 22 7 3 1 Page 4 of 14 Stat 3’40 Winter 2009 (d) [4 Marks] Assuming arrivals and departures at the drive thru follow a poisson process with rates 1 and 3 respectively. Use the table of uniform (Le. U (0, 1)) random variables provided (in order from left to right) and the algorithm for an M JV] 1 queue to fill out the queue table until the s ystem state is 0 [you may not need all rows in the table or random variables given] —_ 0,1 Table ““2! 0-70 0-05 0-15 Queue Table all times are in minutes Current NextArrival Number of Time Time ta 602 Page 5 of 14 Stat 340 Winter 2009 (e) [7 Marks] There are 1000 sorted drive thru interarrival times, denoted by oil. ..a1000. The analyst . . A 1 assumes that they follow from an exponential distribution w1th rate /\ : 4 largest distance between the CDF and the empiracle CDF amongst the ot - 0 Provide a fully labeled sketch to describe the how the KS distance is calculated in the last question. Page 6 of 14 Stat 340 Winter 2009 \ 3. We Wish to estimate the area beneath f(:1:) : exp (x2 — 1) for 0 S m S 1. A ”close” function to f(l‘), if needed, is g(:L') : exp(x) — 1 (note: g(x) is not a p.f.) The following is known about flat) and g(.r): E(f (X)) m 1.46; E ((f (X))2) e 2.36; Var (f (X)) e 0.23; E (g (X)) = e — 2 e 0.72; E ((g (X))2) e 0.76; Var (g (X)) m 0.24; E(f(X)9(X)) ”a 1-3; 00v (f (X) 79(X)) N 0-23; E(f(X)f(1—X)) e 0.19; Cov(f(X),f(1 —X)) z —0.06 (a) [1 Mark] State the numerical value of 0. (b) [3 Marks] Determine the efficiency of the antithetic estimator. (c) [2 Marks] Explain what the efficiency you calculated in (b) means to the general layperson. Page 7 of 14 Stat 340 Winter 2009 —\ (d) [3 Marks] For simplicity, assume we generate the numbers 0 and 1 from a U[0, 1]. Use these numbers and g(x) to estimate 0 using a control variate estimate, 6c“. (e) [6 Marks] Show that the optimal constant k, that minimizes the variance of an optimal control variate ~ ~ . _ C~00v(f(Xi)ag(Xi)) estlmator 15 k _ — a (.73 _ Var (g (Xi)) Page 8 of 14 Stat 3.40 Winter 2009 \ (f) [4 Marks] Determine the efficiencyof our optimal control variate estimator. 4. Consider the Cdf: F(t) : 1 — (1 — F1 (t)) (1 — F2 (t)) for 0 S :1: S 1. Let X7; be the variable generated from F205). (a) [2 Marks] Give an efficient algorithm (do not incorporate parts b to c) to generate a random variable from F(t). (b) [3 Marks] Let F1(t) : 0.2302 + 0.83:1/2. Give an efficient algorithm to generate a random variable from F1 (t) . Page 9 of 14 Stat 340 Winter 2009 \ x26“c (c) [8 Marks] Let F2 (t) : e . Give an efficient A—R algorithm to generate a random variable from F2 (t) . Please use the function g(a:) : 2x (which is a probability function) Page 10 of 14 Stat 340 Winter 2009 5. Dr. Hap Hazzard has created a new computer virus called Helter—Skelter. In essence this virus sends random numbers at computers until they crash. (a) [14 Marks] Dr. Hap Hazzard shows you a set of random numbers generated by his program ”Helter- Skelter”. The 28 generated numbers follow: 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,2 0 Perform a runs test on the above numbers. Please use an approximate 95% interval. 0 Dr. Hap decides to combine the numbers into groups of 3 and perform a poker test. 567, 890, 123, 456, 789, 012, 345, 678, 901 Do these numbers pass or fail the test? The corresponding test statistic (TS) is 5.99. Show your work. Page 11 of 14 Stat 340 Winter 2009 0 Below you will see a figure of the Helter-Skelter numbers in 2 dimensions. Test Statistic, using the indicated areas in the figure, to test whether the coordinates) are uniformly spread out in 2 dimensions. Calculate the Observed random numbers (the Page 12 of 14 Stat 340 Winter 2009 \ (b) [8 Marks] Helter—Skelter is actually a virus. He tests it in his lab on 4 computers and analyses the results using the Repair Problem. He assumes the breakdown times of the computers are distributed as T1- ~ EX P( 1) Vi E {1, 2, ..., 4} and that the repair times of the computers are distributed as Ri ~ EX P(2) where 7? E {1, 2}. He assumes that a technician can repair at most one computer at a time. There are 2 technicians. 0 Draw a system state diagram and label it with the appropriate states and rates of transition. . . . . 16 0 Determine the proportion of time that the system is not 1n state 2 or state 3 given 7r0 : — 87' . . 3 , o In what state will the system be in, on average, 1n the long run given 7T4 : —. 87 Page 13 of 14 Stat 340 Winter 2009 COOO'QQUleWMv-d meflmmmépwwmwwHHo—II—th—IHHH goooomomomomommwmmuxwwwo Quantiles for a xfi distribution with n degrees of freedom 0.01 0.05 0.5 0.9 0.95 0.99 0.995 0.999 0.000157 0.000157 0.00393 0.455 2.71 3.84 . 0.0201 0.0201 0.103 1.39 4.61 5.99 9.21 9.21 13.8 0.002 0.0243 0.115 0.115 0.352 2.37 6.25 7.81 11.3 11.3 16.3 0.0908 0.297 0.297 0.711 3.36 7.78 9.49 13.3 13.3 18.5 0.21 0.554 0.554 1.15 4.35 9.24 11.1 15.1 15.1 20.5 0.381 0.872 0.872 1.64 5.35 10.6 12.6 16.8 16.8 22.5 0.598 1.24 1.24 2.17 6.35 12 14.1 18.5 18.5 24.3 0.857 1.65 1.65 2.73 7.34 13.4 15.5 20.1 20.1 26.1 1.15 2.09 2.09 3.33 8.34 14.7 16.9 21.7 21.7 27.9 1.48 2.56 2.56 3.94 9.34 16 18.3 23.2 23.2 29.6 1.83 3.05 3.05 4.57 10.3 17.3 19.7 24.7 24.7 31.3 2.21 3.57 3.57 5.23 11.3 18.5 21 26.2 26.2 32.9 2.62 4.11 4.11 5.89 12.3 19.8 22.4 27.7 27.7 34.5 3.04 4.66 4.66 6.57 13.3 21.1 23.7 29.1 29.1 36.1 3.48 5.23 5.23 7.26 14.3 22.3 25 30.6 30.6 37.7 3.94 5.81 5.81 7.96 15.3 23.5 26.3 32 32 39.3 4.42 ' 6.41 6.41 8.67? h 1 16.3 24.8“: 727.6 33.4 33.4 40.8 4.9 7.01 7.01 9.39 17.3 26 28.9 34.8 34.8 42.3 5.41 7.63 7.63 10.1 18.3 27.2 30.1 36.2 36.2 43.8 5.92 ' 8.26 8.26 10.9 19.3 28.4 31.4 37.6 37.6 45.3 8.65 11.5 11.5 14.6 24.3 34.4 37.7 44.3 44.3 52.6 11.6 15 15 18.5 29.3 40.3 43.8 50.9 50.9 59.7 14.7 18.5 18.5 22.5 34.3 46.1 49.8 57.3 57.3 66.6 17.9 22.2 22.2 26.5 39.3 51.8 55.8 63.7 63.7 73.4 21.3 25.9 25.9 30.6 44.3 57.5 61.7 70 70 80.1 24.7 29.7 29.7 34.8 49.3 63.2 67.5 76.2 76.2 86.7 28.2 33.6 33.6 39 54.3 68.8 73.3 82.3 82.3 93.2 31.7 37.5 37.5 43.2 59.3 74.4 79.1 88.4 88.4 99.6 39 45.4 45.4 51.7 69.3 85.5 90.5 100 100 112 46.5 53.5 53.5 60.4 79.3 96.6 102 112 112 125 54.2 61.8 61.8 69.1 89.3 108 113 124 124 137 99.3 118 124 70.1 70.1 77.9 61.9 Table 8.3: The quantiles of the xz-distribution Page 14 of 14 ...
View Full Document

  • Spring '09
  • ChristianeLemieux

{[ snackBarMessage ]}

Get FREE access by uploading your study materials

Upload your study materials now and get free access to over 25 million documents.

Upload now for FREE access Or pay now for instant access
Christopher Reinemann
"Before using Course Hero my grade was at 78%. By the end of the semester my grade was at 90%. I could not have done it without all the class material I found."
— Christopher R., University of Rhode Island '15, Course Hero Intern

Ask a question for free

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern