Sub topic 8
How variation turns into defects and cost
This chapter assumes you know what a specification limit is, how to compute a mean and a sample standard deviation, and the basic shape of a normal distribution. It shows how spread in a process turns into a defect rate, and how a defect rate turns into money.
A defect is a comparison, not a property
A part has no defects on its own. A defect appears when a measured output falls on the wrong side of a requirement. For a shaft with limits of 9.85 mm and 10.15 mm, a 10.16 mm shaft is defective and a 10.14 mm shaft is fine. The two shafts differ by 0.02 mm.
So defects come from two things together:
- The distribution of the process output, which is described by its mean and spread.
- The specification limits, which come from the customer or the design.
If you change either one, the defect rate changes. Widening the specification removes defects without improving the process. Reducing spread removes defects without touching the specification. Six Sigma works on the second.
From spread to defect rate
If you model the output as normal, you can estimate the fraction outside the limits from the mean and standard deviation. The fraction below the lower limit is the cumulative probability at that limit. The fraction above the upper limit is one minus the cumulative probability at that limit.
from statistics import NormalDist
def fraction_out_of_spec(mean, sd, lsl, usl):
dist = NormalDist(mean, sd)
below = dist.cdf(lsl)
above = 1 - dist.cdf(usl)
return below, above, below + above
LSL, USL = 9.85, 10.15
scenarios = {
"centered, sd 0.05": (10.00, 0.05),
"off center, sd 0.05": (10.05, 0.05),
"centered, sd 0.03": (10.00, 0.03),
}
for name, (m, s) in scenarios.items():
below, above, total = fraction_out_of_spec(m, s, LSL, USL)
print(f"{name}: below={below:.2e} above={above:.2e} total={total:.6f}")The three scenarios give roughly these totals:
| Scenario | Distance from mean to nearest limit | Approximate fraction defective |
|---|---|---|
| Centered, sd 0.05 | 3 standard deviations | 0.0027 (2,700 per million) |
| Off center by 0.05, sd 0.05 | 2 standard deviations on the upper side | 0.0228 (22,800 per million) |
| Centered, sd 0.03 | 5 standard deviations | about 0.0000011 (about 1 per million) |
Two lessons follow from the table.
- Spread has a steep effect. Cutting the standard deviation from 0.05 to 0.03 (40 percent less spread) cut defects by a factor of about 2,000. The tails of a normal curve fall off very quickly, so a small gain in spread pays off in the tails.
- Centering matters as much as spread. Moving the mean by one standard deviation raised the defect rate about eight-fold, and almost all the extra defects fell on one side. Cpk, which a later chapter covers, is built to capture this.
Defects are not the whole cost
A defect that is caught is cheaper than one that escapes, but both cost money. Quality engineers group these costs into categories:
- Internal failure: scrap, rework, re-inspection and downtime. These costs are found before the customer sees the product.
- External failure: returns, warranty claims, field repair, complaints and lost future sales. These costs are found after delivery.
- Appraisal: the inspection and testing used to catch defects.
- Prevention: training, process design and monitoring that stop defects from happening.
The first three exist largely because of variation. The sum of failure and appraisal costs is often called the cost of poor quality. External failures are usually the most expensive per unit, and they are the hardest to estimate because they include reputation damage.
def failure_cost(units, defect_rate, rework_share, rework_cost, scrap_cost):
defects = units * defect_rate
per_defect = rework_share * rework_cost + (1 - rework_share) * scrap_cost
return defects * per_defect
units = 100_000
for label, rate in [("centered", 0.0026998), ("off center", 0.0227818)]:
cost = failure_cost(units, rate, rework_share=0.7,
rework_cost=4.0, scrap_cost=12.0)
print(f"{label}: ${cost:,.0f}")With a 70 percent chance that a defect can be reworked at $4 and a 30 percent chance that it must be scrapped at $12, each defect costs $6.40 on average. The centered process costs about $1,728 per 100,000 units, and the off-center process about $14,580. The model is simple, but it shows that a shift in the mean is a cost decision, not only a statistical one.
The hidden factory
Rework and re-inspection consume capacity that the plant already pays for. Operators fix units that should have been right the first time, and inspectors sort good from bad. Material handling, extra work in progress and expediting also grow. This is sometimes called the hidden factory: a second production line that produces nothing new and appears in no routing document.
Because of the hidden factory, a plant with a 2 percent defect rate can lose well over 2 percent of its capacity. A unit that is reworked occupies stations twice, and a unit that is scrapped has used all its upstream steps for nothing.
Defects compound across steps
Most products pass through several steps. If a unit must be right at every step, the yield of the whole process is the product of the step yields. This is called rolled throughput yield (RTY).
from math import prod
step_yields = [0.98, 0.98, 0.98, 0.98, 0.98]
print(f"rolled throughput yield: {prod(step_yields):.3f}")Five steps that are each 98 percent good sound healthy, but the combined yield is 0.904, which is only about 90 percent. Ten such steps would give about 82 percent. This is one reason Six Sigma sets very demanding targets for each opportunity. A target that looks small per step becomes large after many steps.
Counting defects fairly: DPU, opportunities and DPMO
To compare processes of different complexity, you count defects against the number of chances to make one. Three terms are common:
- Defects per unit (DPU): total defects divided by units produced. A unit can have more than one defect.
- Opportunities per unit: the number of distinct ways a unit could be wrong, for example 12 solder joints on a board.
- Defects per million opportunities (DPMO): total defects divided by the total number of opportunities, times 1,000,000.
For example, 80 boards with 12 opportunities each give 960 opportunities. If inspectors find 6 defects, DPMO is 6 / 960 × 1,000,000 = 6,250. The next chapters use DPMO to define the sigma level.
Common errors to avoid
- Treating the normal model as exact. Real tails are often heavier or lopsided. A computed rate of 1 part per million is a model estimate, not a measurement. Check the tail with a large sample or a histogram before relying on it.
- Looking only at the fraction defective. Two processes can have the same defect rate and very different costs, because one produces mostly reworkable defects and the other produces scrap or escapes.
- Fixing the specification instead of the process. Widening limits lowers the defect count on paper, but if the customer's real need has not changed, the failures reappear as complaints and returns.
- Ignoring inspection as a cost. If 100 percent inspection is what keeps defects from reaching the customer, the process is not capable. It is being sorted.
Exercise
A process has mean 50.0 and standard deviation 2.0, and the specification is 44.0 to 56.0. Using the normal model, about what fraction of output is out of specification? Then the mean drifts to 51.0 with the same spread. Does the defect rate rise, fall or stay the same, and why? (Use that Φ(-3) ≈ 0.00135, Φ(-2.5) ≈ 0.00621 and Φ(-3.5) ≈ 0.000233.)
Show answer
The limits are 6.0 from the mean, which is 3 standard deviations. Each tail has about 0.00135, so the total is about 0.0027, or 2,700 per million. After the drift to 51.0, the lower limit is 7.0 away (3.5 standard deviations, tail about 0.000233) and the upper limit is 5.0 away (2.5 standard deviations, tail about 0.00621). The total is about 0.00644, which is more than double the original rate. The defect rate rises because the nearer limit gains far more than the farther limit loses, since the tails of the normal curve are nonlinear.
Exercise
A product goes through four steps with yields of 99%, 97%, 95% and 98%. What is the rolled throughput yield? If 1,000 units start, about how many good units finish without rework?
Show answer
Multiply the yields: 0.99 × 0.97 × 0.95 × 0.98 ≈ 0.894. About 894 of 1,000 units finish good the first time. The other 106 or so are scrapped or reworked, which means they use extra capacity. This is the hidden factory.