Sub topic 1
Process variation and why capability matters
Every process produces output that varies. Two shafts cut on the same lathe never have exactly the same diameter, and two orders packed by the same team never take exactly the same time. Capability indices such as Cp and Cpk answer one question: given how much this process varies, how well does its output fit inside what the customer allows? This chapter sets up the problem those indices solve. The later chapters build the calculations.
Prerequisites
This chapter assumes you can:
- Compute and interpret a mean and a standard deviation.
- Recognise the bell shape of a normal distribution and know that a standard deviation measures spread around the mean.
- Read a simple control chart, which is helpful but not required. This chapter only mentions control charts. Chapter 4 covers them properly.
You do not need to know how Cp or Cpk are calculated. You will not need any library beyond the Python standard library to run the code here.
What process variation is
A process is a repeatable set of steps that turns inputs into an output, such as a machined part, a filled bottle, a delivered parcel or a processed invoice. Variation is the difference between one output and the next, even when you try to make them identical.
Variation comes from many small causes acting together. The usual groupings are:
| Source | Manufacturing example | Service example |
|---|---|---|
| Machine or tool | Tool wear, spindle runout | System response time |
| Material | Batch-to-batch hardness | Quality of incoming data |
| Method | Feed rate, temperature setpoint | Differences in work instructions |
| People | Loading technique | Experience of the agent |
| Measurement | Gauge resolution, operator reading | Inconsistent timestamps |
| Environment | Room temperature, humidity | Peak versus quiet hours |
Measurement is on this list for a reason. What you observe is the real variation in the process plus the variation added by the measuring system. If the gauge is noisy, you will overstate the process spread and understate its capability. Capability studies assume the measurement system has already been checked.
Common cause and special cause variation
Statisticians separate variation into two kinds, and the distinction decides whether a capability index means anything.
- Common cause variation is the steady background noise built into the process. It is always present, it is roughly predictable, and reducing it means changing the process itself.
- Special cause variation comes from a specific event, such as a broken tool, a new supplier lot or a mis-set machine. It shows up as shifts, spikes or drifts, and it can usually be found and removed.
A process with only common causes is called stable. Its future output can be predicted within limits. A process with special causes is unstable, and you cannot predict what it will do next week. Capability indices describe the predictable part, so they are only meaningful for a stable process. This is the reason chapter 4 is titled "Stability first".
Specifications: what the customer allows
Variation matters only relative to a requirement. A specification is the range of values the customer, a standard or a design accepts. Two numbers define it:
- The lower specification limit (LSL) is the smallest acceptable value.
- The upper specification limit (USL) is the largest acceptable value.
The distance USL − LSL is the tolerance width. For a shaft diameter specified as 10.00 mm ± 0.15 mm, LSL is 9.85, USL is 10.15 and the tolerance width is 0.30 mm.
Specification limits come from the customer's needs. They do not come from the process. The process has its own natural spread, which is set by its common causes. Capability is the comparison of the two: how wide the process spread is against how wide the tolerance is.
Why "all parts passed" is not enough
A common way to judge a process is to inspect parts and count failures. That approach has two weaknesses.
First, it reacts after the fact. By the time you count a bad part, it has already been made, and scrap or rework is already spent.
Second, it hides how close the process is to trouble. Suppose you check 50 parts and all pass. A process that produces 1 defect in 10,000 parts and one that produces 1 in 100 will both pass that inspection most of the time. Fifty good parts cannot tell them apart. A capability index uses the measured values themselves, not just pass or fail. It estimates the defect rate from the shape of the distribution, which lets it separate those two processes from far fewer samples.
Three processes, one specification
Spread and centre both matter, and they are independent. The next example uses the shaft specification above and three processes that all aim at 10.00 mm. This uses only the standard library and assumes a normal distribution, which later chapters examine.
from statistics import NormalDist
LSL, USL = 9.85, 10.15
def out_of_spec_ppm(mean, sigma, lsl, usl):
dist = NormalDist(mu=mean, sigma=sigma)
below = dist.cdf(lsl)
above = 1 - dist.cdf(usl)
return (below + above) * 1_000_000
processes = [
("A: tight and centred", 10.00, 0.03),
("B: wide and centred", 10.00, 0.06),
("C: tight but off-centre", 10.09, 0.03),
]
for name, mean, sigma in processes:
spread = 6 * sigma
ppm = out_of_spec_ppm(mean, sigma, LSL, USL)
print(f"{name:26s} spread={spread:.2f} tolerance={USL - LSL:.2f} ppm={ppm:,.1f}")The results, rounded:
| Process | Mean | Sigma | 6 × sigma | Expected defects |
|---|---|---|---|---|
| A | 10.00 | 0.03 | 0.18 | well under 1 ppm |
| B | 10.00 | 0.06 | 0.36 | about 12,400 ppm (1.2%) |
| C | 10.09 | 0.03 | 0.18 | about 22,750 ppm (2.3%) |
Process B is centred, but its spread of 0.36 is wider than the tolerance of 0.30, so the tails extend past both limits. Process C has the same small spread as A, which fits easily inside the tolerance, yet it is worse than B because its centre has moved toward the upper limit. Nothing about C's variation is wrong. The mean is simply in the wrong place.
So there are two separate ways to fail:
- The spread is too wide for the tolerance. Only reducing variation fixes this.
- The centre is off target. Adjusting the process setting fixes this, and it is usually much cheaper than reducing variation.
Cp and Cpk exist to tell these two failures apart. Cp looks only at spread against tolerance. Cpk also looks at centring. This is why a single number such as "the defect rate" is not enough for deciding what to do. You need to know which problem you have.
Why this matters in practice
Capability numbers are used for more than reporting.
- Customer requirements. Many customers, particularly in automotive and aerospace, require a minimum Cpk, often 1.33 or higher, before they approve a supplier or a new process.
- Cost. A process that is barely capable needs heavy inspection, sorting and rework. A very capable process can sample lightly.
- Priorities. Comparing capability across several characteristics shows where improvement effort pays off most.
- Design decisions. Engineers can check whether a tolerance is realistic before tooling is bought. Specifying ±0.01 mm on a process whose natural spread is ±0.1 mm sets the plant up to fail.
- Six Sigma projects. Capability before and after a project is a standard way to show that the change reduced defects.
Where capability goes wrong
These problems come up repeatedly, and later chapters return to each one.
- Unstable process. If special causes are present, the standard deviation you compute describes a mixture of states, and the index has no clear meaning.
- Non-normal data. The conversion from index to defect rate assumes a bell-shaped distribution. Skewed data, such as cycle times or flatness, can make the calculated rate badly wrong.
- Wrong standard deviation. There are short-term and long-term estimates of spread, and mixing them up gives indices that differ by a large amount. Cp and Cpk use the within-subgroup estimate. Pp and Ppk use the overall estimate.
- Too little data. A Cpk calculated from 20 parts carries wide uncertainty, so a reported value of 1.40 may be consistent with a true value below 1.0.
- Poor measurement. A gauge that cannot resolve the tolerance gives meaningless results.
What the rest of the tutorial covers
The remaining chapters follow the concept sequence implied by the problem above. They cover specification limits, the normal model and the 6-sigma natural spread, stability checks, and the range-based estimate of within-subgroup sigma. They then define Cp, show why centring matters, and define Cpk as the distance to the nearest limit. After that come benchmark interpretation, conversion to defects per million, one-sided specifications, normality checks, Pp and Ppk, and the uncertainty in any Cpk estimate.
Exercise
A process has a mean of 50.0, a standard deviation of 1.0 and specification limits of 45 and 55. A second process has the same limits, a mean of 52.5 and a standard deviation of 0.5. Without calculating any index, which process has the narrower spread, which has the better centring, and which do you expect to have the higher defect rate? Explain your reasoning.
Show answer
The second process has the narrower spread (0.5 against 1.0). The first process has the better centring: its mean of 50.0 is at the middle of the limits, while 52.5 is 2.5 units above the middle. For defects, compare each mean's distance from its nearest limit in standard deviations. The first process is 5 units from either limit, which is 5 sigma. The second is 2.5 units from the upper limit of 55, which is also 5 sigma (2.5 / 0.5). Both are about 5 sigma from their nearest limit, so both have a very low and roughly equal defect rate, around 0.3 ppm on that side. The lesson is that a narrower spread can offset poor centring, and that spread and centre must be judged together.
Exercise
Name one reason why finding 50 conforming parts in an inspection does not prove that a process is capable, and say what a capability study uses instead.
Show answer
Pass or fail counting on a small sample cannot distinguish a process that makes 1 defect in 100 from one that makes 1 in 10,000, because both usually show zero defects in 50 parts. A capability study uses the measured values to estimate the process mean and standard deviation, and from those predicts how much of the distribution falls beyond the specification limits.