---
created_at: '2015-06-03T14:41:11.000Z'
title: What happens when you add a new teller? (2008)
url: http://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/
author: isp
points: 78
story_text: 
comment_text: 
num_comments: 36
story_id: 
story_title: 
story_url: 
parent_id: 
created_at_i: 1433342471
_tags:
- story
- author_isp
- story_9652882
objectID: '9652882'

---
[Source](https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/ "Permalink to Adding a new teller | queuing theory example")

# Adding a new teller | queuing theory example

[ ![John D. Cook][1] ][2]

[Skip to content][3]

* [ABOUT][4]
* [SERVICES][5]
    * [APPLIED MATH][6]
    * [STATISTICS][7]
    * [COMPUTATION][8]
* [WRITING][9]
    * [BLOG][2]
    * [TECHNICAL NOTES][10]
    * [JOURNAL ARTICLES][11]
    * [TWITTER][12]
    * [PRESENTATIONS][13]
    * [NEWSLETTER][14]
* [CLIENTS][15]
    * [ENDORSEMENTS][16]

[(832) 422-8646][17]

[Contact][18]

# What happens when you add a new teller?

Posted on [21 October 2008][19] by [John][20]

Suppose a small bank has only one teller. Customers take an average of 10 minutes to serve and they arrive at the rate of 5.8 per hour. What will the expected waiting time be? What happens if you add another teller?

We assume customer arrivals and customer service times are random (details later). With only one teller, customers will have to wait nearly **five hours** on average before they are served. But if you add a second teller, the average waiting time is not just cut in half; it goes down to about **3 minutes**. The waiting time is reduced by a factor of 93.

Why was the wait so long with one teller? There’s not much slack in the system. Customers are arriving every 10.3 minutes on average and are taking 10 minutes to serve on average. If customer arrivals were exactly evenly spaced and each took exactly 10 minutes to serve, there would be no problem. Each customer would be served before the next arrived. No waiting.

The service and arrival times have to be very close to their average values to avoid a line, but that’s not likely. On average there will be a long line, 28 people. But with a second teller, it’s not likely that even two people will arrive before one of the tellers is free.

Here are the technical footnotes. This problem is a typical example from queuing theory. Customer arrivals are modeled as a Poisson process with λ = 5.8/hour. Customer service times are assumed to be exponential with mean 10 minutes. (The Poisson and exponential distribution assumptions are common in queuing theory. They simplify the calculations, but they’re also realistic for many situations.) The waiting times given above assume the model has approached its steady state. That is, the bank has been open long enough for the line to reach a sort of equilibrium.

Queuing theory is fun because it is often possible to come up with surprising but useful results with simple equations. For example, for a single server queue, the expected waiting time is λ/(μ(μ – λ)) where λ the the arrival rate and μ is the service rate. In our example, λ = 5.8 per hour and μ = 6 per hour. Some applications require more complicated models that do not yield such simple results, but even then the simplest model may be a useful first approximation.

**Related post**: [Server utilization: Joel on queuing][21]

For daily posts on probability, follow [@ProbFact][22] on Twitter.

![ProbFact twitter icon][23]

Categories : [Math][24]

Tags : [Queuing theory][25]

Bookmark the [permalink][26]

# Post navigation

Previous Post[Data synthesis][27]

Next Post[Freeing Vista diskspace][28]

##  9 thoughts on “What happens when you add a new teller?”

1. John Venier

[ 22 October 2008 at 10:27  ][29]

Wow, that’s amazing! I never would have guessed, but when you put it in terms of _slack_ it makes sense.

2. [Neil Gunther][30]

[ 4 May 2009 at 15:47  ][31]

This example is dramatic because the lone teller is already near saturation (arrival rate ~= service rate) and the queue is growing unbounded. So naturally, adding  
another teller will halve the utilization of each and reduce the queue size significantly.

I used [PDQ-R][32] to check your calculations. See below, although the formatting might die in this little Reply box. The original waiting line has 28 people in steady state and indeed the residence time is 5 hrs. In the 2nd scenario, a customer only waits about 30% of the time and their mean waiting time is about 3 mins (0.0508 Hours), as you stated.

A more interesting question is, what happens if we now double the traffic rate into the bank with 2 tellers? See PDQ report 3. Even though the tellers will return to being as busy as the original lone teller, the waiting time is only 2.3757 Hours;  
half that in scenario 1. Dual tellers really win!

The great feature of 2 tellers or a dual-core processor, is that the customer (or thread) at the *head* of the waiting line gets serviced by the next available teller.  
The benefit over a single teller is due to the variation about the mean service period S. With an exp service time dsn, the variance is the same magnitude as the mean. So, if one customer is opening a new bank account (long service period), other customers (with shorter transactions) can be serviced *in parallel* by the other teller.

New question: What happens if a 3rd teller is added? 🙂

`  
=======================================  
****** PDQ Model Results *******  
=======================================

1\. Single teller model.

Node Sched Resource Workload Class Demand  
\---- ----- -------- -------- ----- ------  
1 MSQ teller deposit TRANS 0.1667

****** RESOURCE Performance *******

Metric Resource Work Value Unit  
\------ -------- ---- ----- ----  
Throughput teller deposit 5.8000 Cust/Hour  
Utilization teller deposit 96.6667 Percent  
Queue length teller deposit 29.0000 Cust  
Waiting line teller deposit 28.0333 Cust  
Waiting time teller deposit 4.8333 Hour  
Residence time teller deposit 5.0000 Hour

2\. Add another teller.

Node Sched Resource Workload Class Demand  
\---- ----- -------- -------- ----- ------  
2 MSQ teller deposit TRANS 0.1667

****** RESOURCE Performance *******

Metric Resource Work Value Unit  
\------ -------- ---- ----- ----  
Throughput teller deposit 5.8000 Cust/Hour  
Utilization teller deposit 48.3333 Percent  
Queue length teller deposit 1.2613 Cust  
Waiting line teller deposit 0.2947 Cust  
Waiting time teller deposit 0.0508 Hour  
Residence time teller deposit 0.2175 Hour

3\. Double the customer traffic as well.

Node Sched Resource Workload Class Demand  
\---- ----- -------- -------- ----- ------  
2 MSQ teller deposit TRANS 0.1667

****** RESOURCE Performance *******

Metric Resource Work Value Unit  
\------ -------- ---- ----- ----  
Throughput teller deposit 11.6000 Cust/Hour  
Utilization teller deposit 96.6667 Percent  
Queue length teller deposit 29.4915 Cust  
Waiting line teller deposit 27.5582 Cust  
Waiting time teller deposit 2.3757 Hour  
Residence time teller deposit 2.5424 Hour  
`

3. [Neil Gunther][30]

[ 4 May 2009 at 20:35  ][33]

I see that you discuss R elsewhere in your blog, so here is the PDQ-R (Pretty Damn Quick in R) code for the above Bank model.  
`  
# PDQ v5.0  
# Created by NJG on Monday, May 4, 2009  
library(pdq)  
arrival_rate=5.8 * 2 # cust/hr  
service_time=10.0/60 # 10 minutes  
Init("M/M/m Blog Example")  
#define the workflow  
CreateOpen("deposit", arrival_rate)  
SetWUnit("Cust")  
SetTUnit("Hour")  
#define an m-server queue (here m = 2)  
CreateMultiNode(2,"teller", CEN, FCFS)  
#define the service demand on the server  
SetDemand("teller", "deposit", service_time)  
Solve(CANON)  
Report()  
`

4. David Anderson

[ 30 December 2011 at 11:11  ][34]

I’m totally on board with Exponential arrivals, but wouldn’t M/G/1 but a more accurate representation of a bank queue? Service times are probably much closer to Normal than Exponential. I know M/M/1 is nice and clean, but probably not that accurate. And the long tail of exponential service times is what creates lots of the backlog and excess waiting times.

5. R.S.S.

[ 30 December 2011 at 11:12  ][35]

Queuing Theory is fun. Thank your U.S. Navy for a lot of work in the area.

6. mikemikemikemikemike

[ 3 June 2015 at 13:48  ][36]

You state that each customer takes 10 minutes to service. You then state that a customer comes every 10.3 minutes. How the hell is there a 5 hour wait, and why are there 28 people in line?

Customer 1 shows up, takes 10 minutes, leaves  
.3 minutes lapse while teller 1 takes a bump of coke  
Customer 2 shows up…

Am I confused?

7. John

[ 3 June 2015 at 20:44  ][37]

You are correct, if customers arrive regularly on the schedule in your example. The problem is that people arrive randomly. In the best case scenario, there’s never a line, though that’s extremely unlikely. It’s far more likely that the line will grow over time until it reaches an equilibrium around 5 hours.

8. Pingback: [A little simplicity goes a long way][38]

9. Pingback: [Server Utilization: Joel On Queuing][39]

### Leave a Reply [Cancel reply][40]

Your email address will not be published. Required fields are marked *

Comment

Notify me of followup comments via e-mail

Name *

Email *

Website

Search for:

![John D. Cook][41]

**John D. Cook, PhD**

  
  
  
  

  
  

# Latest Posts

* [Fibonacci / Binomial coefficient identity][42]
* [Painless project management][43]
* [New animation feature for exponential sums][44]
* [Quantifying normal approximation accuracy][45]
* [Ordinary Potential Polynomials][46]

# Categories

CategoriesSelect CategoryBusinessClinical trialsComputingCreativityGraphicsMachine learningMathMusicPowerShellPythonScienceSoftware developmentStatisticsTypographyUncategorized

| ----- |
| ![Subscribe to blog by email][47] | [Subscribe via email][48] | 
| ![RSS icon][49] | [Subscribe via RSS][50] | 
| ![Newsletter icon][51] | [Monthly newsletter][52] | 

### [John D. Cook][2]

© All rights reserved.

Search for:

[1]: https://www.johndcook.com/blog/wp-content/themes/ThemeAlley.Business.Pro/images/Logo.svg
[2]: https://www.johndcook.com/blog/
[3]: https://www.johndcook.com#content "Skip to content"
[4]: https://www.johndcook.com/blog/top/
[5]: https://www.johndcook.com/blog/services-2/
[6]: https://www.johndcook.com/blog/applied-math/
[7]: https://www.johndcook.com/blog/applied-statistics/
[8]: https://www.johndcook.com/blog/applied-computation/
[9]: https://www.johndcook.com/blog/writing/
[10]: https://www.johndcook.com/blog/notes/
[11]: https://www.johndcook.com/blog/articles/
[12]: https://www.johndcook.com/blog/twitter_page/
[13]: https://www.johndcook.com/blog/presentations/
[14]: https://www.johndcook.com/blog/newsletter/
[15]: https://www.johndcook.com/blog/clients-new/
[16]: https://www.johndcook.com/blog/endorsements/
[17]: tel:8324228646
[18]: https://www.johndcook.com/blog/contact/
[19]: https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/ "20:14"
[20]: https://www.johndcook.com/blog/author/john/ "View all posts by John"
[21]: https://www.johndcook.com/blog/2009/01/30/server-utilization-joel-on-queuing/
[22]: https://twitter.com/probfact
[23]: https://www.johndcook.com/twitter2018/probfact_no_padding.svg
[24]: https://www.johndcook.com/blog/category/math/
[25]: https://www.johndcook.com/blog/tag/queuing-theory/
[26]: https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/ "Permalink to What happens when you add a new teller?"
[27]: https://www.johndcook.com/blog/2008/10/21/data-synthesis/
[28]: https://www.johndcook.com/blog/2008/10/22/freeing-vista-diskspace/
[29]: https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/#comment-15570
[30]: http://www.perfdynamics.com
[31]: https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/#comment-15571
[32]: http://www.perfdynamics.com/Tools/PDQcode.html
[33]: https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/#comment-15572
[34]: https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/#comment-15573
[35]: https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/#comment-15574
[36]: https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/#comment-547193
[37]: https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/#comment-547270
[38]: http://www.johndcook.com/blog/2008/04/09/a-little-simplicity-goes-a-long-way/
[39]: http://www.johndcook.com/blog/2009/01/30/server-utilization-joel-on-queuing/
[40]: https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/#respond
[41]: https://www.johndcook.com/jdc_20170630.jpg
[42]: https://www.johndcook.com/blog/2018/02/22/fibonacci-binomial-coefficient-identity/ "Permanent link to Fibonacci / Binomial coefficient identity"
[43]: https://www.johndcook.com/blog/2018/02/20/painless-project-management/ "Permanent link to Painless project management"
[44]: https://www.johndcook.com/blog/2018/02/19/new-animation-feature-for-exponential-sums/ "Permanent link to New animation feature for exponential sums"
[45]: https://www.johndcook.com/blog/2018/02/19/quantifying-normal-approximation-accuracy/ "Permanent link to Quantifying normal approximation accuracy"
[46]: https://www.johndcook.com/blog/2018/02/17/ordinary-potential-polynomials/ "Permanent link to Ordinary Potential Polynomials"
[47]: https://www.johndcook.com/contact_email.svg
[48]: https://feedburner.google.com/fb/a/mailverify?uri=TheEndeavour&loc=en_US
[49]: https://www.johndcook.com/contact_rss.svg
[50]: https://www.johndcook.com/blog/feed
[51]: https://www.johndcook.com/newsletter.svg
[52]: https://www.johndcook.com/blog/newsletter

