Industry analysis · Manufacturing
Manufacturing: scrap root cause by material lot and shift, using lift, and why a pattern has to clear a statistical bar
Scrap data always seems to point somewhere. The hard part is telling a real pattern from a coincidence. Here's a worked example with lift and a chi-square test, and the two numbers a pattern has to clear before anyone names it.

Line 3’s scrap went up last month. By Tuesday there are three theories on the whiteboard: a bad resin lot, the night crew, a new supplier. Each has a story and a few data points behind it. Usually only one is right, and sometimes none of them is.
This walkthrough uses an invented molding line to show how to sort real patterns from coincidences with two numbers: lift and chi-square.
The data
The line made 24,000 parts last month and scrapped 960 of them, a rate of 4.0%. Every part carries its material lot, the shift that ran it, the supplier of the resin and the machine. The heatmap at the top of this page shows scrap rate by lot and shift. One cell is obviously different: lot L-2211 on the night shift scrapped 9.6% of its parts.
“Obviously” is the word to be careful with. With eight lots and three shifts there are 24 cells, and one of them will always be the highest. The question is whether it’s high enough, on enough parts, to be more than luck.
Two numbers, one bar
Lift measures the size of the effect. Divide the scrap rate inside a group by the rate overall. Lot L-2211 on nights: 9.6% ÷ 4.0% = a lift of 2.4.
Chi-square measures how surprising the effect is, given how many parts are involved. Put the counts in a two-by-two table and compare them with what you’d expect if the group were ordinary.
| Scrapped | Good | Total | |
|---|---|---|---|
| Lot L-2211 on night shift | 144 | 1,356 | 1,500 |
| Everything else | 816 | 21,684 | 22,500 |
| Total | 960 | 23,040 | 24,000 |
For this table the chi-square comes to 130.7. For a two-by-two table, a value of 10.83 corresponds to a p-value of about 0.001. This pattern clears it by a long way.
Storek’s statistical segment discovery uses exactly these two bars. It only names a combination of values when its lift is at least 1.3 and its chi-square is at least 10.83, and then it proves the segment by re-running its filter against the data.
Why both bars matter
Here are five candidate patterns from the same month, each tested the same way:
| Pattern | Parts | Scrapped | Lift | Chi-square | Named? |
|---|---|---|---|---|---|
| Lot L-2211 on night shift | 1,500 | 144 | 2.40 | 130.7 | Yes |
| Lot L-2211, any shift | 3,000 | 186 | 1.55 | 43.2 | Yes, but see below |
| Supplier B resin | 300 | 18 | 1.50 | 3.2 | No: too few parts to tell |
| Night shift, any lot | 8,000 | 384 | 1.20 | 20.0 | No: effect too small |
| Machine 2, any lot | 6,000 | 258 | 1.07 | 1.9 | No |

The middle rows are the lesson.
Supplier B has a big lift on a small base. Eighteen scrapped parts out of 300, where twelve were expected. That’s a 1.5 lift, and it’s well within chance: chi-square 3.2. Lift alone would have sent someone to call the supplier.
The night shift is significant but small. With 8,000 parts, even a 1.2 lift is statistically clear. But a 20% bump spread across a whole shift turns out to be the shadow of one lot’s bad night, as the next pattern shows. Chi-square alone would have started a conversation with the night crew.
Lot L-2211 on any shift passes, and still misleads. Split it apart: on day and evening shifts, the lot scrapped 42 of 1,500 parts, 2.8%, below normal. Almost all of its scrap came at night. The broad pattern passes only because it contains the narrow one. When two patterns pass, check whether the wider one is the narrower one in disguise.
From a named pattern to a cause
Statistics narrow the search; they don’t find the cause. Lot L-2211 on nights tells you where to look.
Re-run the pattern on the raw rows
Pull the 1,500 parts and look at them directly: which defect codes, which machines, which hours. Storek re-runs the filter of every segment it names, so the counts you see are the counts in the data.
Ask what's different about that lot at night
Night runs might use a different dryer schedule, a longer wait between drying and molding, or cooler ambient temperatures. A lot that’s slightly wetter or more sensitive could cope by day and fail at night.
Check the next lot from the same supplier
If the cause is in the material, the next lot will show it too. Watch its scrap rate by shift before it reaches nights.
Confirm with a deliberate test
Run part of a lot under day conditions at night, or the reverse. A pattern found in last month’s data is a hypothesis until a controlled run supports it.
Getting the data in shape
Machine and quality data often arrive as a wide table, one column per sensor tag, plus a lookup file that says what each tag means. Storek unpacks that shape automatically; on one validation export the result had 162,590 rows and matched a reference query exactly. The wide-export article shows how. Operator badge IDs can be tokenized, so scrap by crew counts correctly without naming anyone.
Sources
- Critical values of the chi-square distribution · NIST/SEMATECH e-Handbook of Statistical Methods · checked November 9, 2026