Statistical Simulation Practice Final Exam INSTRUCTION: Answer to all 4 questions. Your R code file name should be ‘name schoolID.R’. 1. [10pts] Consider the COVID-19 situation in C island. Suppose that the instant occurrence rate of infected persons at time t has an intensity function λ(t) as follows: λ(t) = 3 exp ( −(t− 50) 2 200 ) . Estimate the 95% confidence interval for the total number of infected persons by time t = 100 in C island. [NOTE: Assume that there are no infected persons at time t = 0. Also, assume that the total number of infected persons by time t = 100 has a symmetric distribution] 2. [10pts] Consider the queueing system as shown below. Suppose that customer’s arrival has Poisson process (P.P) with rate λA = 2, server 1 has P.P with service rate λ1 = 0.2, server 2 has P.P with service rate λ2 = 0.5, and server 3 and 4 have P.P with the same rate λ3 = 0.3, respectively. Estimate the expected waiting time of individual customers in time interval [0,100] using ’simmer’ R package. 3. [15pts] Packages arrive at a mailing depot in accordance with a Poisson process having rate λA = 5. The weight of each package has the chi-square distribution with d.f. = 5(kg). There are two trucks picking up waiting packages. The capacity of the first truck is 500kg and the second one has 1, 000kg. we assume that first arrived packages are first picked up by trucks (first in, first out; FIFO). Note that each truck cannot load larger than their capacity. If the total weight of weighting packages is larger than their capacity, the trucks 1 can pick up packages upto their capacity and the other packages are still waiting. If the total weight of waiting packages is less than or equal to the capacity of a truck, the truck can load all waiting packages. Suppose that the arrivals of the first and second trucks have the exponential distributions with rate λ1 = 0.05 and λ2 = 0.01, respectively. Also, suppose that there is no package at time t = 0 and the first event of the system is the arrival of a package. Estimate the expected value of the total weight and the total number of packages that each truck picks up in time interval [0, 1000], respectively. 4. [15pts] Suppose that there is a CPU in the main computer and there are three termi- nal computers connected with the main computer. The three terminal computer inde- pendently send a job to the main computer. Time that each terminal send a job has exponential distribution with mean 9 and the size of each job has χ2 distribution with d.f. = 2. The CPU in the main computer can handle a job at a time. Time that it takes for the main computer to handle a job has exponential distribution with mean (3× size of a job). Once the main computer finishes a job, then the terminal can immediately receive the result. From this simulation, estimate the expected time that it takes for a terminal to get a result of a job in time interval [0, 1000]. 2
学霸联盟