Least-Squares Regression - Complete Interactive Lesson
Part 1: Scatterplots and Correlation
📈 Scatterplots and Correlation
Part 1 of 7 — Exploring Bivariate Relationships
Describing Scatterplots
When examining a scatterplot, describe:
| Feature | Options |
|---|---|
| Direction | Positive, negative, or none |
| Form | Linear, curved, or no pattern |
| Strength | Strong, moderate, or weak |
| Unusual features | Clusters, or points that don't fit the general pattern |
Correlation Coefficient
The correlation measures the strength and direction of a linear relationship. On the AP exam, is calculated using technology (calculator or computer output); you interpret it rather than compute it by hand.
| Value of | Interpretation |
|---|---|
| Perfect positive linear | |
| Perfect negative linear | |
| No linear relationship | |
| Strong linear | |
| Moderate linear |
Important Properties of
- always
- has no units
- is not affected by changes in units (e.g., inches to cm)
- measures only linear association — a strong curved relationship can have
- A single point that doesn't fit the pattern can change a lot
- An close to or does not by itself mean a linear model is appropriate: always look at the scatterplot (and later, the residual plot)
🔑 Correlation does NOT imply causation. A strong correlation between two variables does not mean one causes the other.
Correlation Check 🎯
Correlation Practice 🧮
1) If , what is ? (Round to 2 decimal places)
2) What percentage of variation in is explained by the linear relationship with ? (Use from #1, express as a whole number)
3) If every data point falls exactly on the line , then ?
Part 2: Least-Squares Regression Line
📊 Least-Squares Regression Line
Part 2 of 7 — The LSRL
Topics in This Part
| Section |
|---|
| 📐 What the LSRL Minimizes |
| 🧮 The Equation & Slope/Intercept |
| 📝 Interpreting Slope and Intercept |
| 📊 Predictions & Extrapolation |
🔑 Key Concept: The least-squares regression line (LSRL) is the line that minimizes the sum of the squared residuals — the best-fit line through a scatterplot.
The LSRL Equation
where:
- is the slope and is the -intercept; both are calculated using technology (calculator or computer output)
- ("y-hat") is the predicted value of the response for a given
- The line always passes through the point , so if you know and the two means you can find
What LSRL Minimizes
This is the sum of squared residuals — hence "least squares."
Interpreting Slope
Template: "For each additional [1 unit of ], the predicted [y variable] changes by [ units]."
Example: where = hours studied, = exam score.
✅ "For each additional hour studied, the predicted exam score increases by 3.5 points."
⚠️ AP Tip: Say "predicted" (or "on average"): the slope describes the model's prediction, not a guaranteed change for every individual.
Interpreting Intercept
Template: "When , the predicted [y variable] is []."
Example: in .
✅ "When a student studies 0 hours, the predicted exam score is 12 points."
⚠️ Caution: The intercept sometimes has no reasonable interpretation: may be far outside the data (extrapolation), or the predicted value may be impossible, such as a negative height.
Predictions & Extrapolation
| Term | Definition |
|---|---|
| Interpolation | Predicting within the interval of values used to fit the line ✓ |
| Extrapolation | Predicting beyond that interval ⚠️ |
⚠️ Extrapolation is less reliable the farther you go. The linear relationship may not hold outside the data range.
LSRL Concepts 🎯
LSRL Calculations 🧮
Technology gives the slope of the LSRL as . The means are and .
1) What is the intercept ?
2) What is when ?
3) An observed point is . What is its residual?
Interpretation Practice 🔍
where = temperature (°F), = hot chocolate sales (cups). The data cover temperatures from 20°F to 70°F.
Exit Quiz — LSRL ✅
Part 3: Residuals and Residual Plots
📊 Residuals and Residual Plots
Part 3 of 7 — Assessing the Fit of a Linear Model
Topics in This Part
| Section |
|---|
| 📐 What Is a Residual? |
| 📊 Residual Plots |
| ✅ Good vs. Bad Patterns |
| 📝 Worked Example |
🔑 Key Concept: A residual is the vertical distance from a data point to the regression line. Residual plots help us assess whether a linear model is appropriate.
Residual Formula
| Sign | Meaning |
|---|---|
| Residual | Point is above the line — the model underpredicts (underestimates) |
| Residual | Point is below the line — the model overpredicts (overestimates) |
| Residual | Point is exactly on the line |
The LSRL is the line that makes the sum of the squared residuals as small as possible.
Residual Plots
A residual plot is a scatterplot of the residuals (vertical axis) versus the predicted values or the explanatory variable (horizontal axis).
Reading Residual Plots
| Pattern | Interpretation |
|---|---|
| Apparent randomness around residual | ✅ Confirms a linear form; the linear model is appropriate |
| Curvature (U or ∩ shape) | ❌ The relationship is not linear; a linear model is not the most appropriate model |
| A point far above or below 0 | ⚠️ A point that doesn't fit the pattern: the model predicts it poorly; investigate it |
🔑 AP Tip: A correlation close to is not enough. Look at the residual plot before trusting a linear model.
Worked Example
. Data point: .
The residual is : the observed value is 3 units above the predicted value, so the model underpredicts this point by 3.
Residual Concepts 🎯
Residual Calculations 🧮
LSRL:
1) Point . Residual
2) Point . Residual
3) Point . The model ___ for this point (enter "overestimates" or "underestimates").
Residual Plot Patterns 🔍
Exit Quiz — Residuals ✅
Part 4: Coefficient of Determination
📊 Coefficient of Determination
Part 4 of 7 — Understanding
Topics in This Part
| Section |
|---|
| 📐 What Measures |
| 🧮 Getting from |
| 📝 Interpreting on the AP Exam |
| 🔗 vs. |
🔑 Key Concept: , the coefficient of determination, is the proportion of the variation in the response variable that is explained by the linear relationship with the explanatory variable .
The Definition
In simple linear regression, is the square of the correlation coefficient:
Technology reports it directly (often as "R-sq" or "", sometimes as a percent). Because it is a square, , and it carries no sign.
Interpretation Template
Example: , = hours studied, = exam score.
✅ "72% of the variation in exam scores is explained by the linear relationship with hours studied."
⚠️ AP Tip: Always say "variation in [y]" and "linear relationship with [x]." Do not say "caused by," and is NOT the percent of points on the line.
The rest, , is the proportion of variation in that the linear model leaves unexplained.
vs.
| Statistic | Measures | Range |
|---|---|---|
| Direction and strength of linear relationship | ||
| Proportion of variation in explained |
🔑 Key Insight: Going from back to , take the square root and give it the sign of the slope: with a negative slope means . Even explains only 49% of the variation.
Concepts 🎯
Calculations 🧮
1) . What is ?
2) . What percentage of the variation in is explained?
3) and the slope is negative. What is ?
Interpretation Practice 🔍
Exit Quiz — ✅
Part 5: Unusual Points, Extrapolation and Interpreting the Line
📊 Unusual Points, Extrapolation and Interpreting the Line
Part 5 of 7 — Reading a Regression Carefully
Topics in This Part
| Section |
|---|
| ⚠️ Unusual Features of a Scatterplot |
| 🔍 When Misleads |
| 📏 Interpolation vs. Extrapolation |
| 📝 Interpreting Slope and Intercept in Context |
🔑 Key Concept: A regression line is only as good as the pattern behind it. Before using a line, look for unusual features, check whether a linear model fits, and use it only for values like the ones in the data.
Unusual Features of a Scatterplot
A full description of a scatterplot gives form, direction, strength and unusual features. Unusual features are:
| Feature | What it looks like | What to do |
|---|---|---|
| Cluster | Separate groups of points | Describe each group; the groups may differ in some other variable |
| Point that doesn't fit the pattern | A point far from the overall trend; it has a large residual | Identify it in context and check it for a recording error. A single such point can noticeably change and the line |
Example: For 12 used cars, price falls steadily with age, except for one 6-year-old classic car priced far above the trend. That car is a point that doesn't fit the pattern: the line badly underpredicts its price, so its residual is large and positive.
When Misleads
- An close to or does not necessarily mean a linear model is appropriate. Gently curved data can give while the residual plot shows clear curvature.
- An near 0 means no linear association; a strong curved relationship is still possible.
- Correlation does not imply causation: a confounding variable may drive both variables.
Unusual Features Check 🎯
📏 Interpolation vs. Extrapolation
| Term | Meaning | Reliability |
|---|---|---|
| Interpolation | Predicting for an within the interval of values used to fit the line | Reasonable if the model fits |
| Extrapolation | Predicting for an beyond that interval | Less reliable the farther you go |
Example: For children aged 3 to 12 years, , where = age (years) and = height (inches).
- Age 8: inches (interpolation).
- Age 40: inches, over 10 feet (extrapolation; growth stops, so the line no longer applies).
📝 Interpreting Slope and Intercept in Context
Slope: "For each additional year of age, the predicted height increases by 2.4 inches."
Intercept: "At age 0, the predicted height is 30.2 inches." But age 0 is outside the 3-to-12-year data, so this is an extrapolation and should not be trusted.
The intercept also has no logical interpretation when it is impossible for the response, for example a negative predicted height, weight or count.
⚠️ AP Tip: Always name both variables, use "predicted," and give units. Say whether is inside the data before interpreting the intercept.
Using the Height Model 🧮
, with = age (years, data from 3 to 12) and = height (inches).
1) Predicted height at age 8?
2) Predicted height at age 40 (an extrapolation)?
3) A 10-year-old is 52 inches tall. What is the residual?
Reading the Line Carefully 🔍
Exit Quiz — Unusual Points, Extrapolation & Interpretation ✅
Part 6: Problem-Solving Workshop
📊 Problem-Solving Workshop
Part 6 of 7 — Full Regression Analysis Problems
Workshop Goals
| Skill |
|---|
| 📐 Read the LSRL from technology output |
| 📝 Interpret slope, intercept, , and in context |
| 📉 Analyze residuals and residual plots |
| ⚠️ Identify unusual points |
| 🎯 Recognize the limits of the model |
🔑 AP Tip: Free-response regression questions typically ask you to interpret slope/ in context, describe the residual plot, and discuss whether the model is appropriate.
Worked Example 1 — Temperature and Ice Cream Sales
A manager records daily high temperature (, °F) and ice cream sales (, $100s) for 15 summer days.
Technology output:
| Term | Coefficient |
|---|---|
| Constant | |
| Temperature |
Step 1 — Write the LSRL:
Step 2 — Interpret the slope: "For each additional degree Fahrenheit in daily high temperature, the predicted ice cream sales increase by $15 (0.15 hundreds of dollars)."
Step 3 — Interpret : "91.1% of the variation in ice cream sales is explained by the linear relationship with daily high temperature."
Step 4 — Predict: At F:
Step 5 — Check appropriateness:
- Residual plot shows no obvious pattern → linear model is appropriate
- → most of the variation in sales is explained
- No points stand far from the pattern in the residual plot
Worked Example 2 — Study Hours and GPA
A sample of 30 college students. = weekly study hours, = GPA.
LSRL: , ,
Most students study 5–25 hours; one student studies 42 hours/week and has a GPA of 3.9.
Analysis:
-
Slope interpretation: "For each additional hour of weekly studying, the predicted GPA increases by 0.052 points."
-
interpretation: "46.2% of the variation in GPA is explained by the linear relationship with weekly study hours."
-
The 42-hour student:
- , so the predicted GPA is 4.034
- Residual , a small residual
- Although this is far from the other students, the point fits the general pattern
-
Prediction for 50 hours:
- This is extrapolation (beyond the data), and the prediction exceeds 4.0, the maximum GPA, so it is unreliable!
Common Mistakes on the AP Exam
| Mistake | Correction |
|---|---|
| "Temperature causes sales to increase" | Use "is associated with" or "predicts" |
| "91.1% of the data falls on the line" | " measures variation explained, not % of points on the line" |
| Interpreting the intercept literally when is outside the data | "The intercept has no reasonable interpretation because is outside the range of data" |
| Forgetting units in slope interpretation | "For each additional [unit of x], the predicted [y] [increases/decreases] by [slope] [units of y]" |
Regression Analysis Practice 🎯
Computations 🧮
LSRL: ,
1) Predict when .
2) What is ? (two decimal places)
3) Observed when . What is the residual?
Interpretation Decisions 🔍
Exit Quiz — Regression Workshop ✅
Part 7: Review & Applications
📊 Review & Applications
Part 7 of 7 — Comprehensive Linear Regression Review
Complete Reference
| Concept | What to know |
|---|---|
| LSRL | ; , and come from technology |
| Point of means | The LSRL passes through , so |
| Least squares | The LSRL minimizes the sum of squared residuals |
| , the proportion of variation in explained | |
| Residual | residual |
Interpretation Templates (AP Exam Ready)
Slope: "For each additional [1 unit of x], the predicted [y in context] [increases/decreases] by [|b|] [units of y]."
Intercept: "When [x in context] is 0, the predicted [y in context] is [a] [units of y]." (Only if is within the data and the value makes sense.)
: "There is a [strong/moderate/weak], [positive/negative], linear association between [x] and [y]."
: "[]% of the variation in [y in context] is explained by the linear relationship with [x in context]."
Residual: "The actual [y in context] was [e] [units] [above/below] the value predicted by the model."
Key Concepts Summary
| Topic | Key Takeaway |
|---|---|
| Scatterplot | Always plot data first; describe form, direction, strength, unusual features |
| LSRL | Minimizes the sum of squared residuals; passes through |
| Slope & Intercept | Slope = predicted change per unit of ; intercept = prediction at (if meaningful) |
| Residuals | Residual ; positive means the model underpredicts; residual plot checks the form |
| Direction + strength of a linear association; ; unit-free | |
| Proportion of variation explained; | |
| Unusual features | Clusters and points that don't fit the pattern; describe and investigate them |
| Extrapolation | Predicting beyond the data — less reliable the farther you go |
Decision Guide
🔑 AP Exam Strategy: Regression appears on the exam every year. Master the interpretation templates — they earn you full credit on free-response questions.
Comprehensive Review 🎯
Mixed Calculations 🧮
Technology gives and . The means are and .
1) Find the intercept .
2) Predict when .
3) What is ? (two decimal places)
Concept Connections 🔍
Final Exam — Linear Regression ✅