Correlation and the Two Regression Lines
Read Pearson’s r, fit the correct prediction line and use the product of the two regression coefficients.
Correlation describes linear association
Pearson’s sample correlation r lies between −1 and +1. Its sign tells the direction of the linear association. Its magnitude tells how closely the points follow a straight-line pattern. The coefficient has no units. Swapping x and y leaves r unchanged. A zero correlation can occur when there is a curved relationship. Correlation alone cannot establish that a change in one variable causes a change in the other.
Decide what you want to predict
Use the regression of y on x when x is given and y is the target. With nonzero sample standard deviations sₓ and sᵧ, its slope is b_yx = r(sᵧ/sₓ). A convenient form of the fitted line is ŷ − ȳ = b_yx(x − x̄). It passes through the pair of sample means (x̄, ȳ).
For the regression of x on y, use b_xy = r(sₓ/sᵧ) and x̂ − x̄ = b_xy(y − ȳ). Each line minimises squared errors in its own target variable. Switching the target requires the other slope formula. Algebraically reversing a prediction line generally gives a different slope.
Worked example: predict y from x
Take x̄ = 10, ȳ = 40, sₓ = 4, sᵧ = 12 and r = 0.5. The y-on-x slope is 0.5 × 12/4 = 1.5. For x = 14 the fitted y is 40 + 1.5 × (14 − 10) = 46.
The x-on-y slope is 0.5 × 4/12 = 1/6. If y = 46, the fitted x is 10 + (1/6) × (46 − 40) = 11. Notice that predicting y from x = 14 and then predicting x from that y does not generally recover 14.
Check two given regression coefficients
The product b_yx × b_xy is r². The two coefficients share the sign of r. For example, if the coefficients are −0.80 and −0.45, their product is 0.36, so r = −0.60. A coefficient can exceed 1 in magnitude when variables have different spreads. The product cannot exceed 1.
Penn State Department of Statistics, correlation and simple linear regression · NIST, linear least squares regression
Sign in to keep your progress. Sign in