# Little's Law

Harry Potter and the Sorcerer's Stone, Book 1 on Audible

As an Amazon Associate I earn from qualifying purchases. Thank you!

**Formula:**`L = λW`

## Introduction to Little's Law

Little's Law is a widely recognized theorem in queuing theory. It relates the number of items (
** L**
) in a queuing system to the average arrival rate (

**) and the average time (**

*λ***) an item spends in the system. Mathematically, it's expressed as**

*W***. It is applicable for stable systems where the average number in the system or in the queue, average arrival rate, and average waiting time remain constant over time.**

*L = λW*## Parameter usage:

`L`

(Average number of items in the system)`λ (lambda)`

(Average arrival rate of items)`W`

(Average time an item spends in the system)

## Output:

- The function returns
`true`

if L equals lambda multiplied by W, otherwise returns an error message if parameters are invalid.

## Data validation

`L`

, and `W`

should be greater or equal to zero and `λ`

should be greater than zero.

## Summary

The formula is crucial in designing and understanding processes and systems that involve waiting lines or queues, such as customer service desks, manufacturing processes, and computer networks.