Testing Causes with Data
Use stratification, scatter plots, correlation, simple regression and hypothesis tests to confirm root causes, and avoid confusing correlation with causation.
Welcome back!
Step 1 of 13Learn
Slice the data: stratification
A call center's average handling time rose from 6 to 7.5 minutes. The team's first guess was that agents had become less efficient. Before acting, they stratified the data, splitting it by factors that might matter: shift, team, call type, day of week and agent experience.
The overall average hid a clear pattern. Handling times for billing and technical calls hadn't changed. Calls about a new product, launched two months earlier, took 14 minutes on average, and they now made up 15% of all calls. The rise had nothing to do with effort. Agents had never been trained on the new product and spent minutes searching for answers.
Stratification is the simplest analysis tool and often the most powerful: group the data by a factor and compare the groups. Useful factors include who (team, shift, experience level), what (product, call type, customer segment), where (location, machine, line) and when (time of day, day of week, month).
The usual chart is a set of side-by-side box plots or a bar chart of averages by group. A big difference between groups points toward a cause. Little difference tells you to look elsewhere.
Good data collection makes stratification possible. That's why the Measure phase records not just the result (handling time) but also the factors that might explain it (call type, agent, time).
Step 2 of 13Chart
Average handling time by call type
Step 3 of 13Practice · Choose one
A factory's scrap rate rose last month. Which first analysis step would most likely point toward the cause?
Step 4 of 13Learn
Scatter plots and correlation
When you suspect that one continuous variable affects another, plot them. A scatter plot puts the suspected cause (the input, or X) on the horizontal axis and the result (the output, or Y) on the vertical axis, one dot per observation.
Patterns to look for:
- Dots rising from left to right: a positive relationship (higher oven temperature, more burnt cookies).
- Dots falling: a negative relationship (more training hours, fewer errors).
- A shapeless cloud: no clear linear relationship.
- A curve: a relationship that isn't a straight line, such as quality improving up to an ideal temperature and then getting worse.
The correlation coefficient (r) summarizes the strength of a straight-line relationship on a scale from −1 to +1. Values near +1 or −1 mean the dots lie close to a line; values near 0 mean no linear relationship. As a rough guide, |r| above about 0.7 is often called strong, and below 0.3 weak, though what counts as useful depends on the field.
The big warning: correlation does not prove causation. Ice cream sales and drowning incidents are correlated, but ice cream doesn't cause drowning; hot weather drives both. A third factor that drives two variables at once is called a confounding or lurking variable. To show cause, you need a plausible mechanism and, ideally, an experiment where you change X and watch Y respond.
Step 5 of 13Chart
Oven temperature vs bake defects
The points slope down: a strong negative correlation. It suggests, but does not prove, that low temperatures cause defects.
| Point | Oven temperature (°C) | Defects per 100 loaves |
|---|---|---|
| Batch 1 | 170 | 9 |
| Batch 2 | 172 | 8 |
| Batch 3 | 175 | 7 |
| Batch 4 | 178 | 6 |
| Batch 5 | 180 | 5 |
| Batch 6 | 183 | 3 |
| Batch 7 | 186 | 3 |
| Batch 8 | 190 | 2 |
Step 6 of 13Practice · Select all that apply
Which conclusions are justified from a scatter plot showing a strong positive correlation (r = 0.85) between store size and monthly sales? Select all that apply.
Select all that apply.
Step 7 of 13Learn
Simple regression: putting a number on it
Simple linear regression fits the best straight line through a scatter plot:
Y = a + b × X
- a (the intercept) is the predicted Y when X is zero.
- b (the slope) is how much Y changes, on average, for each one-unit increase in X.
Suppose a packaging team finds that seal failures per 1,000 bags (Y) relate to sealing temperature below the ideal setting. Their regression gives Y = 2 + 1.5 × X, where X is the number of degrees below the ideal setting. At the ideal setting (X = 0), they expect about 2 failures per 1,000. At 4 degrees below, about 2 + 6 = 8. Now the team knows the size of the effect, not just its direction, and can decide how tightly temperature must be controlled.
The statistic R² (R-squared) tells you what share of the variation in Y the line explains. R² = 0.64 means 64% of the variation in seal failures is explained by temperature; the remaining 36% comes from other factors and noise. In simple regression, R² is just r squared: r = 0.8 gives R² = 0.64.
Two cautions. Don't extrapolate far beyond the range of your data; a relationship that holds between 0 and 10 degrees below ideal may not hold at 30. And always look at the scatter plot before trusting the numbers, because a curve or a few outliers can make a straight-line fit misleading.
Step 8 of 13Try the calculator
Regression prediction
Use a fitted line Y = a + b × X to predict the output for a chosen input.
- Predicted Y (failures per 1,000)
- 8
- R² (share of variation explained)
- 64 %
Step 9 of 13Practice · Work it out
A regression of delivery time (minutes) on distance (km) gives: time = 8 + 2.5 × distance. What delivery time does it predict for a 6 km trip?
Step 10 of 13Learn
Hypothesis tests in plain language
Suppose the night shift's average fill weight is 501.2 g and the day shift's is 500.4 g. Is that a real difference, or just random noise in the samples? A hypothesis test helps decide.
You start with a null hypothesis (H0): there's no real difference. The alternative hypothesis (H1) says there is. You collect data and calculate a p-value: the probability of seeing a difference at least this large if the null hypothesis were true.
- A small p-value (commonly below 0.05) means such a difference would be unlikely from chance alone, so you reject H0 and treat the difference as real (statistically significant).
- A large p-value means the data are consistent with no difference; you fail to reject H0. That isn't proof that the groups are identical, only that the data don't show a difference.
Common tests include the t-test (comparing two means), ANOVA (comparing three or more means) and the chi-square test (comparing proportions or counts across categories, such as defect rates by supplier).
Keep two ideas apart. Statistical significance says a difference probably isn't chance. Practical significance asks whether it matters. With huge samples, a 0.1 g difference in fill weight can be statistically significant yet irrelevant to customers. Always ask both questions.
Step 11 of 13Diagram
A hypothesis test in five moves
Tap a shape with to see more.
- Assume no difference (H0)
- Collect samples
- Compute the p-value
How surprising the data would be if H0 were true.
- Compare with 0.05
A common, but not sacred, threshold.
- Reject or fail to reject H0
Failing to reject is not proof of no difference.
Step 12 of 13Practice · True or false
A p-value of 0.30 proves that the two groups being compared are exactly the same.
Step 13 of 13Practice · What would you do?
What would you do?
A team finds that warehouses with more safety posters have fewer accidents (r = −0.6). A manager wants to print thousands of posters for every site. What's the best response?
Lesson complete!