GOLD STANDARD · QUEUEING THEORY · HOW X WORKS
Find the decision hidden inside the model
Mean service time alone does not determine mean waiting. In an M/G/1 queue, a random arrival is more likely to meet a long job in progress, so the second moment of service time enters the answer through residual service.
This guide connects the Gold Standard of Queueing Theory, Gold Standard of Education, and How X Works hub.
Chapter contents and reading routes
Choose the route closest to your present task. Every chapter remains expanded, so the article also reads naturally from start to finish.
Start with the M/G/1 mechanism
Follow the worked calculation
Test variability and assumptions
Transfer the reasoning
Use evidence and next routes
CHAPTER 1 OF 12 · ORIENT THE QUEUE
1. The job you meet is not an average job
Imagine arriving at one server at an arbitrary time. If service durations vary, a long job occupies the server for more clock time than a short one. Your arrival is therefore more likely to land inside a long service interval. This is the inspection-paradox effect inside the queue.
The residual service is the unfinished portion of the job currently in service. It is the first delay seen by an arrival that finds the server busy, before the already waiting jobs and the new job’s own service are considered.
CHAPTER 2 OF 12 · ORIENT THE QUEUE
2. State the M/G/1 contract before using the formula
The Pollaczek–Khinchine mean formula applies to an M/G/1 queue: Poisson arrivals with rate λ, independent and identically distributed service times S with a general distribution, one work-conserving server and a stable first-come, first-served system. Write ρ = λE[S] for utilisation and require ρ < 1.
The G allows many service-time shapes, but not arbitrary arrival dependence, priorities, vacations or service times coupled to the arrival process. Those changes can alter what an arrival sees and how work accumulates.
CHAPTER 3 OF 12 · BUILD THE MEAN WAIT
3. Residual service brings in the second moment
For a random time point, the mean remaining length of the service interval is E[S²]/(2E[S]). An arrival sees that residual only when the server is busy, which occurs with probability ρ under the M/G/1 assumptions. The unconditional residual contribution is therefore ρE[S²]/(2E[S]) = λE[S²]/2.
This step explains why two systems with the same mean service can wait differently. Squaring gives long services disproportionate influence: a rare 20-minute job contributes 400 minute² to the second moment, whereas a 2-minute job contributes only 4.
CHAPTER 4 OF 12 · BUILD THE MEAN WAIT
4. Work the mean wait from minutes, not intuition
Suppose arrivals occur at 6 per hour, or λ = 0.1 per minute. Service is 2 minutes half the time and 8 minutes half the time. Then E[S] = 5 minutes, E[S²] = (2² + 8²)/2 = 34 minute² and ρ = 0.1 × 5 = 0.5.
The queueing mean is Wq = λE[S²]/(2(1−ρ)) = 0.1 × 34 /(2 × 0.5) = 3.4 minutes. Add the 5-minute service mean to obtain a mean system time of 8.4 minutes. Units are a useful audit: arrivals per minute times minute² gives minutes.
| Quantity | Worked value | Role |
|---|---|---|
| Arrival rate λ | 0.1 per minute | How quickly work enters |
| Mean service E[S] | 5 minutes | Sets utilisation ρ = 0.5 |
| Second moment E[S²] | 34 minute² | Sets residual-service burden |
| Mean queue wait Wq | 3.4 minutes | Excludes own service |
CHAPTER 5 OF 12 · BUILD THE MEAN WAIT
5. Derive the denominator from work already ahead
An arrival waits for the residual job plus the full services of customers already queued. By PASTA, Poisson arrivals see time averages; by Little’s law, the mean number waiting is λWq. Thus Wq = λE[S²]/2 + λWqE[S].
Move the second term to the left: Wq(1−ρ) = λE[S²]/2. Dividing by 1−ρ gives the Pollaczek–Khinchine result. The denominator is not a decorative correction; it represents the extra work that accumulates while the tagged customer waits.
CHAPTER 6 OF 12 · TEST VARIABILITY
6. Separate utilisation from variability
Write the squared coefficient of variation as Cs² = Var(S)/E[S]². Since E[S²] = E[S]²(1+Cs²), the same formula becomes Wq = ρE[S](1+Cs²)/(2(1−ρ)).
Utilisation controls how little spare capacity remains. Cs² controls how unevenly service work arrives in chunks. Near ρ = 1, both are amplified by the small denominator, so modest variability changes can create large waiting changes.
CHAPTER 7 OF 12 · TEST VARIABILITY
7. Compare equal means with different shapes
Keep λ = 0.1 per minute and make every service exactly 5 minutes. Then E[S²] = 25, ρ remains 0.5 and Wq = 2.5 minutes. The earlier two-point mixture waits 3.4 minutes: 0.9 minute more despite identical arrival rate, mean service and utilisation.
An exponential service time with mean 5 minutes has E[S²] = 50, giving Wq = 5 minutes. The comparison isolates a real design lever: standardising service duration can reduce mean waiting even when average processing speed does not change.
| Service pattern | E[S²] | Mean queue wait |
|---|---|---|
| Always 5 minutes | 25 minute² | 2.5 minutes |
| Half 2, half 8 minutes | 34 minute² | 3.4 minutes |
| Exponential, mean 5 minutes | 50 minute² | 5.0 minutes |
CHAPTER 8 OF 12 · TRANSFER AND AUDIT
8. Transfer the mechanism to machine repair
Replace customers with failed machines and the server with one repair technician. The stable structure is Poisson failure arrivals, one repair channel, independent repair durations and first-come service. A technician encountered during a long overhaul has a large residual workload, just as a customer arriving during a long consultation does.
The changed-context check is to rebuild λ, E[S], E[S²] and the discipline from repair records. Copying a waiting estimate from the service desk would fail because breakdown clustering, job priority or travel time may violate the M/G/1 contract.
CHAPTER 9 OF 12 · TRANSFER AND AUDIT
9. Estimate moments without hiding unfinished work
Estimate service time from start-to-finish durations in a window long enough to include rare long jobs. Right-censoring unfinished services by discarding them will usually pull both the mean and second moment downward. Preserve observation rules and use survival methods when completion is not observed for every job.
Report the second moment or variance, not only the mean. A mean of five minutes gives no way to distinguish the three rows in the comparison table. Also segment genuine service classes when a single mixture would hide an operationally meaningful cause.
CHAPTER 10 OF 12 · TRANSFER AND AUDIT
10. Know where the result stops transferring
The formula is not a generic law for every single-server queue. Renewal arrivals create a GI/G/1 problem; priorities make waiting class-specific; vacations and setups add delay; service that depends on congestion breaks independence; heavy tails can make E[S²] enormous or infinite.
A stable ρ below one is necessary, not a promise of comfortable waits. At ρ = 0.95 the denominator is 0.05, so uncertainty in rates and moments is strongly magnified. Check empirical dependence, tails and policy before treating one mean as a capacity decision.
CHAPTER 11 OF 12 · CHECK AND CONTINUE
11. Questions readers often ask
Why does my own service time not appear in Wq?
Wq is the wait before service begins. Your own mean service is added afterward to obtain W = Wq + E[S]. Its distribution still matters indirectly because the same service law governs other jobs you meet.
Does reducing the longest jobs always help?
It reduces the second moment when the mean is held roughly fixed, but operational changes can shift arrivals, priorities or rework. Recompute the complete model and check service quality rather than optimising one statistic in isolation.
CHAPTER 12 OF 12 · CHECK AND CONTINUE
12. Evidence, connected routes and the next check
MIT’s M/G/1 lecture notes derive the formula through residual service, PASTA and Little’s law. The MIT OpenCourseWare M/G/1 notes add numerical development and priorities.
Continue through Lindley recursion and GI/G/1 stability, unfinished jobs and service-time estimation, and Burke’s theorem and Poisson departures. The practical evidence check is to recompute Wq after replacing the observed second moment with plausible lower and upper values.
Contents · Previous chapter · Return to the Queueing Theory root