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.

Process Behavior Chart

Process behavior chart is Donald Wheeler’s name for what most textbooks call a control chart — and the rename is the point. “Control” suggests the chart’s job is keeping a process inside specifications; Wheeler’s term says what the chart actually does: it characterizes how the process behaves, so you can tell routine variation from a genuine change. Same math (Shewhart’s), better name. This library takes its own name from Wheeler’s usage; the terminology appendix maps his vocabulary to the textbook terms.

The 60-second version

import numpy as np
import pandas as pd
from processbehavior import ProcessBehavior

rng = np.random.default_rng(12)
temps = rng.normal(150.0, 3.0, 30)
temps[20:] -= 8            # the process changed at batch 21

df = pd.DataFrame({'batch': range(1, 31), 'seal_temp': temps.round(1)})

study = ProcessBehavior(df).formulate(response='seal_temp', time='batch')
result = study.execute(chart='X', companion=True)

s = result.get_statistics('X')
print(f"Center line: {s['center']}")
print(f"Natural process limits: ({s['lpl']}, {s['upl']})")
print(f"Signals: {result.detect_signals(chart='X').count}")
result.plot()

Output:

Center line: 147.38
Natural process limits: (139.07, 155.69)
Signals: 26

Reading it in Wheeler’s terms

Going further