Green Belt · Improve phase
Lesson 6 asked whether two proportions differ or whether two categories are associated, using a chi-square test on counts. This lesson asks a related but different question about two continuous, measured variables: when they move together, how strong is that relationship, and can it be used to predict one from the other? A scatter plot is the first tool for seeing whether a relationship exists at all, and simple linear regression is the tool for describing it with a straight-line equation. This lesson covers scatter plots, the Pearson correlation coefficient r, the regression equation Y = b0 + b1X, the least-squares method that fits it, interpreting the slope and intercept, R-squared, the p-value that tests whether the slope is real, and the residual checks that decide whether the straight-line model can be trusted.
A scatter plot plots one variable against another, one point per observation, and is always the first step before fitting any regression line: a line fit to data with no linear pattern, or data that curves, is misleading no matter how clean the arithmetic looks. The Pearson correlation coefficient, r, summarizes the strength and direction of a straight-line relationship between two continuous variables in a single number that always falls between -1 and +1. An r near +1 means the two variables rise together in a tight straight line; an r near -1 means one falls as the other rises, just as tightly; an r near 0 means little or no straight-line relationship. A strong curved relationship can still hide behind a near-zero r, which is exactly why the scatter plot comes before, not after, the correlation number.
Two variables can correlate strongly for reasons besides one causing the other: a third, lurking variable may drive both, the relationship may run through a chain of other factors, or the pattern may be coincidence in a small or unusual sample. Suppose GCHS finds that rehab sites with more two-person work-pairs assigned also close out more punch-list items per day. That correlation is real and useful for scheduling, but it does not by itself prove adding crews caused the improvement; site difficulty, homeowner cooperation, or the season could be driving both numbers. Confirming a causal claim needs a controlled comparison or a designed experiment, not a correlation coefficient by itself.
Why this matters
Distinguishing "X and Y are correlated" from "X causes Y" is a core skill for any Green Belt, and it is also one of the most common mistakes a project team makes when it presents results to a steering committee.
Simple linear regression fits a straight line through the scatter plot with the equation Y = b0 + b1X, where Y is the response being predicted, X is the predictor, b0 is the intercept, and b1 is the slope. The line is fit by the method of least squares, which finds the one b0 and b1 that make the sum of the squared vertical distances between each actual point and the line, the residuals, as small as possible. Squaring the distances before summing them means a point far from the line counts much more heavily than one close to it, and using squares rather than absolute values keeps the calculation solvable in closed form rather than requiring trial and error.
A GCHS site supervisor records, for five recent rehab days, the number of two-person work-pairs assigned (X) and the number of punch-list items closed out by end of day (Y): (1,3), (2,5), (3,4), (4,6), (5,7).
| X (work-pairs) | Y (items closed) | X - mean X | Y - mean Y | product |
|---|---|---|---|---|
| 1 | 3 | -2 | -2 | 4 |
| 2 | 5 | -1 | 0 | 0 |
| 3 | 4 | 0 | -1 | 0 |
| 4 | 6 | 1 | 1 | 1 |
| 5 | 7 | 2 | 2 | 4 |
The mean of X is (1+2+3+4+5)/5 = 3, and the mean of Y is (3+5+4+6+7)/5 = 5. Summing the last column gives 4+0+0+1+4 = 9. Squaring and summing the "X - mean X" column gives 4+1+0+1+4 = 10. The slope is the sum of the products divided by the sum of the squared X-deviations: b1 = 9 / 10 = 0.9. The intercept is b0 = mean Y - b1 × mean X = 5 - 0.9(3) = 5 - 2.7 = 2.3. The fitted line is Y = 2.3 + 0.9X, matching the figure above.
Each additional work-pair assigned is associated with 0.9 more punch-list items closed that day, on average, within this small data set. The intercept, 2.3, is the model's predicted value when X = 0, but zero work-pairs falls outside the observed range of 1 to 5; intercepts often sit outside the useful range of the data and should be read as part of the line's math, not taken as a literal real-world prediction unless X = 0 is a value that actually occurs.
R-squared measures how much of the variation in Y is explained by the fitted relationship with X, reported as a value between 0 and 1 (or as a percentage). In simple linear regression, with exactly one predictor, R-squared is exactly equal to r squared, the Pearson correlation coefficient squared; that equality no longer holds once more than one predictor is added, which the next lesson covers. Squaring the "Y - mean Y" column above and summing gives 4+0+1+1+4 = 10, so r = 9 / √(10 × 10) = 9/10 = 0.9, and R² = 0.81: about 81 percent of the day-to-day variation in items closed is explained by the number of work-pairs assigned, in this small sample.
A separate hypothesis test checks whether the slope is really different from zero in the population, not just in this one sample: the null hypothesis is that the true slope equals zero, meaning X has no straight-line relationship with Y. If the resulting p-value is less than alpha, reject the null hypothesis and conclude the slope is statistically significant; otherwise fail to reject it, and the apparent relationship in the sample cannot be distinguished from noise. A small sample, like the five days above, makes that test weak, which is itself a reason to gather more data before leaning on a regression for a real scheduling decision.
R-squared and the slope's p-value are only trustworthy if the residuals, the actual-minus-predicted differences, reasonably meet four assumptions: normality (the residuals should be approximately normally distributed, checked with a normal probability plot); constant variance, also called homoscedasticity (the spread of residuals should stay roughly the same across the range of predicted values rather than fan out or narrow); independence (one residual should not help predict the next, which matters most when data is collected in time order); and linearity (a straight line should actually be the right shape for the relationship). The standard diagnostic is a plot of residuals against fitted values: a random, structureless scatter around zero supports the model; a funnel or fan shape flags non-constant variance; a curved band flags a missing non-linear term; and a clear trend when points are read in time order flags a violation of independence.
1. What is the possible range of the Pearson correlation coefficient, r?
2. A GCHS analyst finds a strong positive correlation between the number of work-pairs assigned to a rehab site and the number of punch-list items closed per day. What can correctly be concluded?
3. The method of least squares fits a regression line by minimizing what quantity?
4. In the equation Y = b0 + b1X, what does b1 represent?
5. A fitted line has intercept b0 = 2.3, but X = 0 never occurs in the collected data (X ranges from 1 to 5). How should the intercept be treated?
6. For five data points, the sum of the products of X and Y deviations from their means is 9, and the sum of the squared X deviations is 10. What is the slope, b1?
7. Using b1 = 0.9, mean X = 3, and mean Y = 5, what is the intercept, b0?
8. For the fitted line Y = 2.3 + 0.9X, what is the predicted value at X = 3, and what is the residual if the actual Y at X = 3 is 4?
9. In simple linear regression with exactly one predictor, how does R-squared relate to the Pearson correlation coefficient r?
10. For the worked example, r = 0.9. What is R-squared, and roughly how should it be interpreted?
11. A regression's slope has a p-value of 0.31 at alpha = 0.05. What is the correct conclusion?
12. A plot of residuals against fitted values fans out, showing small residuals for low predicted values and large, widely scattered residuals for high predicted values. Which assumption is most likely violated?
13. A residuals-versus-fitted-values plot shows a clear curved, U-shaped band rather than a random scatter. What does this most likely indicate?
14. Data was collected in time order, and a plot of residuals against the order of collection shows a clear rising trend rather than random scatter. Which assumption does this call into question?