Python-native Process Behavior Charts with Bishop’s Variance Analysis System
ProcessBehavior brings Thomas A. Bishop’s rigorous Variance Analysis System (VAS) methodology to Python, with a modern API designed for data scientists and quality engineers.
Analyst Workflow¶
The ProcessBehavior workflow guides you from raw data to actionable insights:
Key Steps:
Load your process data into a pandas DataFrame
Wrap with
ProcessBehaviorfor IDE auto-completionFormulate your study — ProcessBehavior detects the design-state lineage (PDS / ODS / ADS) and determines:
Planned, Observed, and Analytical Design States on Bishop’s 1–6 reference scale
Valid and recommended charts (routed by ADS)
Available VAS residuals (R1–R5)
Main effects analysis
Interaction analysis
Analyze — run calculations and get results with charts, statistics, and residuals
Output — visualize with interactive plots, export to Excel, or detect Western Electric rule violations
What Makes ProcessBehavior Different?¶
Unlike traditional SPC packages that require you to manually select chart types and configure parameters, ProcessBehavior automatically detects the design-state lineage of your data — PDS (planned), ODS (observed), ADS (analytical) — and routes the analysis by what your data actually supports.
import pandas as pd
from processbehavior import ProcessBehavior
# Load your data
df = pd.read_csv("process_data.csv")
# Formulate your study
pb = ProcessBehavior(df)
study = pb.formulate(
response=pb.cols.measurement,
factors=[pb.cols.machine, pb.cols.operator],
time=pb.cols.timestamp
)
# ProcessBehavior reports the lineage and recommends charts
print(f"Observed: ODS {study.observed_design_state.sds}")
print(f"Analytical: ADS {study.analytical_design_state.sds}")
print(f"Recommended: {study.recommended_chart}")
# Analyze and visualize
result = study.execute()
result.plot(show_zones=True, highlight_signals=True)Key Features¶
Three-State Design-State Lineage¶
ProcessBehavior reports three design states at three points in the analysis lifecycle:
PDS (Planned) — what you intended to collect; ∈ {1, 2}
ODS (Observed) — what was actually collected, before NA-filtering; ∈ {1..6}
ADS (Analytical) — what survives tidying and drives chart selection, residuals, variance decomposition; ∈ {0, 1, 2, 3}
The integer codes are Bishop’s reference scale (“Bishop Table 1”):
| Code | Name | Cell Sizes (N_kt) |
|---|---|---|
| 1 | Full Replication | All N_kt >= 2 |
| 2 | No Replication | All N_kt = 1 |
| 3 | Partial Replication | Mix of N_kt = 1 and N_kt >= 2 |
| 4 | Incomplete, No Singletons | Empty cells + all observed N_kt >= 2 |
| 5 | Incomplete, No Replication | Empty cells + all observed N_kt = 1 |
| 6 | Incomplete, With Singletons | Empty cells + mixed N_kt |
ODS values in {4, 5, 6} collapse to ADS values in {1, 2, 3} during tidying.
Dr. Thomas A. Bishop’s Variance Analysis System (VAS)¶
For replicated designs, ProcessBehavior computes the complete residual decomposition:
R1: Total deviation (Y - grand mean)
R2: Within-cell variation (unexplained noise)
R3: Interaction residual (factor × time)
R4: Time effect + within-cell variation
R5: Factor effect + within-cell variation
R6: Factor main effect residual (computed on-the-fly per factor)
Western Electric Rules¶
Built-in signal detection with configurable rules:
Rule 1: Point beyond 3σ limits
Rules 2-8: Pattern detection for runs, trends, and zone violations
Publication-Quality Visualization¶
Interactive Plotly charts with multiple themes, zone shading, and professional styling.
Installation¶
pip install processbehaviorPlotly is included by default. Excel export and static-image export are optional extras:
pip install "processbehavior[excel]" # adds openpyxl for result.to_excel(...)
pip install "processbehavior[images]" # adds kaleido for static PNG/SVG exportQuick Links¶
Quickstart - Get up and running in 5 minutes
Coffee Shop - A complete analysis, start to finish
Design-state lineage - Understanding PDS / ODS / ADS
API Reference - Complete API reference
Philosophy¶
ProcessBehavior follows Wheeler’s philosophy that process behavior charts are not about statistics—they’re about understanding variation. The package is designed to:
Guide, not dictate - Recommend appropriate analyses while allowing expert override
DataFrame-backed results - Access chart data, residuals, and effects as standard pandas DataFrames
Separate concerns - Formulation, analysis, and visualization are distinct steps
Be explicit - No hidden defaults; all parameters are visible and documented
License¶
ProcessBehavior is released under the Apache 2.0 License.
Citation¶
If you use ProcessBehavior in your research, please cite:
@software{processbehavior,
author = {Nicholas, Chris and Bishop, Thomas A.},
title = {processbehavior: Process Behavior Charts and Variance Analysis for Python},
year = {2026},
url = {https://github.com/cnicholas/processbehavior}
}CITATION.cff in the repository root carries the same metadata in machine-readable
form — GitHub’s “Cite this repository” button reads it. Keep the two in step.
For the methodology itself, cite the book it implements:
@book{bishop2021,
author = {Bishop, Thomas A.},
title = {The Scientific Basis for Modern Analytic Practice},
year = {2021},
publisher = {Lulu Press, Inc.}
}