Skip to content
🎯⭐ INTERACTIVE LESSON

Coefficient of Determination

Learn step-by-step with interactive practice!

Coefficient of Determination - 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:

FeatureOptions
DirectionPositive, negative, or none
FormLinear, curved, or no pattern
StrengthStrong, moderate, or weak
OutliersAny points that don't fit the pattern

Correlation Coefficient rr

The correlation rr measures the strength and direction of a linear relationship:

r=1n−1∑(xi−xˉsx)(yi−yˉsy)r = \frac{1}{n-1} \sum \left(\frac{x_i - \bar{x}}{s_x}\right)\left(\frac{y_i - \bar{y}}{s_y}\right)

Value of rrInterpretation
r=1r = 1Perfect positive linear
r=−1r = -1Perfect negative linear
r=0r = 0No linear relationship
$0.8 \leqr
$0.5 \leqr

Important Properties of rr

  • −1≤r≤1-1 \leq r \leq 1 always
  • rr has no units
  • rr is not affected by changes in units (e.g., inches to cm)
  • rr measures only linear association — a strong curved relationship can have r≈0r \approx 0
  • rr is sensitive to outliers

🔑 Correlation does NOT imply causation. A strong correlation between two variables does not mean one causes the other.

Correlation Check 🎯

Correlation Practice 🧮

1) If r=0.72r = 0.72, what is r2r^2? (Round to 2 decimal places)

2) What percentage of variation in yy is explained by the linear relationship with xx? (Use r2r^2 from #1, express as a whole number)

3) If every data point falls exactly on the line y=3x+2y = 3x + 2, then r=r = ?

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

y^=a+bx\boxed{\hat{y} = a + bx}

where:

  • b=r⋅sysxb = r \cdot \frac{s_y}{s_x} (slope)
  • a=yˉ−bxˉa = \bar{y} - b\bar{x} (intercept)
  • The line always passes through the point (xˉ,yˉ)(\bar{x}, \bar{y})

What LSRL Minimizes

LSRL minimizes ∑(yi−y^i)2=∑ei2\text{LSRL minimizes } \sum (y_i - \hat{y}_i)^2 = \sum e_i^2

This is the sum of squared residuals — hence "least squares."


Interpreting Slope

Template: "For each additional [1 unit of xx], the predicted [y variable] changes by [bb units], on average."

Example: y^=12+3.5x\hat{y} = 12 + 3.5x where xx = hours studied, yy = exam score.

✅ "For each additional hour studied, the predicted exam score increases by 3.5 points, on average."

⚠️ AP Tip: Include "predicted" and "on average" for full credit.


Interpreting Intercept

Template: "When x=0x = 0, the predicted [y variable] is [aa]."

Example: a=12a = 12 in y^=12+3.5x\hat{y} = 12 + 3.5x.

✅ "When a student studies 0 hours, the predicted exam score is 12 points."

⚠️ Caution: The intercept often has no practical meaning (e.g., studying 0 hours). State the interpretation but note if x=0x = 0 is outside the data range.


Predictions & Extrapolation

TermDefinition
InterpolationPredicting within the range of observed xx values ✓
ExtrapolationPredicting outside the range of observed xx values ⚠️

⚠️ Extrapolation is unreliable. The linear relationship may not hold outside the data range.

LSRL Concepts 🎯

LSRL Calculations 🧮

Given: xˉ=10\bar{x} = 10, yˉ=25\bar{y} = 25, sx=4s_x = 4, sy=8s_y = 8, r=0.85r = 0.85.

1) What is the slope bb?

2) What is the intercept aa?

3) What is y^\hat{y} when x=12x = 12?

Interpretation Practice 🔍

y^=50−0.8x\hat{y} = 50 - 0.8x where xx = temperature (°F), yy = hot chocolate sales.

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

ei=yi−y^i=observed−predicted\boxed{e_i = y_i - \hat{y}_i = \text{observed} - \text{predicted}}

SignMeaning
e>0e > 0Point is above the line — model underestimates
e<0e < 0Point is below the line — model overestimates
e=0e = 0Point is exactly on the line

Properties of Residuals

  1. ∑ei=0\sum e_i = 0 (residuals always sum to zero)
  2. The mean of residuals = 0
  3. ∑ei2\sum e_i^2 is minimized by the LSRL

Residual Plots

A residual plot plots residuals (ee) on the yy-axis vs. the explanatory variable (xx) or fitted values (y^\hat{y}) on the xx-axis.

Reading Residual Plots

PatternInterpretation
Random scatter around e=0e = 0✅ Linear model is appropriate
Curved pattern (U or ∩)❌ Relationship is nonlinear — use a transformation
Fan shape (spread changes)❌ Non-constant variance — predictions are less reliable at some xx values
Outliers⚠️ Individual points far from e=0e = 0 — investigate

🔑 AP Tip: The residual plot is your most important diagnostic tool. ALWAYS examine it before trusting a regression.


Worked Example

y^=10+2x\hat{y} = 10 + 2x. Data point: (5,23)(5, 23).

y^=10+2(5)=20\hat{y} = 10 + 2(5) = 20 e=23−20=3e = 23 - 20 = 3

The residual is +3+3: the observed value is 3 units above the predicted value.

Residual Concepts 🎯

Residual Calculations 🧮

LSRL: y^=15+4x\hat{y} = 15 + 4x

1) Point (3,30)(3, 30). Residual e=e =

2) Point (5,33)(5, 33). Residual e=e =

3) Point (2,23)(2, 23). The model ___ (enter "overestimates" or "underestimates").

Residual Plot Patterns 🔍

Exit Quiz — Residuals ✅

Part 4: Coefficient of Determination

📊 Coefficient of Determination

Part 4 of 7 — Understanding r2r^2


Topics in This Part

Section
📐 What r2r^2 Measures
🧮 Calculating r2r^2 from rr
📝 Interpreting r2r^2 on the AP Exam
🔗 rr vs. r2r^2

🔑 Key Concept: r2r^2 tells you the fraction of variability in yy that is explained by the linear relationship with xx.


The Definition

r2=SSRSST=1−SSESST\boxed{r^2 = \frac{\text{SSR}}{\text{SST}} = 1 - \frac{\text{SSE}}{\text{SST}}}

where:

  • SST = total sum of squares = ∑(yi−yˉ)2\sum(y_i - \bar{y})^2 (total variability in yy)
  • SSE = sum of squared errors = ∑(yi−y^i)2\sum(y_i - \hat{y}_i)^2 (unexplained variability)
  • SSR = regression sum of squares = SST −- SSE (explained variability)

Or simply: r2=r×rr^2 = r \times r (square the correlation coefficient).


Interpretation Template

"[r2×100]% of the variability in [y context] is explained by the linear relationship with [x context]."\text{"[}r^2 \times 100\text{]\% of the variability in [y context] is explained by the linear relationship with [x context]."}

Example: r2=0.72r^2 = 0.72, xx = hours studied, yy = exam score.

✅ "72% of the variability in exam scores is explained by the linear relationship with hours studied."

⚠️ AP Tip: Always say "variability in [y]" and "linear relationship with [x]." Do not say "caused by" or "due to."


rr vs. r2r^2

StatisticMeasuresRange
rrDirection and strength of linear relationship−1≤r≤1-1 \leq r \leq 1
r2r^2Proportion of variability explained0≤r2≤10 \leq r^2 \leq 1
rrr2r^2Strength
±0.9\pm 0.90.810.81Strong
±0.7\pm 0.70.490.49Moderate
±0.5\pm 0.50.250.25Weak
±0.3\pm 0.30.090.09Very weak

🔑 Key Insight: Even a "moderate" r=0.7r = 0.7 only explains 49% of the variability. Much variation remains unexplained.

r2r^2 Concepts 🎯

r2r^2 Calculations 🧮

1) r=0.9r = 0.9. What is r2r^2?

2) r2=0.49r^2 = 0.49. What percentage of variability is explained?

3) SST = 500, SSE = 125. What is r2r^2?

Interpretation Practice 🔍

Exit Quiz — r2r^2 ✅

Part 5: Influential Points and Outliers

📊 Influential Points and Outliers

Part 5 of 7 — Leverage, Influence, and Unusual Observations


Topics in This Part

Section
⚠️ Outliers in Regression
📐 High-Leverage Points
🔄 Influential Points
🧪 Diagnosing Unusual Points

🔑 Key Concept: Not all unusual points are equally problematic. Some change the regression line dramatically (influential), while others are just far from the pattern (outliers).


Three Types of Unusual Points

1. Outlier (in yy-direction)

  • A point whose yy-value is far from the predicted y^\hat{y} (large residual)
  • Has an unusually large ∣residual∣|\text{residual}|
  • Does NOT necessarily change the regression line much

2. High-Leverage Point (in xx-direction)

  • A point whose xx-value is far from xˉ\bar{x}
  • Has the potential to influence the regression line
  • May or may not actually change the line — depends on where it falls

3. Influential Point

  • A point that, when removed, substantially changes the slope, intercept, or r2r^2
  • High-leverage points that are also outliers are the most influential
  • Test: Fit the LSRL with and without the point. If slope/intercept/r2r^2 changes a lot, the point is influential.

Visualizing the Distinction

ScenarioLarge Residual?Far from xˉ\bar{x}?Influential?
Regular point near centerNoNoNo
Outlier near center of xxYesNoUsually no
Point at extreme xx, on the lineNoYesUsually no
Point at extreme xx, off the lineYesYesYes

Worked Example

A researcher collects data on advertising spending (xx, in thousands) and sales (yy, in thousands) for 10 stores:

Most stores spend $2K–$8K. One store spent $25K (high leverage).

  • Scenario A: That store had $50K in sales, fitting the overall pattern → high leverage but NOT influential.
  • Scenario B: That store had $5K in sales, far below the trend → high leverage AND influential. Removing it would substantially change the slope.

⚠️ AP Tip: On the AP exam, "influential" specifically means removing the point changes the regression equation meaningfully. Always describe the effect on slope, intercept, or r2r^2.


What to Do with Unusual Points

  1. Investigate — is there a data-entry error or special circumstance?
  2. Report both analyses — with and without the point
  3. Never silently delete data — explain your reasoning
  4. Check the residual plot — unusual points often show up clearly

Identifying Unusual Points 🎯

Diagnosing Points 🧮

1) The LSRL is y^=10+3x\hat{y} = 10 + 3x. A point has x=5,y=35x = 5, y = 35. What is the residual?

2) xˉ=12\bar{x} = 12. A point has x=45x = 45. Is this point high-leverage? (yes/no)

3) With all points: slope =1.8= 1.8. Without point A: slope =1.7= 1.7. Without point B: slope =4.5= 4.5. Which point is more influential? (A/B)

Leverage and Influence Concepts 🔍

Exit Quiz — Influential Points & Outliers ✅

Part 6: Problem-Solving Workshop

📊 Problem-Solving Workshop

Part 6 of 7 — Full Regression Analysis Problems


Workshop Goals

Skill
📐 Compute and interpret the LSRL
📝 Interpret slope, intercept, rr, and r2r^2 in context
📉 Analyze residuals and residual plots
⚠️ Identify unusual/influential points
🎯 Recognize the limits of the model

🔑 AP Tip: Free-response regression questions typically ask you to interpret slope/r2r^2 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 (xx, °F) and ice cream sales (yy, $100s) for 15 summer days.

Computer output:

PredictorCoefSE CoefTP
Constant−3.50-3.501.121.12−3.13-3.130.0080.008
Temperature0.150.150.0130.01311.5411.54<0.001< 0.001

S=0.96R-sq=91.1%S = 0.96 \quad R\text{-}sq = 91.1\%

Step 1 — Write the LSRL: y^=−3.50+0.15x\hat{y} = -3.50 + 0.15x

Step 2 — Interpret the slope: "For each additional degree Fahrenheit increase in daily high temperature, the predicted ice cream sales increase by $15 (0.15 hundreds)."

Step 3 — Interpret r2r^2: "91.1% of the variability in ice cream sales is explained by the linear relationship with daily high temperature."

Step 4 — Predict: At x=85°x = 85°F: y^=−3.50+0.15(85)=−3.50+12.75=9.25 ($925 in sales)\hat{y} = -3.50 + 0.15(85) = -3.50 + 12.75 = 9.25 \text{ (\$925 in sales)}

Step 5 — Check appropriateness:

  • Residual plot shows no obvious pattern → linear model is appropriate
  • r2=0.911r^2 = 0.911 → strong linear fit
  • No influential points observed in the residual plot

Worked Example 2 — Study Hours and GPA

A sample of 30 college students. xx = weekly study hours, yy = GPA.

LSRL: y^=1.85+0.052x\hat{y} = 1.85 + 0.052x, r=0.68r = 0.68, r2=0.462r^2 = 0.462

One student studies 42 hours/week (most study 5–25 hours) and has a GPA of 3.9.

Analysis:

  1. Slope interpretation: "For each additional hour of weekly studying, GPA is predicted to increase by 0.052 points."

  2. r2r^2 interpretation: "46.2% of the variability in GPA is explained by the linear relationship with weekly study hours."

  3. The 42-hour student:

    • y^=1.85+0.052(42)=4.034\hat{y} = 1.85 + 0.052(42) = 4.034 — predicted GPA is 4.034
    • Residual =3.9−4.034=−0.134= 3.9 - 4.034 = -0.134 — small residual
    • x=42x = 42 is far from xˉ\bar{x} → high leverage
    • But residual is small → likely not influential (on the trend line)
  4. Prediction for 50 hours: y^=1.85+0.052(50)=4.45\hat{y} = 1.85 + 0.052(50) = 4.45

    • This is extrapolation (beyond data range) and the prediction exceeds 4.0 (max GPA) — unreliable!

Common Mistakes on the AP Exam

MistakeCorrection
"Temperature causes sales to increase"Use "is associated with" or "predicts"
"91.1% of the data falls on the line""r2r^2 measures variability explained, not % of points on the line"
Interpreting the intercept literally when x=0x = 0 is outside the data"The intercept has no practical interpretation because x=0x = 0 is outside the range of data"
Forgetting units in slope interpretation"For each additional [unit of x], [y] is predicted to [increase/decrease] by [slope] [units of y]"

Regression Analysis Practice 🎯

Computations 🧮

LSRL: y^=5.2+1.3x\hat{y} = 5.2 + 1.3x, r=0.85r = 0.85

1) Predict yy when x=10x = 10.

2) What is r2r^2? (two decimal places)

3) Observed y=22y = 22 when x=10x = 10. 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 Formula Reference

ConceptFormula
LSRLy^=a+bx\hat{y} = a + bx
Slopeb=r⋅sysxb = r \cdot \dfrac{s_y}{s_x}
Intercepta=yˉ−bxˉa = \bar{y} - b\bar{x}
Correlationr=1n−1∑(xi−xˉsx)(yi−yˉsy)r = \dfrac{1}{n-1}\sum\left(\dfrac{x_i - \bar{x}}{s_x}\right)\left(\dfrac{y_i - \bar{y}}{s_y}\right)
r2r^2r2=1−SSESSTr^2 = 1 - \dfrac{\text{SSE}}{\text{SST}}
Residualei=yi−y^ie_i = y_i - \hat{y}_i

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 x=0x = 0 is in the data range.)

rr: "There is a [strong/moderate/weak], [positive/negative], linear association between [x] and [y]."

r2r^2: "[r2×100r^2 \times 100]% of the variability 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

TopicKey Takeaway
ScatterplotAlways plot data first; describe direction, form, strength, unusual features
LSRLMinimizes ∑ei2\sum e_i^2; passes through (xˉ,yˉ)(\bar{x}, \bar{y}); ∑ei=0\sum e_i = 0
Slope & InterceptSlope = rate of change; intercept = starting value (if meaningful)
Residualse=y−y^e = y - \hat{y}; residual plot checks model appropriateness
rrDirection + strength; −1≤r≤1-1 \leq r \leq 1; only for linear relationships
r2r^2Proportion of variability explained; 0≤r2≤10 \leq r^2 \leq 1
OutliersLarge residual; may or may not be influential
High LeverageExtreme xx-value; potential to influence
InfluentialRemoving changes slope/r2r^2 substantially
ExtrapolationPredicting outside data range — unreliable

Decision Guide

Is the relationship linear?\text{Is the relationship linear?} ↓\downarrow Check scatterplot → Fit LSRL → Check residual plot\text{Check scatterplot → Fit LSRL → Check residual plot} ↓\downarrow Random scatter → Linear model OK\text{Random scatter → Linear model OK} Curved pattern → Nonlinear model needed\text{Curved pattern → Nonlinear model needed} ↓\downarrow Interpret: slope, r,r2 in context\text{Interpret: slope, } r, r^2 \text{ in context} ↓\downarrow Check for unusual points\text{Check for unusual points} ↓\downarrow Make predictions (within data range only)\text{Make predictions (within data range only)}

🔑 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 🧮

Given: xˉ=10\bar{x} = 10, yˉ=25\bar{y} = 25, sx=4s_x = 4, sy=8s_y = 8, r=0.75r = 0.75.

1) Calculate the slope bb.

2) Calculate the intercept aa.

3) What is r2r^2? (two decimal places)

Concept Connections 🔍

Final Exam — Linear Regression ✅