Sub topic 4
Can You Trust the Data? Measurement and Data Checks
Assume you already know basic Lean Six Sigma terms, DMAIC, process output Y, input X, defects, descriptive statistics, histograms, and run charts. This chapter focuses on the Measure and Analyze work that must happen before you trust a graph or hypothesis test.
A suspected root cause is only as useful as the data used to test it. If the measurement method changes between shifts, records the wrong event, or misses certain cases, the apparent relationship may be an artifact of the data.
Define what each value means
Start with an operational definition. An operational definition states exactly what is measured, how it is measured, and when the measurement starts and stops.
For example:
- Cycle time starts when an operator scans the first part.
- Cycle time ends when the completed part leaves the station.
- A defect is any part that fails the documented visual inspection.
- Shift is the shift recorded in the production system, not the employee’s scheduled shift.
Avoid definitions such as “slow cycle” or “poor quality.” They allow different people to classify the same event differently.
Record the unit of analysis. One row might represent one part, one order, one machine-hour, or one batch. Do not mix these levels in one analysis without a clear reason.
Check the measurement system
A measurement system includes the instrument, procedure, software, and people who collect or classify data. Check three properties:
- Accuracy: how close a measurement is to the accepted reference value.
- Repeatability: how much the same person and method vary when measuring the same item repeatedly.
- Reproducibility: how much results vary between people, devices, or methods.
For continuous measurements such as length or temperature, a gauge repeatability and reproducibility study can estimate repeatability and reproducibility. For classifications such as defect or no defect, use an attribute agreement study. Have several inspectors classify the same samples, including clear and borderline cases.
A measurement problem can hide a real cause or create a false one. For example, if one shift uses a stricter defect standard, that shift may appear to have more defects even when the process is identical.
Inspect the data before analysis
Create a data-check list before calculating rates or testing hypotheses.
| Check | Question | Example action |
|---|---|---|
| Completeness | Are required fields missing? | Count missing shift, timestamp, and result values |
| Validity | Are values within possible limits? | Flag negative cycle times |
| Consistency | Do related fields agree? | Compare start, end, and recorded duration |
| Uniqueness | Is each unit recorded once? | Check the unit identifier for duplicates |
| Time order | Are timestamps plausible? | Find end times before start times |
| Stability | Did the method or process change? | Mark software, operator, or procedure changes |
Keep a data dictionary that names each field, its definition, unit, allowed values, and source. Preserve the original data and create a separate field for any corrected or derived value.
The following check finds missing values, impossible durations, and duplicate unit records:
import pandas as pd
df = pd.DataFrame({
"unit_id": ["u1", "u2", "u2", "u3"],
"start": pd.to_datetime([
"2026-11-28 08:00",
"2026-11-28 08:05",
"2026-11-28 08:05",
"2026-11-28 08:20",
]),
"end": pd.to_datetime([
"2026-11-28 08:12",
"2026-11-28 08:19",
"2026-11-28 08:19",
"2026-11-28 08:10",
]),
"shift": ["A", "A", "A", None],
})
df["duration_min"] = (df["end"] - df["start"]).dt.total_seconds() / 60
print("Missing values by field:")
print(df.isna().sum())
print("\nImpossible durations:")
print(df[df["duration_min"] < 0])
print("\nDuplicate unit records:")
print(df[df.duplicated("unit_id", keep=False)])The duplicate rows may represent a legitimate repeat event, or they may be accidental copies. Investigate them before deciding how to handle them. A negative duration usually indicates a timestamp or system problem, not an unusually fast process.
Decide whether the data is usable
Classify each issue as one of the following:
- Correctable from a trusted source.
- Retained but flagged for sensitivity analysis.
- Excluded under a documented rule.
- Serious enough to recollect data.
Document the number of affected records and whether the issue is concentrated in a suspected group. If missing values occur mostly on one shift, removing those rows can bias the comparison.
Use a simple flow when reviewing data:
Exercise
Exercise
Records from shift B have a higher defect rate, but shift B also uses a newly installed inspection camera. What should you check before concluding that shift B causes more defects?
Show answer
Check whether the camera uses the same defect definition and threshold as the previous method, compare classifications on common samples, and identify when the camera was introduced. The apparent shift difference may be a measurement-system change.