Skip to content
Quality & Process Control

What Is SPC (Statistical Process Control)

SPC uses production test data to separate normal variation from real problems. Learn the core tools, how they connect, and how TofuPilot automates SPC.

JJulien Buteau
beginner7 min readMarch 18, 2026

Statistical Process Control (SPC) is a method for monitoring and controlling a manufacturing process using data. Instead of inspecting quality at the end, SPC tracks measurements continuously to catch problems while they're still fixable. The core idea: every process has variation, and SPC helps you tell the difference between normal noise and something that actually changed.

Common Cause vs Special Cause Variation

All manufacturing processes produce variation. SPC splits it into two types.

Common cause variation is inherent to the process. Instrument noise, slight material differences, ambient temperature fluctuations. It's random, stable, and predictable within a range. You can't eliminate it without fundamentally changing the process.

Special cause variation is something new. A calibration drifted, a component lot changed, a fixture pin bent. It's non-random and signals that the process changed. SPC tools are designed to detect this.

The goal isn't zero variation. It's knowing which type you're looking at so you take the right action. Adjusting a process in response to common cause variation (overreacting to noise) actually makes things worse.

The SPC Toolkit

SPC has a small set of tools. Each answers a different question about your process.

ToolQuestion It AnswersWhat to Look For
Control chartIs my process stable over time?Points outside control limits, patterns, trends
HistogramWhat does my distribution look like?Shape, centering, spread relative to spec limits
Capability indices (Cp, Cpk)Can my process meet spec short-term?Values above 1.33
Performance indices (Pp, Ppk)Can my process meet spec long-term?Values close to Cp/Cpk (stable process)
Cpk trendIs capability improving or degrading?Sustained direction changes

These tools work together. A control chart tells you the process shifted. The histogram tells you how the distribution changed. Capability indices quantify whether you still meet spec.

Control Charts

A control chart plots measurement values over time against three lines: a center line (process mean), an upper control limit (UCL), and a lower control limit (LCL). Control limits are calculated from your data at ±3σ from the mean.

Points inside the limits mean the process is behaving normally. Signals that something changed:

  • A single point beyond UCL or LCL
  • Seven consecutive points on one side of the center line
  • Six consecutive points trending in one direction
  • Alternating up-down patterns (possible measurement system issue)

Control limits are not spec limits. Spec limits (USL/LSL) come from your product requirements. Control limits come from your process data. A process can be in control but out of spec, or in spec but out of control. SPC catches the second case, which spec-only monitoring misses.

Histograms

A histogram groups measurement values into bins and shows how many fall in each. Overlaid with a normal distribution curve and spec limits, it reveals the shape and position of your process.

ShapeWhat It Means
Normal (bell curve)Process is predictable. Variation is random.
SkewedOne-sided drift. Check for a physical constraint or asymmetric tolerance.
Bimodal (two peaks)Two populations mixed. Possible causes: two stations, two component lots, two operators.
Truncated (cut off at one end)Parts at the limit are being screened out or the spec is acting as a wall.
Flat (uniform)Process isn't controlled. Something is varying widely.

TofuPilot renders histograms alongside control charts for each measurement. The normal curve overlay and spec limit lines appear automatically when limits are defined.

Capability Indices

Capability indices reduce your process to a single number that says "can we meet spec?"

Short-term (Cp family): Uses sample σ (n-1 divisor).

  • Cp = (USL - LSL) / 6σ. How much of the spec window the process uses.
  • Cpk = min(Cpu, Cpl). How well the process fits within spec, accounting for centering.
  • Cpu = (USL - X̄) / 3σ. Distance from mean to upper limit.
  • Cpl = (X̄ - LSL) / 3σ. Distance from mean to lower limit.

Long-term (Pp family): Uses overall σo (n divisor). Same formulas, different σ.

  • Pp, Ppk, Ppu, Ppl

When Cpk and Ppk are close, the process is stable. When Ppk is lower, there's hidden variation between batches. TofuPilot shows both families side by side in the Capability tab.

Setting Up SPC in TofuPilot

SPC starts with well-defined measurements and limits. Write your tests with explicit spec limits so TofuPilot has the data it needs.

spc_ready_test.py
import openhtf as htf
from openhtf.util import units
from tofupilot.openhtf import TofuPilot

@htf.measures(
    htf.Measurement("supply_voltage")
        .in_range(minimum=4.75, maximum=5.25)
        .with_units(units.VOLT),
    htf.Measurement("current_draw")
        .in_range(minimum=0.090, maximum=0.110)
        .with_units(units.AMPERE),
    htf.Measurement("frequency")
        .in_range(minimum=999.5, maximum=1000.5)
        .with_units(units.HERTZ),
)
def functional_check(test):
    test.measurements.supply_voltage = 5.02
    test.measurements.current_draw = 0.098
    test.measurements.frequency = 1000.1

def main():
    test = htf.Test(functional_check)
    with TofuPilot(test):
        test.execute(test_start=lambda: "PCB-0001")

if __name__ == "__main__":
    main()

Once 30+ runs accumulate, open the Process Control page for your procedure. Select a measurement to see its control chart, histogram, and capability indices. The measurement overview ranks all measurements by failure count, fail rate, or Cpk so you can focus on the worst performers first.

When to Act

SignalMeaningResponse
Point beyond UCL/LCLSpecial cause eventInvestigate immediately. Check last lot change, calibration, operator.
7 points same side of meanProcess has shiftedCheck calibration, component lot, environmental change.
Cpk dropping over daysCapability degradingInvestigate drift source before it causes failures.
Cpk < 1.0Not capableReduce σ (process improvement) or widen spec (if justified).
Cpk >> PpkShort-term fine, long-term notBetween-batch variation. Investigate lot, operator, or environmental factors.
Cp >> CpkCapable but off-centerRe-center the process. Calibration or recipe adjustment.
Histogram bimodalTwo populationsSeparate by station, operator, or lot. Fix the source.

What SPC Won't Tell You

SPC detects that something changed. It doesn't tell you why. When a control chart signals a special cause, you still need to investigate: check the operator log, review the component lot, inspect the fixture, look at environmental data. SPC narrows the search. Domain knowledge finishes the job.

More Guides

Put this guide into practice