Repository navigation
On PyPI: pip install --upgrade processbehavior.
PB 0.5.0 adds staged charts for subgrouped data. A process that changed on purpose, such as a new machine or a new procedure, can now be charted with each stage's own center line and limits on one Xbar/S chart, computed the way Dr. Thomas A. Bishop specified. Equation numbers are those of his VAS documentation manual (10-12-2026).
What changes
- Staged (phased) Xbar and S charts.
study.execute(chart='Xbar', phased=True, companion=True)gives each stage its own center line and limits, drawn as steps with a divider at each stage change.- Each stage is computed as a separate Xbar/S analysis: the center is the average of that stage's subgroup averages, with its own S̄ and σ̂ (Eqs 11-5, 11-8, 11-9, 11-16 and 11-17). Nothing is pooled across stages.
- When the study has other factors,
by=['stage', time]pools them into the subgroup. The center is then the average of the pooled subgroup averages, as Dr. Bishop specified. - On Wheeler's four-cavity thickness data, the per-cavity centers and limits match Minitab's staged Xbar-S chart.
- Signals use Rule 1 against each stage's own limits. The run rules are off, because their zones change from stage to stage.
- A phased chart has no single center or limits, so
get_statistics()returnsNonefor them, withlimits_vary=True.phase_statistics()has the per-stage values.
phase_statistics()gives the numbers behind each stage, on Xbar/S and on X/mR: one row per stage, with its center, S̄ or mR̄, σ̂ and limits.- A column of values with no time is charted in the order received.
pb.formulate(df, response='weight')used to be refused. The readings are numbered 1 to N and charted on an X/mR chart. - Xbar/S chart tables always show the subgroup and its size,
n, whatever theby=grouping. Some groupings used to drop both, so a point couldn't be traced to its subgroup. Limits and centers are unchanged. - X/mR charts keep the order of an ordered stage column (for example
before < after) instead of sorting the labels alphabetically. - A new tutorial, Staged Charts, follows a coffee shop that changed three times in sixteen weeks. It compares one set of limits with limits per stage, reads the S chart, puts every reading on a phased X/mR chart, and pools or splits a second factor.
Validation
- PB still matches VAS on every value compared across 14 of Dr. Bishop's VAS runs (PM SDS 1–6, PM INERT SDS 1–6, the known-effects data and the Medicare data): 1,547 values, 0 differences.
- 4 values still have no reference. They are factor S-chart limits in the known-effects run, which wait for a VAS rerun.
- 2,647 automated tests pass.
Upgrading
Existing analyses give the same numbers, with two exceptions:
- A study formulated with no time and no factors (
factors=[]) is now an X/mR chart in the order received. It used to be treated as one replicated subgroup. - An ordered categorical factor now orders the X/mR lanes by its categories, as it already ordered Xbar/S subgroups. On a
by=[]chart the moving ranges between lanes follow the new order, so its limits can change.
The chart data gains two columns: Xbar/S chart data and tables have n, and phased charts have phase. Code that picks columns by position may need updating.
Full detail is in the changelog.