Sub topic 10
Quantifying Relationships with Correlation and Regression
Before starting, assume you understand DMAIC, process output Y, input X, mean, standard deviation, histograms, and run charts. You should also know that a suspected root cause must be tested against evidence rather than accepted because it sounds reasonable.
Correlation and regression help quantify how two numerical variables move together. For example, a team may suspect that longer queue time increases order cycle time. Queue time is the input candidate, X. Cycle time is the process output, Y.
Correlation: measuring the strength of a relationship
A correlation coefficient, usually written as r, measures the direction and strength of a linear relationship between two numerical variables.
- r = +1 means a perfect positive linear relationship.
- r = -1 means a perfect negative linear relationship.
- r = 0 means no linear relationship.
A positive value means that larger X values tend to occur with larger Y values. A negative value means that larger X values tend to occur with smaller Y values. Values close to zero can still hide a curved relationship, so always inspect a graph.
| Correlation value | Typical interpretation |
|---|---|
| 0.85 | Strong positive linear relationship |
| -0.60 | Moderate negative linear relationship |
| 0.05 | Almost no linear relationship |
Correlation is useful for screening possible causes. If the suspected input and the output have a correlation near zero, the cause becomes less plausible. However, a strong correlation does not prove that X causes Y.
Regression: estimating the change in the output
Simple linear regression fits a line to paired X and Y data:
predicted Y = intercept + slope × XThe slope estimates how much the average output changes for a one-unit increase in X. The intercept is the predicted Y value when X equals zero. The intercept may have no practical meaning if X cannot actually be zero.
For example, suppose a regression gives:
predicted cycle time = 18.4 + 0.72 × queue timeThe slope of 0.72 means that each additional minute of queue time is associated with an average increase of 0.72 minutes in cycle time. The word “associated” matters. The result does not yet prove that reducing queue time will reduce cycle time.
The coefficient R², called the coefficient of determination, describes the proportion of variation in Y explained by the fitted linear relationship with X. An R² of 0.64 means the model explains 64% of the observed variation in Y for this dataset and model. It does not mean that X causes 64% of the outcome.
A practical analysis sequence
Use this sequence when checking a suspected relationship:
- Define X and Y, including their units and the time period.
- Confirm that each X value is correctly paired with the corresponding Y value.
- Plot a scatter plot before calculating statistics.
- Look for curvature, clusters, outliers, and changing spread.
- Calculate the correlation and fit a regression line.
- Interpret the slope in process terms.
- Check residuals, which are the differences between observed and predicted Y.
- Ask whether another variable could explain both X and Y.
A single extreme point can make correlation look strong. A time trend can also create a relationship even when neither variable causes the other. For example, both staffing level and production volume may change during seasonal demand.
Worked example in Python
The following example measures the relationship between queue time and cycle time.
import numpy as np
from scipy import stats
queue_time = np.array([2, 3, 4, 5, 6, 7, 8, 9])
cycle_time = np.array([20, 21, 22, 23, 25, 25, 27, 28])
correlation, p_value = stats.pearsonr(queue_time, cycle_time)
slope, intercept, r_value, regression_p, standard_error = stats.linregress(
queue_time, cycle_time
)
print(f"Correlation r = {correlation:.2f}")
print(f"Regression: predicted cycle time = {intercept:.2f} + "
f"{slope:.2f} × queue time")
print(f"R-squared = {r_value ** 2:.2f}")The correlation indicates how closely the points follow a straight-line pattern. The slope estimates the change in cycle time per additional minute of queue time. Review the scatter plot and process context before treating the relationship as evidence of a root cause.
Exercise
A suspected cause has r = 0.91 with the process output. Can you accept it as the verified root cause?
Show answer
No. The strong relationship supports further investigation, but correlation does not establish causation. Check confounders, measurement quality, timing, and, when practical, use a controlled trial.