Scatter Plots and Correlation
A scatter plot shows pairs . The correlation coefficient measures the strength and direction of a LINEAR relationship: , with near for tight lines and near for no linear pattern. has no units and does not change if either variable is rescaled.
Correlation is the average product of the two z-scores: . When is above its mean, is usually above its mean too? If so, the products are mostly positive and is positive. That formula also explains what misses: a perfect U-shaped relationship has , because above-average pairs with above-average on one side and below-average on the other.
Data: . Means , . Deviations: and . Products sum to ; squares sum to for and for . So : a strong positive linear pattern. (Dividing each deviation by its SD and averaging the products with gives the same number.)
Points tightly along a line rising to the right: . A loose cloud falling to the right: . A circle of points: . The sign is the direction; the size is how closely the points hug a line — not the steepness of the line.
Data: with . Here and , and . So although is completely determined by . Correlation measures LINEAR association only.
A strong says the variables move together. It does not say one causes the other: a lurking variable may drive both (ice-cream sales and drownings both rise in summer).
Reading the sign as strength. is a STRONGER linear relationship than ; it simply runs downhill. And a single outlier can create or destroy a large in a small data set, so always look at the scatter plot.
Heights (cm) and weights (kg) have . If heights are converted to inches, what is ?
Show the answerHide the answer
Unchanged: . Converting units is a linear rescaling, which leaves every z-score, and so the average product of z-scores, the same.
The Least-Squares Line
The least-squares line minimizes the sum of squared vertical residuals . Its slope is and it always passes through , so . The slope means: for each unit increase in , changes by on average.
The line predicts, it does not explain. Its slope is times the ratio of spreads, which says something surprising: for , the predicted is always fewer standard deviations from its mean than is from its mean. Tall parents have children who are tall, but on average less tall than the parents — "regression toward the mean", which gave the whole method its name.
, , , , . Slope . The line passes through the point of means, so . Line: . Predicted at : .
For : (the same as , since here). Then : . The predictions leave residuals , which sum to — the line balances the points above it against those below.
With , the prediction at is — a mild extrapolation just past the data. At the line says , a number with no support at all: nothing in five points between and says the pattern continues that far.
Extrapolating far outside the range of the data, and swapping the roles of the variables: the line that predicts from is NOT the line that predicts from (unless ), because each minimizes errors in a different direction.
Using , a data point is . Find the residual.
Show the answerHide the answer
Predicted ; residual (the point is above the line).
Residuals and
is the fraction of the variation in explained by the line: . A residual plot graphs residuals against ; a patternless band means a line is a reasonable model, while a curve or a funnel means it is not.
The total variation is how much varies with no model at all; the residual sum of squares is what is left after the line. Their ratio is the unexplained fraction, and is the rest. But measures how close the points are to the line, not whether a line is the right shape — a residual plot answers that question, because a good model leaves only noise behind.
Residuals have squares summing to . The total variation of is . So , which is indeed . The line explains of the variation in .
Fit a line to : , , . The residuals are : positive, negative, positive — a U. And . The fit looks excellent by , yet the residual plot shows the points follow a curve; predictions from the line will be systematically wrong at both ends.
Reading as " of the points are on the line", or as "the prediction is right of the time". It is a fraction of VARIATION: of the spread in is accounted for by its linear relationship with .
A study reports between hours of television and test score. What fraction of the variation in test scores does the line explain?
Show the answerHide the answer
: about . The negative sign disappears on squaring — it gives the direction, not the strength.
Why It Works
For any fixed slope , the sum is a quadratic in , smallest when its derivative is zero, i.e. when the residuals sum to zero. That gives : the line passes through . Substituting and minimizing over the same way gives , and dividing top and bottom by turns this into . Since , a one-SD change in predicts at most a one-SD change in : regression toward the mean is built into the formula.