Data Modeling Reference

Linear Regression and Residuals

A regression line summarizes a linear trend. Residuals tell us how far individual observations sit above or below that model.

Solved Examples

Use the model $\hat y=3x+2$ when a model is needed.

Fact Table

FeatureMeaningWatch For
SlopePredicted change in $y$ for a one-unit increase in $x$.Interpret with variable units.
InterceptPredicted $y$ at $x=0$.May be meaningless if $0$ is outside the context.
Residualactual $y$ minus predicted $\hat y$.Positive means actual is above the line.
CorrelationDirection and strength of linear association.Does not establish causation.

Content Formulas

Regression Form
$$\hat y=mx+b$$
Residual
$$e=y-\hat y$$
Good Fit
$$\text{residuals scatter around }0\text{ without a pattern}$$

Regression Lab: Move the Model

Adjust a line through the same five data points. Watch each vertical dashed segment and the signed residual in the table.

A good line makes the residuals small and balanced above and below $0$; a residual pattern signals that a linear model may miss structure in the data.

Classic Examples

Interpret a Slope

For $\hat y=3x+2$, where $x$ is study hours and $y$ is quiz score, interpret the slope.

Solution Steps
  1. Identify the coefficient of $x$.
  2. Read it as a predicted change in score per study hour.
  3. State the context interpretation.
$$m=3$$$$\Delta x=1\Rightarrow\Delta\hat y=3$$$$\boxed{\text{Each additional study hour predicts 3 more score points.}}$$

Make a Prediction

Use $\hat y=3x+2$ to predict the quiz score after $4$ study hours.

Solution Steps
  1. Substitute the given x-value.
  2. Multiply and add.
  3. State the prediction.
$$\hat y=3(4)+2$$$$\hat y=14$$$$\boxed{\text{predicted score }14}$$

Find a Residual

At $x=4$, the actual score is $15$. Find the residual.

Solution Steps
  1. Use the predicted value from the model.
  2. Subtract predicted from actual.
  3. Interpret the sign.
$$\hat y=14$$$$e=15-14=1$$$$\boxed{\text{residual }1;\text{ the point is above the line.}}$$

Interpret a Residual Pattern

A residual plot is positive for small and large $x$-values but negative in the middle. Is a line a good model?

Solution Steps
  1. Check whether the residuals are randomly scattered around $0$.
  2. Notice the curved positive-negative-positive pattern.
  3. Decide whether a linear model misses structure.
$$\text{residuals form a pattern rather than a random cloud}$$$$\text{the relationship may curve}$$$$\boxed{\text{A linear model is not a good fit.}}$$

Describe an Association

A scatter plot falls from left to right with points close to a line. Describe the relationship.

Solution Steps
  1. Read the direction from left to right.
  2. Use point closeness to judge strength.
  3. State the association without claiming causation.
$$\text{trend decreases as }x\text{ increases}$$$$\text{points are close to a line}$$$$\boxed{\text{strong negative linear association}}$$