Definition · The three averages over a windowOver a window [0, T] in which n customers arrive at times aᵢ and leave at times dᵢ: N(t) is the number present at time t; L is the time-average of N(t), the area under it divided by T; λ is n/T; and W is the mean of the sojourn times dᵢ − aᵢ.
Take five customers arriving at 0, 1, 2, 5, 6 and leaving at 3, 4, 6, 8, 10. Nothing is assumed about why they arrived when they did or how long they were served. This is a record, not a model.
t 0 1 2 3 4 5 6 7 8 9
N(t) 1 2 3 2 1 2 2 2 1 1 area = 17
stays 3 − 0 = 3
4 − 1 = 3
6 − 2 = 4
8 − 5 = 3
10 − 6 = 4 sum = 17
The two seventeens are not a coincidence and they are not a check that might have failed. They are the same area, added in two directions.
Theorem · Little's Law, on a closed windowIf every customer who arrives in [0, T] has also departed by T, then L = λW exactly, where L, λ and W are as defined above.
Customer i contributes 1 to N(t) for t in [aᵢ, dᵢ) and 0 elsewhere, so the total area under N(t) is Σᵢ (dᵢ − aᵢ): adding the strips vertically and adding the bars horizontally are two orders of summation over the same finite set of unit cells.
Divide that equality by T. The left side is area/T = L. The right side is Σᵢ(dᵢ − aᵢ)/T, and multiplying and dividing by n makes it (n/T)·(Σᵢ(dᵢ − aᵢ)/n) = λW. No property of the arrival times or the service times was used, only that every stay lies inside the window.
□
On the trace above: L = 17/10, λ = 5/10 = 1/2, W = 17/5, and λW = (1/2)(17/5) = 17/10, which is L to the digit. The lab prints all three as exact fractions for whatever trace you type into it.
Where it appears to fail, and why that is never the law
Cut the same trace at T = 8, while the last customer is still inside. Now L = 15/8 = 1.875 and λW = (5/8)(13/4) = 65/32 = 2.03125. The two sides part company because λ counted five arrivals while W averaged the four stays that had finished. Extend the window to 10 and they agree again. Every report of “Little's Law not holding” on a real system is this: a measurement window with work still in flight, or three quantities measured at three different boundaries.
Example · A trace with no overlap at allArrivals at 0, 2, 4, 6, 8 and departures at 2, 4, 6, 8, 10: exactly one customer is present at every instant, so L = 1. With λ = 1/2 and W = 2, λW = 1. Here L is the fraction of time the system is occupied, which is the ρ of the previous lesson seen from this side.
What the identity does not give you is any information about the distribution of the waiting. W is a mean, and a mean says nothing about the p99 that Latency and the Tail measured. Two systems with identical L, λ and W can have entirely different tails.
The same counting argument works across any boundary you can draw, with λ the rate that crosses into it: a component, a thread pool, a whole datacentre. That generalisation is Operations Research, markov-chains-decisions-and-queues/littles-law, which cites this proof and carries the boundary version and the rule that the rate must be the one actually admitted — which is exactly what a lossy system later in this course will need.