SPC and Cpk: when a control chart raises an alarm and when a process is capable
Calculating I-MR control limits, the logic of the Nelson rules, the difference between control limits and specification limits, and why Cpk can be low in a ten-point example even while the process is in control.
Statistical process control (SPC) answers two separate questions, and they are often confused: is the process stable (the control chart), and does the process meet the specification (capability, Cp/Cpk)? A stable process may not meet the specification; a process that meets it for now may be unstable.
Where do the control limits come from?
In an I-MR chart for individual measurements, the limits are calculated from the process's own data. The absolute difference between two consecutive measurements is the moving range (MR); call its mean MR-bar. The centre line is the mean, and the limits are the mean ± 2.66 × MR-bar (2.66 = 3 / 1.128). The standard deviation estimate is MR-bar / 1.128.
Example: ten measurements: 10.02 · 10.05 · 9.98 · 10.03 · 10.01 · 10.04 · 9.99 · 10.02 · 10.06 · 10.00. The mean is 10.020; MR-bar = 0.0422 (total difference 0.38 divided by 9). The limits are 10.020 ± 2.66 × 0.0422: upper 10.132, lower 9.908. The sigma estimate is 0.0422 / 1.128 = 0.0374. (Ten points are only to show the method; a real limit calculation needs at least 20-25 stable measurements.)
When does it alarm?
Rule 1: one point falls outside the 3-sigma limit. In a normal distribution, even while the process is stable, the probability of a point exceeding this limit is about 0.27%; so on average one false alarm is expected every 370 measurements. To catch small shifts the Nelson rules also look at patterns:
- 9 points in a row on the same side of the centre: the mean has shifted.
- 6 points in a row steadily rising or falling: there is a trend, often wear.
- 14 points in a row alternating up and down: two sources may be mixed.
- 2 of 3 points on the same side beyond 2 sigma: an early sign of a shift.
As the number of rules grows, detection speeds up but false alarms also increase; you need not apply all of them to every process.
A control limit is not a specification limit
Control limits say what the process does, specification limits what the customer wants. In the same example let the lower specification limit be 9.90 and the upper 10.10. Cp = (10.10 − 9.90) / (6 × 0.0374) = 0.89; Cpk = min(10.10 − 10.02; 10.02 − 9.90) / (3 × 0.0374) = 0.08 / 0.1123 = 0.71. Even though all ten measurements are within specification, the process is not capable, because its mean is close to the upper limit and its spread is wide; with the normal-distribution assumption the estimated defect rate is about 1.7%. Cp reflects the spread, and Cpk reflects the spread together with how far the mean sits off centre.
Common mistakes
- **Drawing the specification limit on the control chart.** It reflects what is wanted, not the natural behaviour of the process; control limits must be calculated separately.
- **Calculating Cpk on an unstable process.** Bring it under control first; otherwise Cpk has no meaning.
- **Not keeping the data in time order.** The moving range depends on order; shuffled data distorts the limits.
- **Recalculating limits at every alarm.** Limits come from a stable period; if there is a shift, the cause is investigated, the limit is not moved.
- **Copying a Cpk target blindly.** The accepted level varies with the customer, the sector and the contract.
- **Assuming a normal distribution.** For one-sided or skewed data the ppm estimate can mislead.
Try it with the tools
Paste your own measurements into the control chart (SPC) tool: you get the I and MR charts, the limits and the Nelson rules that were violated. For Cp, Cpk, Pp, Ppk and a ppm estimate against your specification limits there is the Cp / Cpk capability calculator. To set up quality monitoring in your process, get in touch.
Let's discuss this for your plant
More notes
All notes →- 3 min readMTBF, MTTR and availability: three numbers, three different questionsMTBF says how often a machine fails, MTTR how quickly it comes back, availability what share of the time the line can produce. We calculate all three from one example, show which decision each one supports, and list the four most common mistakes.
- 3 min readBearing life L10: what it says and what it does not, with load, speed and reliabilityFrom the catalogue dynamic load rating to the basic rating life, then to the reliability and operating-condition adjustment: we calculate a bearing's expected life step by step, show why a small increase in load shortens life so much, and list the questions L10 does not answer.
- 3 min readPareto of downtime causes: 80/20 is not a law, it is a starting pointWe rank one month of downtime records by cause and work out the cumulative share. The example deliberately does not follow 80/20: five of eight causes make up 86.7% of the total. We show how to choose the threshold, how record quality distorts the result, and what comes after Pareto.