Porisma
Back to reading

Correlation and linear regression

Choose the response and fit a line · Diagrams

Choose another diagram

Two regression directions

Compare the fitted response on the same x-horizontal and y-vertical axes. These source-role sketches preserve illustrative points and lines, not numerical observations or regressions calculated from the drawing.

Weak linear association

  • Solid: y on x
  • Dashed: x on y
In the source's near-zero-correlation sketch, the two line directions differ greatly.

Strong linear association

  • Solid: y on x
  • Dashed: x on y
In the source's near-perfect positive-correlation sketch, the two lines nearly coincide. The notes also make this comparison near r = −1.

Keep the two response models distinct

The y-on-x fit minimises squared vertical residuals; the x-on-y fit minimises squared horizontal residuals on these axes. Rearranging one fitted equation does not generally produce the other fitted regression.

y=a+bxx=c+dy\begin{aligned}y&=a+bx\\x&=c+dy\end{aligned}

Both fitted lines pass through the means

For paired data with both variables varying, both least-squares regressions pass through this mean point. Use the actual observations or fitted equations to find it; the schematic positions supply no numerical mean.

(xˉ,yˉ)(\bar x,\bar y)

At exactly zero linear correlation

When both variables vary and r is zero, both regression coefficients are zero. On the same axes, y-on-x is horizontal and x-on-y is vertical. The vertical line cannot be rewritten as a single-valued function y of x.

y=yˉx=xˉ\begin{aligned}y&=\bar y\\x&=\bar x\end{aligned}
  • Use the same axes and scale when comparing the two directions. A drawn angle is not a scale-independent measure of correlation; rescaling an axis changes the angle. Do not read a numerical r from these sketches.
  • With perfect linear association and both variables varying, the fitted lines coincide. A constant variable makes the usual correlation coefficient undefined, rather than providing a zero-correlation example.
  • Choosing a regression for prediction still depends on the prescribed explanatory role. Use the linked method to distinguish direct prediction from inverse calibration.
  • Zero linear correlation does not rule out a nonlinear relationship. Inspect the scatter before accepting a line.

Compare with the source direction sketches

Expand diagram

Use the scrollbars or arrow keys to inspect details.

Two source-role schematics on common x-horizontal and y-vertical axes: near-zero correlation gives nearly horizontal y-on-x and nearly vertical x-on-y lines; near-perfect positive correlation gives almost coincident lines. The same convergence applies near perfect negative correlation. Positions and lines illustrate roles, not numerical fits.
Two source-role schematics on common x-horizontal and y-vertical axes: near-zero correlation gives nearly horizontal y-on-x and nearly vertical x-on-y lines; near-perfect positive correlation gives almost coincident lines. The same convergence applies near perfect negative correlation. Positions and lines illustrate roles, not numerical fits.
Two source-role schematics on common x-horizontal and y-vertical axes: near-zero correlation gives nearly horizontal y-on-x and nearly vertical x-on-y lines; near-perfect positive correlation gives almost coincident lines. The same convergence applies near perfect negative correlation. Positions and lines illustrate roles, not numerical fits.
Open original diagram (new tab)
Back to reading