Analyze SPC Data with Check Details
You've now seen all three ways to look at quality data:
| Screen | Shows | Use it for |
|---|---|---|
| Check Table | One check at a time | Reviewing or correcting a specific check |
| Check Summary | Counts of checks by status | Were checks done on time? |
| Check Details | Item values across many checks | Trends, statistics and SPC |
- Navigate to Quality → Analysis → Check Details.
- Select
Coating SPC Checksand today's date range, then get the data. Each row is one five-minute check. - Turn on Statistics and Show Item Spec and review the min, max, average, standard deviation and calculated control limits.
- Use the menu to switch between row and column views, and export the data.
- Notice highlighted cells. They mark possible SPC rule violations, even where the value is within spec.
- Select a
Coating Thicknessvalue and open the trend view. - Choose the
Nelsonrule set and apply it. - Click the violation markers to see which rules fired, and compare the points with the mean, 1σ, 2σ and control limit lines.
- Look at the Histogram tab. Check whether the values are centered, how widely they spread, and whether there are outliers or a skew.
The simulated coating tags drift slowly up and down, so you should see trend rules fire even though every value is acceptable. That's exactly what SPC is for: spotting drift before it becomes a failure.
Reference Materials: Applying SPC Rules
Applying SPC Rules
Nelson and Western Electric SPC rules can be applied to any trend. Rule violations are highlighted on the chart.
Users can export trend data to a CSV file for further analysis.
The charting can be switched between...
- Time Series: Displays a time series chart of the check sheet data, including calculated upper and lower control limits.
- Histogram: Shows a histogram of all collected data, with hover-over functionality for detailed counts in each bar.
- Bar Chart: Shows a Bar Chart of all collected data, with hover-over functionality for detailed counts in each bar.
- Tabular: displays the raw data in a table.

Reference Materials: Statistical Process Control Overview
Statistical Process Control Overview
Process Capability (Cp/Cpk/Pp/Ppk)
Process capability indices measure whether a process, once shown to be in statistical control, is actually capable of consistently producing output within the specification limits (USL/LSL) - they compare the "voice of the process" (how much it naturally varies) against the "voice of the customer" (how much variation the spec tolerates).
Being in control (stable, predictable, no rule violations) and being capable (producing good parts within spec) are two different questions. A perfectly stable process can still be incapable if its natural spread is wider than the tolerance - it will reliably produce a certain percentage of scrap forever, with no special-cause signal ever appearing on the control chart, because that scrap is baked into the process's own normal variation.
- Cp - potential capability: how many times the tolerance width could fit the process's natural spread, assuming perfect centering. Pure spread-vs-tolerance measure; ignores where the process actually sits.
- Cpk -
actual capability: the same idea, penalized for how far off-center the process really is. Cpk is always <= Cp; they're equal only when the process is perfectly centered. - Pp/Ppk - the same two ratios, computed from the total (long-term) variation in the raw data instead of the short-term, within-subgroup variation.
Cp/Cpk use sigma within (short-term) - the same estimator the control chart itself is built from (moving range for individuals, R-bar/d2 for X-bar/R, S-bar/c4 for X-bar/S) - the process's inherent, moment-to-moment variation, with drift or tooling wear averaged out. Pp/Ppk use sigma overall (long-term) - the plain sample standard deviation of every individual reading around the grand mean, folding in everything that happened during the study: drift, shift changes, material lot changes.
The gap between Cpk and Ppk is itself diagnostic: if Cpk is much higher than Ppk, the process is capable moment-to-moment, but something over time (drift, changeovers, material variation) is widening the total spread - a process-control problem, not a fundamental-capability one.
Rule-of-thumb interpretation
- Cpk (or Ppk) < 1.0: not capable - out-of-spec parts even while perfectly in control.
- Cpk = 1.0: just barely fits, matching traditional 3-sigma quality (~0.27% defect rate if centered).
- Cpk = 1.33: a common minimum acceptance threshold in many industries.
- Cpk = 1.67+: often required for safety-critical or automotive-grade parts.
One-sided vs two-sided
If only one spec limit is supplied (e.g. USL only, with no meaningful lower bound - contamination, roughness, etc.), only the corresponding one-sided index is computed (Cpu/Ppu from USL, or Cpl/Ppl from LSL). Cpk/Ppk is always the smaller (worse) of whichever one-sided indices exist.
Why you'd use it
- Turns a subjective "does this look ok" into an objective, comparable number for setting acceptance thresholds and comparing processes/lines/suppliers.
- Separates two different problems: "the process isn't capable" (needs a process/equipment/tooling change) vs. "the process drifted" (needs investigation of a specific cause) - the Cpk-vs-Ppk gap points at which one you're facing.
- Required for many customer/industry quality programs (PPAP, IATF 16949, etc.) as proof a process can hold tolerance before it's approved for production.
Tradeoffs to know
- Meaningless without a stable, in-control process first - computing it on data with active special causes gives a misleading number.
- Assumes a roughly normal distribution - skewed or heavily non-normal data can badly misrepresent the true out-of-spec rate.
- Not meaningful for attribute charts (p/np/c/u) or Pre-Control - there's no within-subgroup sigma to build it from, and Pre-Control deliberately skips sigma estimation entirely.
How it's implemented here
Computed only when usl/lsl are supplied, and only for individuals/xbar/xbar_s. Returned as result['capability'] = {cp, cpk, cpu, cpl, pp, ppk, ppu, ppl, mean, sigmaWithin, sigmaOverall}. cp/pp are None unless both usl and lsl are given; cpk/ppk are the min() of whichever one-sided indices exist.
Pre-Control
Pre-Control is a simplified, spec-limit-based process monitoring method - an alternative to a traditional Shewhart control chart (individuals, X-bar/R, etc.). Where a Shewhart chart derives its control limits statistically from the process's own historical variation (mean +/- 3 sigma), Pre-Control ignores the process's own variation entirely and instead divides the customer/engineering tolerance (USL to LSL) itself into color-coded zones:
- Green zone - the middle 50% of the tolerance band, centered between USL and LSL.
- Yellow zones - the two 25% bands flanking green, from the edge of green out to USL on one side and LSL on the other.
- Red zone - outside USL or LSL entirely (out of spec).
Because the zones come directly from the spec limits rather than from a calculated sigma, there's no historical baseline data to collect and no control-limit math to run before you can start using it - if you know the tolerance, you can set it up immediately.
Use Pre-Control when...
- No statistics background required. Operators read colors and follow a run/stop rule - there's no sigma, no control limit formula, no chart interpretation training needed.
- Answers the question that actually matters for scrap. A process can be perfectly "in control" on a Shewhart chart (stable relative to its own history) while still producing defective parts, if its natural variation is wider than the tolerance. Pre-Control ties the signal directly to the spec limits, so it answers "are we making good parts" rather than "has this process drifted from its own average."
- No baseline data needed to start. Useful for new processes, short/setup runs, low-volume or job-shop work - anywhere you don't have (or don't want to wait for) enough historical data to calculate reliable control limits.
The tradeoff is....
- Less statistically sensitive. Because it isn't based on the process's actual variation, Pre-Control is slower to catch a subtle shift that hasn't yet pushed a reading into yellow or red - a Shewhart chart with tight control limits can flag that same shift much earlier.
- Assumes the process is already reasonably centered and capable. A process whose natural spread is wide relative to the tolerance will trigger yellow/red constantly even when nothing has actually changed - Pre-Control isn't a substitute for having an adequately capable process to begin with.
- No capability indices. Cp/Cpk/Pp/Ppk require a sigma estimate, and Pre-Control deliberately doesn't calculate one - so
_preControlCheck()in this codebase never returns acapabilityblock, unlike the sigma-based chart types.
How It Works
1. Qualification. Before trusting the process, run it and check five consecutive units. All five have to land in the green zone before the process is considered "qualified" and monitoring switches over to the normal sampling rule below. This is the process's way of proving it's centered and capable enough for Pre-Control to be meaningful in the first place.
2. Ongoing monitoring, in pairs. Once qualified, sample two consecutive units at a set interval and read the pair together:
| Both readings | Signal |
|---|---|
| Both green | Keep running |
| One green, one yellow | Keep running |
| Both yellow, same side | Stop - the process has likely shifted; adjust and re-qualify |
| Either one red | Stop immediately - out-of-spec product is being made |
The two-both-yellow-on-the-same-side case is the key signal Pre-Control is built around: two consecutive units both drifting toward the same spec limit is a much stronger sign of a real shift than one yellow reading alone, which could just be normal scatter.
Call system.kanoa.quality.spc.spcCheck() with chartType set to 'pre-control. Requires both usl and lsl
Note this returns a differently-shaped result than when called for the sigma-based chart types: zones/pairSignals/qualifyRunIndex/greenLow/greenHigh/yellowLow/yellowHigh
Univariate SPC (Shewhart Control Charts)
Univariate SPC charts one process characteristic over time, using control limits calculated from the process's own historical variation - not from customer spec limits (that's Pre-Control) and not from a correlated set of variables charted together (that's Multivariate/T2). This is the traditional Shewhart control chart approach, and it's the foundation nearly everything else in this module is built on.
The chart plots a series of points around a center line (the process average), with upper and lower control limits set at roughly +/-3 standard deviations. Because those limits come from the data itself, this answers a specific question: "is this process behaving the same way it always has, or has something changed?" - not "is this process making good parts" (capability) and not "is this within spec" (Pre-Control).
Continuous data - a real measured value (a dimension, a weight, a temperature):
- individuals (I-MR) - one reading per unit, no subgrouping. Simplest case, works with n=1 samples. Uses the moving range between consecutive points to estimate sigma.
- xbar (X-bar/R) - readings collected in subgroups of 2-10; charts the subgroup average, paired with a Range chart tracking within-subgroup spread. Capped at subgroup size 10 because the R-bar/d2 sigma estimator only has tabulated constants for that range.
- xbar_s (X-bar/S) - same idea as xbar, but uses subgroup standard deviation instead of range, and works for any subgroup size >= 2 (not capped at 10), at the cost of a slightly more involved sigma estimator (the c4 bias-correction constant).
Attribute (count) data - counting occurrences rather than measuring a continuous value:
- p (percent defective) - fraction of defective units per subgroup; sample size can vary subgroup to subgroup.
- np (number defective) - count of defective units per subgroup; sample size fixed.
- c (number of defects) - count of individual defects per inspection unit; constant area of opportunity.
- u (defects per unit) - count of individual defects; area of opportunity/sample size can vary.
The distinction between defective (p/np - a unit either passes or fails) and defect (c/u - a single unit can carry more than one distinct defect) is what determines which pair applies.
Use these control charts...
- Detects a process shift or the onset of a special cause as early as possible, using the process's own statistical behavior as the baseline - it doesn't need a spec limit to work (unlike Pre-Control), so it can flag a problem long before any part is actually out of tolerance.
- The rule engines (WE/Nelson) catch subtle non-random patterns - a slow drift, a sudden variance change - that a simple "still inside the limits" check would miss entirely.
- The natural first step toward measuring capability: Cp/Cpk/Pp/Ppk are built directly on top of the same sigma estimate the control chart itself uses.
The tradeoff is...
- Needs enough historical data to calculate a trustworthy sigma - too few points, and the control limits themselves are unreliable, undermining every signal built on top of them.
- Being "in control" doesn't mean the process is capable of making good parts - that's a separate question (see Process Capability); a stable process with limits wider than the tolerance will keep producing scrap and never trip a control-chart signal.
- Subgrouped charts (xbar/xbar_s) rely on rational subgrouping - subgroups need to be formed so within-subgroup variation genuinely reflects only common-cause noise, with anything of real interest showing up as between-subgroup variation instead.
- Getting subgrouping wrong (mixing multiple shifts or machines into one subgroup, for example) can hide the exact shifts you're trying to detect.
How it works
- A center line and control limits are calculated from the sigma estimator appropriate to the chart type (moving range, R-bar/d2, S-bar/c4 for continuous data; binomial or Poisson variance formulas for attribute data).
- Points beyond the control limits are an immediate signal.
- Beyond simple limit-crossing, this module runs the Western Electric and/or Nelson rule sets against every chart - these catch non-random patterns that never actually cross a control limit but are still statistically implausible under normal operation: runs of points on one side of the mean, trends, points hugging the center line too tightly, and similar zone-based patterns. Both rule sets operate generically over per-point sigma zones, so the same rule engine works whether the limits are constant (individuals, xbar) or vary point to point (p/u with changing sample sizes).
Call system.kanoa.quality.spc.spcCheck()
Returns points, mean, pointSigma, uclPoints, lclPoints, secondary (the paired Moving-Range/Range/S chart, continuous types only),
and violations (a dict of rule id -> violating point indices, only populated when ruleSet is given - pass None to skip rule-checking entirely).
Run Check Details for Machining - First Article Inspection too, with Show Production Info turned on. FAI data is a few inspections per run, tied to the item's spec; coating data is a steady stream of samples for monitoring the process.