Sub topic 6
Looking Before Testing: Graphs That Support or Challenge the Cause
This chapter assumes you know basic Lean Six Sigma terms, including DMAIC, defect, process output \(Y\), and input \(X\). You should also be able to read histograms and run charts and understand mean, median, and standard deviation. The goal here is to inspect process data visually before choosing a hypothesis test.
Start with the suspected cause
A graph should answer a specific question. Suppose a team suspects that shift affects the defect rate. The suspected cause is the input \(X\), and the defect indicator is the output \(Y\).
Before plotting, write down what you expect to see:
- If the cause is real, defect rates should differ between shifts.
- If the cause is real, the difference should appear across several time periods, not only in one unusual batch.
- If the cause is real, the suspected factor should vary enough to compare. Data from only one shift cannot test the effect of shift.
- If another factor changes at the same time, such as product type or operator, the graph may show a difference without identifying the true cause.
This prediction gives the graph a purpose. Do not create many charts and select the one that supports your preferred explanation.
Use the graph that matches the data
| Question | Useful graph | What to inspect |
|---|---|---|
| Does the process change over time? | Run chart | Shifts, trends, cycles, and unusual points |
| Do groups have different continuous results? | Boxplot | Center, spread, overlap, and outliers |
| Do two numeric variables move together? | Scatter plot | Direction, shape, clusters, and influential points |
| Which categories contribute most defects? | Pareto chart | Large contributors and the cumulative total |
A run chart plots measurements in time order. It can reveal that a suspected cause appears only after a setup change or during a particular period. Random-looking data weaken a time-based explanation, but they do not prove that the cause is absent.
A boxplot compares a continuous measure, such as cycle time, across categories such as shift or machine. The middle line shows the median. The box shows the middle half of the data. Long whiskers or isolated points may indicate unusual conditions that need investigation.
A scatter plot compares two numeric variables. For example, plot temperature against cycle time. Look for a roughly straight pattern, a curved pattern, separate clusters, or no visible relationship.
A Pareto chart orders defect categories from largest to smallest. It helps prioritize investigation. It does not prove that the largest category has the suspected root cause.
Example: compare groups and inspect a relationship
The following example creates a boxplot of cycle time by shift and a scatter plot of temperature against cycle time.
import pandas as pd
import matplotlib.pyplot as plt
df = pd.DataFrame({
"shift": ["A", "A", "A", "A", "B", "B", "B", "B"],
"temperature": [20, 21, 22, 23, 20, 21, 22, 23],
"cycle_time": [12.1, 11.8, 12.4, 12.0, 13.0, 12.8, 13.4, 12.9],
})
fig, axes = plt.subplots(1, 2, figsize=(10, 4))
df.boxplot(column="cycle_time", by="shift", ax=axes[0])
axes[0].set_title("Cycle time by shift")
axes[0].set_xlabel("Shift")
axes[0].set_ylabel("Cycle time (minutes)")
axes[1].scatter(df["temperature"], df["cycle_time"])
axes[1].set_title("Temperature and cycle time")
axes[1].set_xlabel("Temperature")
axes[1].set_ylabel("Cycle time (minutes)")
fig.suptitle("")
plt.tight_layout()
plt.show()The boxplot may show higher cycle times on shift B. The scatter plot may show whether cycle time also changes with temperature. Since shift and temperature could be related in the collection plan, neither graph alone identifies the cause.
Read graphs for contradictions
Graphical evidence can challenge the suspected cause. For example:
- A group difference disappears when data are separated by product type.
- A pattern comes from one outlier.
- The suspected factor does not vary during the period studied.
- A run chart shows the change happened before the suspected cause changed.
- A Pareto category is large, but its cases occur across every suspected condition.
Use these findings to revise the hypothesis or improve the data collection plan. A graph should lead to a clearer question for formal testing, not replace the test.
Exercise
A boxplot shows that machine 2 has a higher median cycle time than machine 1. What should you check before concluding that machine is the root cause?
Show answer
Check sample counts, time order, outliers, product mix, operators, and measurement quality. Then determine whether the difference remains after accounting for important confounding factors.