Question: Using R programming: Please turn-in a hard copy of your R code along with a brief write-up of the solutions. 1. Simulation of a queuing

Using R programming:

Please turn-in a hard copy of your R code along with a brief write-up of the solutions.

1. Simulation of a queuing problem: a clinic has one doctor. Patients come into the clinic at random, starting at 9 a.m., according to a Poisson process with time parameter 20 minutes: that is, the time after opening at which the first patient appears follows an exponential distribution with expectation 20 minutes and then, after each patient arrives, the waiting time until the next patient is independently exponentially distributed, also with expectation 20 minutes. When a patient arrives, he or she waits until the doctor is available. The amount of time spent by the doctor with each patient is a random variable, uniformly distributed between 5 and 20 minutes. The office stops admitting new patients at 4 p.m. and closes when the last patient is through with the doctor. Simulate this process and find:

(a) How many patients came to the office?

b) How many had to wait for a doctor?

c) What was their average wait?

d) When did the office close?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!