Note: This document is a work in progress. This note will be removed when all the charts produced by the analysis are documented.
Sample path analysis is a deterministic analysis that can be run on any observed flow process history. It lets us reason about the dynamics and stability of flow processes over the long run, and in real-time.
We use sample path analysis to determine whether a process is stable, and if not what the causes of instability are, and what needs to be done to move the process towards operationally acceptable range of stability.
Please see our technical note: Sample path analysis is not a statistical technique.
The results of the analysis are a collection of charts that are written to an output directory.
For input events.csv, output is organized as
follows:
<output-dir>/
└── events/
└── <scenario>/ # e.g., latest
├── input/ # a snapshot of the input csv data
├── core/ # core flow metrics & tables
├── convergence/ # convergence vs divergence
├── stability/ # boundedness and existence of limits
├── advanced/ # optional deep-dive chartsThis reference describes every chart produced by the
samplepath CLI, grouped by chart type.
The example charts in this reference and the underlying narrative are discussed in our post Little’s Law in a Complex Adaptive System
The example charts in each section below are drawn from the Polaris scenario completed-stories-outliers-removed.
Note: All calculations are done in continuous time and all charts report time accumulations in hours.
Time series charts showing the core functions that govern the long run dynamics of a flow process.
To keep things grounded think of the csv file that you are providing as input to the analysis as the flow process under analysis.
The current version of the library only analyzes binary flow processes - where start and end dates represent arrivals/departures events, the effect we are measuring is the presence or absence of items in the process, and the sample path represents the counting process: the number of items present in the process at any moment in time (aka the WIP).
As we will note along the way, every concept in this document generalizes even for the much more general forms of flow processes once you plug in a different sample path. In particular, the set of outputs produced by sample path analysis are identical even after generalization!
This is why this set of charts is the foundation of flow process dynamics.
Conventions
All charts are defined over a finite observation horizon of length \(T_{\max}\).
Lower-case \(t\) is a parameter denoting instantaneous time.
Functions of \(t\) (such as \(N(t)\)) denote sample paths: the values of some measurable property of a process at a specific moment \(t \in [0,\,T_{\max}]\).
Upper-case \(T\) is a prefix parameter: a scalar value that determines a time interval \([0,\,T]\).
Functions of \(T\) (such as \(L(T)\), \(\Lambda(T)\), and \(w(T)\) below) are functionals: functions that take a sample path as input and compute a scalar value from the behavior of that function over that interval \([0,T]\). Here \(T\) can range over any value in the observation window \((0,\,T_{\max}]\).
These functionals are purely deterministic, pathwise calculations (definite integrals in our case) and should not be confused with statistical aggregates.
The input to the analysis is a sample path \(N(t)\).
There are four core functionals:
From these definitions it follows that
\[ L(T) = \frac{H(T)}{T} = \frac{A(T)}{T}.\frac{H(T)}{A(T)}. \]
Equivalently,
\[ L(T) = \Lambda(T).w(T). \]
This is the finite version of Little’s Law.
It is a deterministic identity that holds for every finite observation window \([0,T]\) with \(0 < T < \infty\) and \(A(T) > 0\). This implies that the three component functions always evolve in a way that preserves the identity.
The finite version of Little’s Law is thus a deterministic constraint that governs the global dynamics of any flow process, even ones that operate in complex adaptive systems. It is the foundation for adapting Little’s Law for use in complex systems.
Note: As we discuss in the Many Faces of Little’s Law, while the \(L=\lambda.W\) form of Little’s Law is incredibly powerful in operations management, much more can be unlocked once we consider the general \(H=\lambda.G\) form of Little’s Law.
The current version of the library does not provide the representations needed to compute sample paths for this general form of the law. But the key thing to note is that the analysis of this general form and all the charts we see here depend only on the shape of the sample path.
Thus what is missing are the sample path construction algorithms that lie upstream of this analysis and the algorithms to compute the necessary functionals for \(H(T)\). Once we provide this. the charts we produce are exactly the same for both forms of the law. This is why this set of charts is a very powerful tool to reason about flow dynamics.
So while it is easier to relate to these concepts expressed in terms of familiar ideas like WIP, Arrivals/Departure and Residence Time, all these concepts have natural generalizations when viewed from the lens of the general \(H=\lambda.G\) form.
This is the generalization we provide in The Presence Calculus.
This chart can be found at the top level under
<scenario>/
| File | What it shows | What it means |
|---|---|---|
sample_path_flow_metrics.png |
Four-panel vertical stack: N(t),
L(T), Λ(T), w(T) over
the same time axis. |
One-glance view of the core finite-window Little’s Law metrics and how they co-evolve along the sample path. |
In this chart the main thing to pay attention to are the relationships between the changes in each of these component charts over time.
It means that these are the only possible explanations:
In the last case there are two possibilities.
Since \(L(T)\) is the product of \(\Lambda(T)\) and \(w(T)\):
The last situation happens often when there is an internal feedback loop at play in the process.
All these different types of dynamics can be at play at different points in the evolution of the process. This chart is the place where all those long run dynamics will show most directly and clearly.
It helps us answer “how did the process evolve to produce the flow metrics we are seeing at any given moment in time?” These causal relationships allows us to monitor changes in L(T) and then immediately investigate the cause of that change.
See our post The Causal Arrow in Little’s Law for more discussion on what this means.
Each panel in the main chart is also written under
<scenario>/core/
| File | What it shows | What it means |
|---|---|---|
core/sample_path_N.png |
Step chart of N(t) (count of elements
present in the boundary) vs time. |
Raw sample path of WIP/presence: queues, surges, and droughts show up directly. |
core/time_average_N_L.png |
Line chart of L(T) = time-average of
N(t) over [0, T]. |
Tracks how average WIP over the observation window converges (or doesn’t). This is the “L” in Little’s Law, measured pathwise. |
core/cumulative_arrival_rate_Lambda.png |
Line chart of Λ(T) (cumulative arrival rate
A(T)/(T−t₀)), with optional percentile clipping
and warmup exclusion. |
Empirical arrival rate over time, with tools to ignore early transients and outliers. |
core/average_residence_time_w.png |
Line chart of w(T) (average residence time
over the window, in hours). |
Shows how the time items spend in the boundary evolves;
long/fat tails and slow drainage show up as increasing
w(T). |
core/littles_law_invariant.png |
Scatter of L(T) (x-axis) vs
Λ(T)·w(T) (y-axis) with y=x
reference line, equal aspect ratio. |
Pure Little’s Law invariant check: all finite points
should lie near y=x if the metric calculations
are consistent. |
Their detail descriptions follow.
sample_path_N.png
Since we measure in continuous time, this chart is a step chart.
This is a real time chart that reveals current congestion, bursts, and idle periods.
If you are familiar with Cumulative Flow Diagrams, \(N(t)\) represents the distance between the cumulative arrival line and the cumulative departure line in the diagram.
In stochastic process language, \(N(t)\) is a process over the flow process
the primary object under analysis. Little’s Law describes the
A key quantity in sample path analysis is the area under the sample path. This is calculated as the definite integral of the sample path curve over [0,T]
\[ H(T) = \int_0^T N(t) dt \]
Since the area is a product of the number of items present over time, the units of H(T) are in item-time. In the language of the Presence Calculus, \(H(T)\) is cumulative presence function over the sample path \(N(t)\).
The functions that drive flow-process dynamics are the time and item averages of H(T): L(T) and w(T). These continuous functions of time are the key quantities in the finite version of Little’s Law.
time_average_N_L.png
Time-average WIP:
L(T) is the time average of the area under
the sample path. May also be viewed as the rate at which the
area H(T) grows.
Its units are in items.
L(T) = (1/T) H(T)
Reveals whether long run average WIP diverges or converges. This is the key top level indicator of process stability. A flat line here indicates a stable process.
Please note once again that this is not a statistical average.
cumulative_arrival_rate_Lambda.png
Λ(T) is the arrival rate of items that have
arrived up to T (may include items that started before the
window):
Λ(T) = A(T) / T
It’s units are items/time
If WIP was zero at the beginning of the observation window, then this is the same as the arrival rate, otherwise this over-counts the arrival rate at the start, but as we observe the process for longer periods, those initial end-effects get averaged out.
average_residence_time_w.png
Average time items are observed as spending in the observation window up to time T (clips the time that is spent outside the window and thus not observed).
w(T) = H(T)/A(T)
Tracks how “observed time in system” evolves over the sample path. Its units are time.
Please see our posts What is Residence Time and How long does it take for an explanation of what this metric means.
Understanding the difference and relationship between residence time and familiar metrics like Lead Time, Cycle Time and Work Item Age is crucial for understanding why sample path analysis works and these posts explain this.
littles_law_invariant.png
This plot visualizes the finite version of Little’s Law at work.
It states that for all T,
L(T)=Λ(T)·w(T).
We verify this by showing that when we plot
L(T) vs Λ(T)·w(T) on a scatter
plot, all the points will lie on the with
y = x.
Notice how points cluster around certain values of L(T). These are significant operating modes for the process as it moves towards stable states.