Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

ProcessBehavior

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:

  1. Load your process data into a pandas DataFrame

  2. Wrap with ProcessBehavior for IDE auto-completion

  3. Formulate 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

  4. Analyze — run calculations and get results with charts, statistics, and residuals

  5. 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:

The integer codes are Bishop’s reference scale (“Bishop Table 1”):

CodeNameCell Sizes (N_kt)
1Full ReplicationAll N_kt >= 2
2No ReplicationAll N_kt = 1
3Partial ReplicationMix of N_kt = 1 and N_kt >= 2
4Incomplete, No SingletonsEmpty cells + all observed N_kt >= 2
5Incomplete, No ReplicationEmpty cells + all observed N_kt = 1
6Incomplete, With SingletonsEmpty 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:

Western Electric Rules

Built-in signal detection with configurable rules:

Publication-Quality Visualization

Interactive Plotly charts with multiple themes, zone shading, and professional styling.

Installation

pip install processbehavior

Plotly 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 export

Philosophy

ProcessBehavior follows Wheeler’s philosophy that process behavior charts are not about statistics—they’re about understanding variation. The package is designed to:

  1. Guide, not dictate - Recommend appropriate analyses while allowing expert override

  2. DataFrame-backed results - Access chart data, residuals, and effects as standard pandas DataFrames

  3. Separate concerns - Formulation, analysis, and visualization are distinct steps

  4. 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.}
}