Interarrival time is a value used in queuing theory. Queuing theory uses models to analyze systems that involve waiting in lines for a service, such as customers in a check-out line in the supermarket. The interarrival time is the amount of time between the arrival of one customer and the arrival of the next customer. It is calculated for each customer after the first and is often averaged to get the mean interarrival time, represented by lambda.

Sort the queue arrival data in ascending order by arrival time. As an example take the data set of customer arrival time in minutes since store opening: {1, 5, 6, 8, 10}.

Subtract the arrival time of the first customer from that of the second customer. For the example, 5 -- 1 = 4; so, the interarrival time between the first and second customer is 4 minutes.

Repeat the process for each customer to get all the interarrival times for your dataset. You will get one data point less than your original set. Finishing the example, {4, (6-5), (8-6), (10-8)} = {4, 1, 2, 2}. The average interarrival time in this example is (4+1+2+2)/4, or 9/4, or 2.25 minutes

#### Tip

Interarrival time is useful in situation where you manage lines. For example, if you manage a supermarket and the average interarrival time is 2.25 minutes, and it takes a cashier 4 minutes on average to complete a customer's order, the line will grow faster than the cashier can process customers, meaning you should add another cashier. The same theory governs how many security checkpoints are open in the airport.