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
| Feature | Meaning | Watch For |
|---|---|---|
| Slope | Predicted change in $y$ for a one-unit increase in $x$. | Interpret with variable units. |
| Intercept | Predicted $y$ at $x=0$. | May be meaningless if $0$ is outside the context. |
| Residual | actual $y$ minus predicted $\hat y$. | Positive means actual is above the line. |
| Correlation | Direction 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
- Identify the coefficient of $x$.
- Read it as a predicted change in score per study hour.
- 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
- Substitute the given x-value.
- Multiply and add.
- 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
- Use the predicted value from the model.
- Subtract predicted from actual.
- 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
- Check whether the residuals are randomly scattered around $0$.
- Notice the curved positive-negative-positive pattern.
- 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
- Read the direction from left to right.
- Use point closeness to judge strength.
- 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}}$$