Sub topic 2
What the data should show if the cause is real
This chapter assumes you know the basic DMAIC vocabulary (defect, output Y, input X). It also assumes you have a suspected cause from a fishbone diagram or 5 Whys, and that you can read means and standard deviations. The previous chapter turned the suspicion into a hypothesis. This chapter turns that hypothesis into a prediction that data can contradict.
Why a hypothesis is not yet testable
A root-cause hypothesis is a statement about how the process works. For example: "Shift B produces more defects because its operators skip the fixture check." You can't check that sentence against a spreadsheet. You can only check what follows from it.
A prediction is a consequence of the hypothesis that you can observe. It has the form: if the cause is real, then a specific measurement will look a specific way. If the measurement doesn't look that way, the hypothesis is in trouble.
This is the difference between verifying a cause and collecting supporting stories. Without a prediction written in advance, almost any data can be read as "consistent with" the suspicion. A prediction fixes the standard before you see the result.
The parts of a measurable prediction
A usable prediction names six things.
- The output Y. The metric, with its unit and its operational definition (what counts as a defect, when the clock starts and stops).
- The input X. The suspected cause, and the levels you will compare (shift A versus shift B, old setup versus new setup).
- The direction. Higher, lower, or different. Choose this from process knowledge, not from the data.
- The size. How big a difference would matter. This is the smallest effect worth acting on, and it ties later to sample size.
- The scope. Which product, line, period, and population the prediction covers.
- The decision rule. The test, the significance level (alpha), and what you will conclude either way.
The table shows how vague claims become testable ones.
| Vague claim | Testable prediction |
|---|---|
| Setup change slows the line | Mean cycle time on Line 3 is at least 0.5 minutes longer under the suspect setup than under the old setup (Welch t-test, alpha 0.05, one-sided) |
| Night shift causes defects | Defect proportion on shift B exceeds that on shift A for product family K over the next 4 weeks (chi-square test, alpha 0.05) |
| Worn tooling hurts quality | Dimension error increases with tool hours since last change, with a positive slope in a simple regression |
| Supplier lot matters | Mean seal strength differs among the three supplier lots (one-way ANOVA, alpha 0.05) |
From hypothesis to null and alternative
Statistical tests work with a pair of statements. The alternative hypothesis (H1) is your prediction. The null hypothesis (H0) says the suspected cause has no effect. A test asks how surprising your data would be if H0 were true.
For the cycle-time example:
- H0: mean cycle time is the same under both setups.
- H1: mean cycle time is longer under the suspect setup.
Notice that the test never proves H1. It only measures how hard the data are to explain under H0. The next chapters cover this in detail. For now, remember that the alternative must come from the prediction, and the prediction must come from the hypothesis.
Predictions beyond "X changes Y"
A real cause usually leaves more than one trace. Writing several predictions makes the check much harder to pass by luck.
- Direction and dose. If more tool wear means more error, error should rise steadily with tool hours, not just differ between two groups.
- Timing. The cause must come before the effect. If defects rose in March, the suspect change must have happened in or before March.
- Mechanism. If skipped fixture checks cause misalignment, the defects should be misalignment defects, not scratches. Stratifying defects by type tests this.
- Specificity. The effect should appear where the cause is present and not where it is absent. If shift B's defects also appear on lines where shift B uses the fixture check, the hypothesis weakens.
- Things that should not change. If the cause affects only product family K, the defect rate for other families should stay flat. A "placebo" comparison like this catches explanations that are really about something broader.
You don't need all five for every cause. For costly or risky changes, two or three independent predictions give much stronger evidence than one.
Matching the prediction to the data type
The form of Y decides which test will later check the prediction. Settle this while writing the prediction, because it affects what you collect.
| Y is... | X is... | Typical test |
|---|---|---|
| Continuous (minutes, mm) | Two groups | Welch two-sample t-test |
| Continuous | Three or more groups | One-way ANOVA |
| Counts or proportions of defects | Groups | Chi-square test of independence |
| Continuous | Continuous | Correlation and simple regression |
If you write "defect rate is higher" but your plan records only the average defects per day, you may lose the information you need. Decide the unit of observation (per unit, per batch, per day) in the prediction.
Writing the prediction down before the data
The following Python sketch records a prediction as a fixed object and evaluates it later. It is a small discipline tool. Because the prediction is frozen before the data are loaded, nobody can adjust the direction or threshold after seeing the numbers.
from dataclasses import dataclass
import numpy as np
from scipy import stats
@dataclass(frozen=True)
class Prediction:
y: str # output metric and unit
x: str # suspected cause and its levels
direction: str # "greater", "less" or "two-sided"
min_effect: float # smallest difference in means worth acting on
alpha: float # significance level, chosen before data
def check(pred, baseline, suspect):
"""Test whether 'suspect' differs from 'baseline' as predicted."""
result = stats.ttest_ind(
suspect, baseline, equal_var=False, alternative=pred.direction
)
diff = float(np.mean(suspect) - np.mean(baseline))
significant = result.pvalue < pred.alpha
large_enough = abs(diff) >= pred.min_effect
return diff, result.pvalue, significant and large_enough
prediction = Prediction(
y="cycle time (min)",
x="setup: old vs suspect",
direction="greater",
min_effect=0.5,
alpha=0.05,
)
setup_old = np.array([12.1, 11.8, 12.4, 12.0, 12.6, 11.9, 12.3, 12.2])
setup_suspect = np.array([13.0, 12.8, 13.4, 12.9, 13.1, 13.5, 12.7, 13.2])
diff, p, supported = check(prediction, setup_old, setup_suspect)
print(f"difference = {diff:.2f} min, p = {p:.4f}")
print("Prediction supported." if supported else "Prediction not supported.")The check has two conditions. A small p-value alone is not enough, because with enough data a trivial difference becomes statistically significant. The min_effect condition keeps the result tied to a difference that matters to the process.
Common errors
- Predicting after the fact. Looking at a chart, noticing a gap, and then "predicting" it. This turns a hypothesis test into a story. If you explored first, treat the finding as a new hypothesis and test it on fresh data.
- Choosing the direction from the data. A one-sided test picked after seeing which group is larger doubles your real error risk. Choose direction from process knowledge, or use a two-sided test.
- No effect size. Without a minimum effect, any result can be defended. A tiny difference with a small p-value, or a large difference with a larger p-value, both leave you arguing.
- A prediction nothing could refute. "Defects will vary by shift" is true of almost every process. A good prediction can be wrong.
- Wrong population. Predicting for all products and testing on one line. Keep the scope of the prediction and of the data the same.
- Ignoring rival explanations. Ask what else would produce the same pattern. If shift B also runs a different material lot, the shift prediction cannot separate the two. Later chapters on confounding return to this, but note the rival now so your plan can control for it.
- One prediction for a complex cause. When the mechanism has several steps, test the step you can measure most cleanly first.
Worked example
A plant suspects that a new coolant concentration causes more surface defects on Line 2.
- Hypothesis. The higher coolant concentration, introduced on 3 November, leaves residue that causes surface defects.
- Prediction. After 3 November, the proportion of units with a surface-residue defect on Line 2 is higher than before. A rise of at least 2 percentage points is the smallest change worth acting on. Other defect types should stay flat. Line 1, which did not change coolant, should show no rise.
- Hypotheses for the test. H0: the surface-residue proportion is the same before and after. H1: it is higher after.
- Decision rule. Chi-square test of independence on defective versus good counts, alpha 0.05, with the 2-point minimum effect. If the test is not significant or the rise is under 2 points, the cause is not supported at this sample size.
- Falsifiers. A rise in non-residue defects, or a similar rise on Line 1, would point to a different cause, such as a raw material change that hit both lines.
The plan now lists exactly what to collect: unit-level defect type, line, and date. That is the input to the data collection plan in the next chapter.
Exercise
A team suspects that a worn cutting blade makes burr height too large. They write the prediction "burr height will be affected by blade wear." List three things missing from this prediction, and rewrite it as a testable prediction.
Show answer
Missing: (1) a direction, since "affected" could mean higher or lower; (2) a size, since no minimum difference worth acting on is stated; (3) a decision rule and scope, since no test, alpha, product, or period is named. A testable rewrite: "For part 4471 on Press 6 over the next two weeks, mean burr height for blades with more than 8,000 cuts will be at least 0.02 mm higher than for blades with fewer than 2,000 cuts (Welch t-test, one-sided, alpha 0.05)." A second prediction that adds dose-response strength: burr height rises with cut count, with a positive regression slope.
Exercise
A colleague looks at a boxplot, sees that shift B has a higher median defect count, and says "so my prediction is that shift B is worse, one-sided test." What is wrong with this, and what should be done instead?
Show answer
The direction was chosen after seeing the data, so the one-sided test no longer has its stated error risk, and the "prediction" is really an observation that has not been tested. The pattern should be treated as a new hypothesis. Write the prediction (direction, size, scope, alpha), then test it on new data from a later period, or use a two-sided test if there was no prior reason to expect the direction.