Analyzing Simulation Data
February 21st, 2010 by Kristopher ReeseThis post will discuss various mathematical formulae that are used in Event Based Simulation for very simple analysis of the data from the simulation. For this post lets assume the following example simulation results:
| Customer | Inter-arrival Time | Arrival Time | Service Time | Begin Service | Wait Time | End Service | Time in System | Server Idle |
|---|---|---|---|---|---|---|---|---|
| 1 | - | 0 | 3.3 | 0 | 0 | 3.3 | 3.3 | 0 |
| 2 | 5.1 | 5.1 | 4.5 | 5.1 | 0 | 9.5 | 4.5 | 1.8 |
| 3 | 3.9 | 9.0 | 3.2 | 9.6 | 0.6 | 12.8 | 3.8 | 0 |
| 4 | 4.5 | 13.5 | 4.8 | 13.5 | 0 | 18.3 | 4.8 | 0.7 |
| 5 | 4.4 | 17.9 | 4.9 | 18.3 | 0.4 | 23.2 | 5.3 | 0 |
| 6 | 5.6 | 23.5 | 4.8 | 23.5 | 0 | 28.3 | 4.8 | 0.3 |
| 7 | 4.1 | 27.6 | 3.1 | 28.3 | 0.7 | 31.4 | 3.8 | 0 |
| 8 | 4.2 | 31.8 | 3.2 | 31.8 | 0 | 35 | 3.2 | 0.4 |
Since we have this data, we can do a very simple analysis of the resulting data. For the purposes of this post, I will present the mean service time, the mean inter-arrival time, the mean wait time for all customers and for just those customers who waited, server utilization, and the mean number of customers in the system.
Mean Service Time. The following equation can be used for determining the mean service time of the customers.
For our given example, we get:
Mean Inter-Arrival Time. The following equation can be used for determining the mean inter-arrival time of the customers.
For our example, we would get:
Mean Wait Time. We have two instances of the mean wait time to consider. The first is the mean wait time for all of the customers. In this case, we can find the mean wait time with:
For our example the mean wait time of all customers is:
In contrast, the mean wait time for only the customers who waited is:
Server Utilization. Server utilization is the percent of time in which the server was doing some form of work, or not idle. For this, we want to find the mean server idle time and subtract this number from 1. This will give us a value less than 1 which is the percent of utilization of the server. In otherwords:
For our example, we get:
Mean Number of Customers in System. Unlike the other equations, which are relatively trivial, the Mean number of Customers in the system is slightly trickier. However, we can still compute this using a relatively simple equation. First we want to define λ to be the mean interarrival rate and μ to be the mean service rate. With this, we can find the Traffic Intensity:
With ρ we can find the Mean number of Customers in the system with the following equation:
Therefore for our example, we can define ρ as and then solve the Mean Number of Customers in the System:
These equations are essential to know for simple statistical analysis of the data received by a simulation. There are much more complex equations within queuing theory that require the knowledge of these equations. So these are worthwhile equations to have memorized if you plan to do more complex statistical analysis of data.

Hood College
Univ. of Louisville
Elizabethtown Community and Tech. College