Sub topic 11
Process capability: Cp and Cpk
This chapter assumes you can compute a mean and a sample standard deviation, and that you know what an individuals control chart and a specification limit are. It shows how to compare a process's spread to what the customer allows, using two indices, Cp and Cpk. It also covers the conditions under which those numbers can be trusted.
From control to capability
A control chart answers one question: is the process stable and predictable? Process capability answers a different one: if the process keeps behaving as it does now, will its output fit inside the specification limits?
The two questions come in a fixed order. A capability index is a forecast. A forecast only makes sense when the process is stable, because an unstable process has no single spread to forecast from.
Cp: the potential of the process
Cp compares the width of the specification, the distance from the lower specification limit (LSL) to the upper specification limit (USL), with the width of the process, which is taken as six standard deviations (±3 sigma around the mean).
Cp = (USL − LSL) / (6 × s)
Read it as a ratio of room to need:
- Cp = 1.00: the process width exactly fills the specification. If the process is centered, about 0.27% of output (2,700 per million) falls outside.
- Cp > 1.00: the process is narrower than the specification, so there is spare room.
- Cp < 1.00: the process is wider than the specification. Even a perfectly centered process produces defects.
Cp ignores where the mean is. A process with Cp = 2 can still make nothing but defects if its mean sits outside the specification. That is why Cp is called the potential capability: it is what the process could achieve if it were centered.
Cpk: the capability you actually get
Cpk measures the distance from the mean to the nearest specification limit, in units of three standard deviations.
Cpk = min(USL − mean, mean − LSL) / (3 × s)
When the process is perfectly centered, both distances are equal and Cpk = Cp. When the mean drifts toward one limit, Cpk falls while Cp stays the same. So the gap between the two indices tells you about centering:
- Cp ≈ Cpk: the process is centered. Reducing spread is the lever.
- Cpk much less than Cp: the process is off center. Shifting the mean may be cheap and effective.
- Cpk ≤ 0: the mean is at or beyond a specification limit. At least half the output is out of specification.
A worked example
The code below uses the ten shaft diameters from earlier in this tutorial with a specification of 9.85 to 10.15 mm.
from statistics import mean, stdev
def capability(data, lsl, usl):
m, s = mean(data), stdev(data)
cp = (usl - lsl) / (6 * s)
cpk = min(usl - m, m - lsl) / (3 * s)
return cp, cpk
measurements = [10.02, 9.98, 10.05, 9.97, 10.01, 10.03, 9.99, 10.00, 10.04, 9.96]
cp, cpk = capability(measurements, lsl=9.85, usl=10.15)
print(cp, cpk)The mean is 10.005 and the sample standard deviation is about 0.0299 mm. The specification width is 0.30 mm, and six standard deviations are about 0.179 mm, so Cp is about 1.67. The nearest limit is the upper one, at 0.145 mm from the mean. Dividing by three standard deviations (about 0.0897 mm) gives Cpk of about 1.62. The two values are close, so this process is nearly centered and has comfortable room.
Now suppose the mean drifts to 10.08 mm while the spread stays the same. Cp is still 1.67. Cpk becomes (10.15 − 10.08) / 0.0897, about 0.78. The process is as precise as before, but it now makes defects, and Cp alone would never reveal that.
| Situation | Cp | Cpk | What it means |
|---|---|---|---|
| Centered, narrow | 1.67 | 1.62 | Good room, little risk |
| Mean drifted to 10.08 | 1.67 | 0.78 | Precise but off target, will produce defects |
| Centered, wide (s doubled) | 0.83 | 0.81 | Centered but too much spread |
Interpreting the numbers
Common reference points are Cpk of 1.00 as the bare minimum, 1.33 as a typical requirement for an established process, and 1.67 or higher for critical characteristics. Customers often state their own thresholds, so use theirs when they exist.
Cpk also maps to a defect rate under a normal model. Three times Cpk is the distance, in standard deviations, from the mean to the nearest limit. A Cpk of 1.00 puts the limit 3 sigma away, and a Cpk of 1.33 puts it 4 sigma away. A Cpk of 2.00 puts it 6 sigma away, which is the link to the sigma level covered in the next chapter.
Which standard deviation to use
The capability function above uses the overall sample standard deviation stdev. That is simple, but it hides a distinction that matters in practice.
- Within-subgroup (short-term) sigma reflects only the variation between neighboring points. You estimate it from moving ranges or subgroup ranges, as in the individuals chart code. Indices built on it are usually written Cp and Cpk.
- Overall (long-term) sigma is the ordinary standard deviation of all the data, including drift between subgroups. Indices built on it are usually written Pp and Ppk.
For a stable process the two estimates are close. If Ppk is much smaller than Cpk, the process shifts or drifts over time even if each short stretch looks tight. The function below computes capability from the moving-range estimate, so you can compare it with the overall version.
from statistics import mean, stdev
def sigma_within(data):
# Average moving range divided by d2 = 1.128 for subgroups of size 2.
moving_ranges = [abs(b - a) for a, b in zip(data, data[1:])]
return mean(moving_ranges) / 1.128
def indices(data, lsl, usl, sigma):
m = mean(data)
cp = (usl - lsl) / (6 * sigma)
cpk = min(usl - m, m - lsl) / (3 * sigma)
return cp, cpk
measurements = [10.02, 9.98, 10.05, 9.97, 10.01, 10.03, 9.99, 10.00, 10.04, 9.96]
lsl, usl = 9.85, 10.15
cp, cpk = indices(measurements, lsl, usl, sigma_within(measurements))
pp, ppk = indices(measurements, lsl, usl, stdev(measurements))
print(f"Cp={cp:.2f} Cpk={cpk:.2f}")
print(f"Pp={pp:.2f} Ppk={ppk:.2f}")Common errors
- Computing capability on an unstable process. If the control chart shows special causes, the index describes no real, repeatable behavior. Fix the special causes first.
- Reporting Cp alone. Cp can look excellent while the process is badly off center. Report Cpk, or both.
- Using a tiny sample. With ten points, the standard deviation has wide uncertainty, so a computed Cpk of 1.62 might be well below that in reality. Prefer 50 or more observations, and treat results from small samples as rough estimates. Confidence intervals for Cpk exist and are worth reporting for decisions that carry real cost.
- Assuming normality without checking. Cpk's link to defect rates relies on a bell-shaped distribution. Skewed data, such as times, concentrations, or any measurement bounded at zero, can give a misleading rate.
- Confusing control limits with specification limits. Control limits come from the process data. Specification limits come from the customer. Capability uses only the specification limits, together with the process spread.
- Ignoring one-sided specifications. If there is only an upper limit, Cp is undefined. Use Cpk with the single limit, for example (USL − mean) / (3 × s).
- Ignoring measurement error. The measured spread includes the spread of the measurement system. A noisy gauge makes the process look less capable than it is.
Using capability to guide improvement
The relationship between Cp and Cpk points to the next action.
- If Cpk is low and Cp is high, center the process. This is usually an adjustment of a setting.
- If both are low and close together, the process is centered but too wide. You need to reduce variation itself, which is where DMAIC comes in.
- If both are low and far apart, you have both problems. Centering is usually the quicker win, so do it first, then address spread.
Exercise
A bolt length has LSL = 49.0 mm and USL = 51.0 mm. A stable process has mean 50.4 mm and standard deviation 0.20 mm. Calculate Cp and Cpk, and say what the gap between them tells you.
Show answer
Cp = (51.0 − 49.0) / (6 × 0.20) = 2.0 / 1.2 ≈ 1.67. The nearest limit is the USL, at 51.0 − 50.4 = 0.6 mm from the mean, so Cpk = 0.6 / (3 × 0.20) = 1.00. The process has plenty of potential (Cp 1.67) but is off center toward the upper limit, which cuts Cpk to the bare minimum of 1.00. Moving the mean toward 50.0 mm would raise Cpk to about 1.67 without any reduction in spread.
Exercise
A team reports Cpk = 1.8 from 12 measurements. The control chart for those points shows two points beyond the upper control limit. Should the team trust the result? Give two reasons.
Show answer
No. First, the points beyond the control limit are special-cause signals, so the process was not stable, and a capability index only forecasts the behavior of a stable process. Second, 12 measurements is a small sample, so the standard deviation, and therefore Cpk, is uncertain. The team should find and remove the special causes, collect a larger sample from the stable process, and then recompute Cpk.