Analyzing a queuing system
In the Running Monte Carlo simulations recipe, we presented basic methods for running a Monte Carlo simulation. Now, we will show you how you can calculate the confidence interval of a simulation output using bootstrapping.
Getting ready
First, you need to understand how an M/M/1 queue works. A basic introduction to this topic can be found at https://www.britannica.com/science/queuing-theory or https://en.wikipedia.org/wiki/M/M/1_queue. For our purposes, it is sufficient to know that in this model the time between two consecutive arrivals of a customer to the system has an exponential distribution (see http://mathworld.wolfram.com/ExponentialDistribution.html or https://en.wikipedia.org/wiki/Exponential_distribution). Customers are then served by a single server in a first-in/first-out schedule. The time taken by the service is also exponentially distributed.
Here is a simple visualization of a single server queue:
We are interested in the average time, over the long...