Cheat sheets

Statistics / Chapter 5

Regression Analysis

Cheat sheet

Association and correlation

  • A scatterplot keeps each pair of quantitative measurements together. Describe direction, form, strength and unusual observations. Inspect groups; a pooled pattern may differ from within-group patterns.
  • −1≤r≤1-1\le r\le1 Sign gives linear direction; magnitude gives linear strength. Positive unit conversions and swapping axes leave r unchanged. Negating one variable reverses its sign.
  • Zero correlation does not rule out a curved relationship or establish independence. A strong coefficient does not prove causality, and unusual points can change it.
  • For simple least-squares regression with an intercept, r2r^2 is the fraction of observed response variation accounted for by the line. It is not the fraction of points on the line or a causal probability.

Fit and interpret a line

  • y^=a+bx\hat y=a+bx b=r(sy/sx)b=r(s_y/s_x) a=yˉ−bxˉa=\bar y-b\bar x The fitted line passes through (xˉ,yˉ)(\bar x,\bar y) Least squares minimizes the sum of squared vertical residuals.
  • Residual e=y−y^e=y-\hat y Positive means the model underpredicts; negative means it overpredicts. Slope has response units per explanatory unit. Interpret the intercept only where x=0 is meaningful and relevant.
  • Regression output’s constant is the intercept and predictor coefficient is the slope. Residual s describes scatter in response units; R² describes a fraction of response variation.
  • Interpolation predicts within observed x values; extrapolation goes outside their range and may fail. Check the target population and setting as well as the range.

Model diagnostics

  • Plot residuals against x (or fitted values). A roughly patternless band around zero supports a linear form; curvature suggests missed form and a fan indicates changing residual spread.
  • For ordinary least squares with an intercept, residuals sum to zero apart from rounding. That balance alone does not establish good fit.
  • High leverage means unusual x. A large residual means unusual vertical departure. Influence means the fit or conclusion changes substantially when an observation is included.
  • Investigate validity and context, compare fits with and without an influential observation, and report sensitivity. Do not remove valid data solely to improve R².

Diagrams

Prediction and residual
For the supplied line y-hat=5+2x, x=4 gives prediction 13. The observation y=16 lies 3 units above it. The yellow vertical segment represents that residual, not a horizontal error. The supplied line is not fitted from the single displayed point.
For the supplied line y-hat=5+2x, x=4 gives prediction 13. The observation y=16 lies 3 units above it. The yellow vertical segment represents that residual, not a horizontal error. The supplied line is not fitted from the single displayed point. Source
Residual diagnostics
Schematic residual patterns: approximately even scatter around zero; positive extremes with a negative middle; and spread increasing with x. The latter two reveal limitations that a high R² can conceal.
Schematic residual patterns: approximately even scatter around zero; positive extremes with a negative middle; and spread increasing with x. The latter two reveal limitations that a high R² can conceal. Source

Sign in