MGU Mathematics Series — Probability and Statistics
Part IV: Regression, Models, and Experimental Analysis
Scatter Plots · Least Squares · Residuals · Inference · Causation
Chapter 11 of 14
MGU Mathematics Series  ·  Probability and Statistics  ·  Library Textbook Edition

Chapter 11:
Linear Regression
and Correlation

Modeling relationships between quantitative variables — scatter plots, correlation, least squares estimation, residual analysis, inference for the slope, and the distinction between association and causation

■ Math Level: Calculus-Based Statistics ■

■ 14 Sections  •  Part IV of 5 ■

Follows Chapter 10: Likelihood, MLE, and Bayesian Foundations  ·  Prepares students for Chapter 12: Multiple Regression and ANOVA

Purpose and Overview

Data rarely comes in isolation. A biologist measuring plant growth wants to know whether sunlight hours predict height. An economist studying income wants to know whether education level predicts earnings. An engineer monitoring a manufacturing process wants to know whether temperature predicts output quality. In each case, the question is the same: how does one quantity relate to another, and how well can we use that relationship to understand or predict?

This chapter develops linear regression — the foundational statistical tool for modeling relationships between two quantitative variables. Linear regression connects the algebraic idea of a line to the statistical idea of uncertainty. When we fit a regression line to data, we are not merely drawing a best-fit line through points. We are building a probability model, making assumptions, estimating parameters, and quantifying how much confidence we should place in our conclusions.

By the end of this chapter, you should be able to construct and interpret a linear regression model, assess whether a linear model is appropriate, perform statistical inference on the slope of a regression line, and communicate what a regression analysis does and does not tell you about real-world relationships.

Opening Question

A researcher believes that the number of hours a student studies each week is related to their exam score. She collects data on 20 students. How should she describe this relationship? How confident can she be that the relationship she observes in her sample reflects something real in the population? And if she finds a relationship, can she conclude that studying more causes better scores? By the end of this chapter, you will be able to answer all three questions rigorously.

14Sections
12Objectives
32Key Terms
10+Worked Examples

Learning Objectives

  1. 1Explain the statistical model for simple linear regression and distinguish it from a deterministic linear equation.
  2. 2Construct and interpret scatter plots; describe direction, form, strength, and outliers in bivariate data.
  3. 3Compute and interpret the Pearson correlation coefficient; explain its properties and limitations.
  4. 4Apply the least squares criterion to derive formulas for the regression slope and intercept.
  5. 5Use calculus to derive least squares estimates by minimizing the residual sum of squares.
  6. 6Interpret the slope and intercept of a fitted regression line in context; use the line for prediction within the observed range.
  7. 7Compute and analyze residuals; construct residual plots; interpret R² as a measure of explained variability.
  8. 8State and check the four regression assumptions; describe consequences of violations.
  9. 9Compute the standard error of the regression and the standard error of the slope.
  10. 10Perform hypothesis tests and construct confidence intervals for the slope.
  11. 11Distinguish confidence intervals for the mean response from prediction intervals for a new observation.
  12. 12Explain why correlation does not imply causation; identify confounders, reverse causation, and spurious associations.

Sections at a Glance

Sections 11.1 – 11.3
Describing Relationships: Models, Plots, and Correlation
Statistical Model · Scatter Plots · Pearson Correlation Coefficient

Modeling Relationships with Lines

When we observe two quantitative variables measured on the same subjects, we often ask whether they are related. The simplest model is a linear one. A deterministic line takes the form y = β₀ + β₁x exactly — but real data never falls perfectly on a line. A statistical model accounts for variability by adding a random error term.

The Simple Linear Regression Model

y = β₀ + β₁x + ε

β₀ = population intercept    β₁ = population slope    ε = random error

The fitted (estimated) regression line uses hat notation: ŷ = β̂₀ + β̂₁x

TermSymbolRoleKnown?
Predictor variablexExplanatory / independent variableObserved
Response variableyOutcome / dependent variableObserved
Population slopeβ₁True rate of change in mean y per unit xUnknown
Population interceptβ₀Mean y when x = 0Unknown
Error termεUnexplained random variation in yUnknown
Deterministic vs. Statistical

A deterministic model says y is exactly determined by x. A statistical model says y is influenced by x but also contains unexplained randomness. Statistics lives in that randomness — in the gap between the line and the data.

Scatter Plots and Association

Before fitting any model, we should look at the data. The scatter plot plots each observation (xi, yi) as a point in the plane, with the predictor on the horizontal axis and the response on the vertical axis.

FeatureWhat to Look ForWhy It Matters
DirectionDoes y increase or decrease as x increases?Determines sign of slope; positive or negative association
FormLinear pattern or curved?A curved pattern means a line is not the right model
StrengthHow tightly do points cluster around the trend?Reflects how well x predicts y
OutliersPoints far from the overall pattern?Outliers can distort the fitted line substantially
Heteroscedasticity

If the spread of points around the trend fans out as x increases — larger variability for larger x — the data are heteroscedastic. Standard regression methods assume constant spread (homoscedasticity). A fan-shaped scatter plot is a warning sign to investigate before proceeding.

Example 11.2.1
Reading a scatter plot
  • ScenarioA researcher plots study hours per week (x) against exam score (y) for 20 students. The plot shows a positive association: students who study more tend to score higher. Points cluster roughly near a line, with noticeable but not extreme spread. No obvious outliers.
  • ConclusionDirection: positive. Form: approximately linear. Strength: moderate to strong. Outliers: none apparent. A linear regression model is a reasonable starting point for these data.
A positive, approximately linear association of moderate-to-strong strength supports proceeding with linear regression.

Correlation

A scatter plot is visual. We also want a numerical summary. The Pearson correlation coefficient r measures the strength and direction of the linear association between x and y.

Pearson Correlation Coefficient
r = (1/(n−1)) · Σ [(xᵢ − x̄)/sₓ] · [(yᵢ − ȳ)/sᵧ]

Equivalent form: r = Σ(xᵢ − x̄)(yᵢ − ȳ) / √[Σ(xᵢ − x̄)² · Σ(yᵢ − ȳ)²]
Value of rInterpretation
r = 1Perfect positive linear relationship; all points on a line with positive slope
r = −1Perfect negative linear relationship; all points on a line with negative slope
r = 0No linear association (a nonlinear relationship may still exist)
|r| > 0.7Strong linear association (context-dependent)
0.3 ≤ |r| ≤ 0.7Moderate linear association
|r| < 0.3Weak linear association
Key Properties of r

−1 ≤ r ≤ 1 always.

r is unit-free: changing measurement units does not change r.

r is symmetric: the correlation of x with y equals the correlation of y with x.

r measures only linear association. A strong curved relationship may have r near zero.

r Measures Linear Association Only

A scatter plot showing a perfect U-shape (quadratic) can have r ≈ 0, because positive and negative products in the formula cancel. Never report r without also examining the scatter plot. A correlation near zero is not evidence that no relationship exists — only that no linear relationship exists.

Example 11.3.1
Computing and interpreting r
  • DataFive (x, y) pairs: (1, 5), (3, 9), (5, 11), (7, 15), (9, 17). We compute x̄ = 5, ȳ = 11.4.
  • NumeratorΣ(xᵢ − x̄)(yᵢ − ȳ) = (−4)(−6.4) + (−2)(−2.4) + (0)(−0.4) + (2)(3.6) + (4)(5.6) = 25.6 + 4.8 + 0 + 7.2 + 22.4 = 60
  • Denominator√[Σ(xᵢ−x̄)²] = √[16+4+0+4+16] = √40 ≈ 6.32 √[Σ(yᵢ−ȳ)²] = √[40.96+5.76+0.16+12.96+31.36] = √91.2 ≈ 9.55 Denominator ≈ 6.32 × 9.55 ≈ 60.36
  • Resultr ≈ 60 / 60.36 ≈ 0.994
r ≈ 0.994 — a very strong positive linear association between x and y.
Sections 11.4 – 11.9
Fitting the Model: Least Squares, Residuals, and Standard Errors
Least Squares · Calculus Derivation · Interpretation · Residuals · Assumptions · Standard Errors

Least Squares Criterion

We have a scatter plot and a correlation. Now we want a line. The method of least squares chooses the line that minimizes the sum of squared vertical distances from the data points to the line.

Residual and Residual Sum of Squares eᵢ = yᵢ − ŷᵢ     (residual for observation i)

RSS = Σ eᵢ² = Σ (yᵢ − β̂₀ − β̂₁xᵢ)²     (minimize this over β̂₀ and β̂₁)
Least Squares Estimates
β̂₁ = Σ(xᵢ − x̄)(yᵢ − ȳ) / Σ(xᵢ − x̄)²     (slope)

β̂₀ = ȳ − β̂₁x̄     (intercept)

Equivalently: β̂₁ = r · (sᵧ / sₓ)
Three Facts to Memorize

(1) The least squares line always passes through the point (x̄, ȳ). (2) The slope equals the correlation times the ratio of standard deviations. (3) The residuals always sum to zero: Σeᵢ = 0.

Example 11.4.1
Computing the least squares line
  • DataStudy hours and exam scores for n = 5 students: (2, 58), (4, 68), (6, 74), (8, 82), (10, 88).
  • Meansx̄ = (2+4+6+8+10)/5 = 6    ȳ = (58+68+74+82+88)/5 = 74
  • NumeratorΣ(xᵢ−x̄)(yᵢ−ȳ) = (−4)(−16)+(−2)(−6)+(0)(0)+(2)(8)+(4)(14) = 64 + 12 + 0 + 16 + 56 = 148
  • DenominatorΣ(xᵢ−x̄)² = 16+4+0+4+16 = 40
  • Slopeβ̂₁ = 148/40 = 3.7
  • Interceptβ̂₀ = 74 − 3.7(6) = 74 − 22.2 = 51.8
Fitted regression line: ŷ = 51.8 + 3.7x

Deriving Least Squares as an Introduction

The least squares formulas are derived by minimizing Q(β₀, β₁) = Σ(yᵢ − β₀ − β₁xᵢ)² using partial derivatives. Setting both partial derivatives equal to zero yields the normal equations, whose solution gives the estimates in Section 11.4.

Normal Equations (derived by setting ∂Q/∂β₀ = 0 and ∂Q/∂β₁ = 0) (1) Σyᵢ = nβ₀ + β₁ · Σxᵢ

(2) Σxᵢyᵢ = β₀ · Σxᵢ + β₁ · Σxᵢ²

Solving (1): β₀ = ȳ − β₁x̄   ⟹  line passes through (x̄, ȳ).

Substituting into (2) and simplifying: β̂₁ = Σ(xᵢ−x̄)(yᵢ−ȳ) / Σ(xᵢ−x̄)²
Connection to Covariance and Variance

The numerator Σ(xᵢ − x̄)(yᵢ − ȳ) is proportional to the sample covariance sxy. The denominator Σ(xᵢ − x̄)² is proportional to the sample variance sx². Therefore β̂₁ = sxy/sx² = r · (sy/sx). This is an elegant link between regression and correlation.

Matrix Notation Preview (for students with Linear Algebra) Model: y = Xβ + ε    where X is the n×2 design matrix with a column of 1s and a column of x values.

Least squares solution: β̂ = (XᵀX)⁻¹Xᵀy

This formula generalizes directly to multiple regression in Chapter 12.

Regression Line Interpretation

Example 11.6.1
Interpreting slope and intercept
  • Lineŷ = 51.8 + 3.7x    (study hours → exam score)
  • Slopeβ̂₁ = 3.7. For each additional hour of study per week, the model predicts an exam score increase of 3.7 points, on average.
  • Interceptβ̂₀ = 51.8. A student who studies zero hours is predicted to score 51.8. Whether this is meaningful depends on whether x = 0 is a realistic value in context.
  • Predictionx = 7: ŷ = 51.8 + 3.7(7) = 51.8 + 25.9 = 77.7
  • Cautionx = 7 is within the observed range (2 to 10 hours), so this prediction is appropriate. Predicting for x = 25 hours would be extrapolation.
Slope = 3.7 points per hour (on average). Intercept = 51.8 (predicted score at zero hours; interpret with caution). Prediction at x = 7: ŷ = 77.7.
Predictions Are Averages, Not Guarantees

The fitted value ŷ is the predicted mean response for all individuals with predictor value x. Any particular individual's actual response will differ from ŷ by the residual e = y − ŷ. The line models the average relationship; individual variation around that average is captured by ε.

Residuals

Residuals eᵢ = yᵢ − ŷᵢ serve two purposes: they measure goodness of fit, and they are the primary tool for checking regression assumptions. The total variability in y decomposes into explained and unexplained parts.

Sum of Squares Decomposition
SST = SSR + RSS

SST = Σ(yᵢ − ȳ)²   (total variability in y)
SSR = Σ(ŷᵢ − ȳ)²   (variability explained by regression)
RSS = Σ(yᵢ − ŷᵢ)²   (unexplained variability — residuals)

R² = SSR/SST = 1 − RSS/SST     (coefficient of determination; 0 ≤ R² ≤ 1)
Example 11.7.1
Computing and interpreting R²
  • GivenFor the study hours data: SST = 500, RSS = 55.2
  • SolveR² = 1 − 55.2/500 = 1 − 0.1104 = 0.8896
  • InterpretThe regression model explains approximately 88.96% of the variability in exam scores. The remaining 11.04% is unexplained variation attributed to other factors and individual differences.
  • ConnectionFor simple linear regression, R² = r². If r = 0.943, then R² = 0.889. ✓
R² ≈ 0.89: the regression explains about 89% of the variability in exam scores.

Reading Residual Plots

Pattern in Residual PlotInterpretationAction
Random scatter around zeroAssumptions appear satisfiedProceed with inference
Curved pattern (arc or wave)Linear model is inadequate; curvature existsConsider nonlinear model or transformation
Fan shape (spread increases)Heteroscedasticity; non-constant varianceConsider variance-stabilizing transformation
One or two extreme pointsPotential outliers or influential observationsInvestigate; check for data errors

Regression Assumptions

For the least squares estimates to support valid inference, four assumptions about the error term εᵢ must hold. Each can be checked diagnostically.

Standard Error of the Regression

The population error variance σ² is unknown and must be estimated from the residuals. The standard error of the regression s estimates the typical distance a data point falls from the fitted line.

Standard Error of the Regression and Slope
s² = RSS / (n − 2)     (unbiased estimate of σ²; divide by n−2, not n)

s = √(RSS / (n−2))     (residual standard error; same units as y)

SE(β̂₁) = s / √[Σ(xᵢ − x̄)²]     (estimated standard error of the slope)
Example 11.9.1
Computing s and SE(β̂₁)
  • Givenn = 5, RSS = 55.2, Σ(xᵢ − x̄)² = 40
  • s²s² = 55.2 / (5 − 2) = 55.2 / 3 = 18.4
  • ss = √18.4 ≈ 4.29 points
  • SE(β̂₁)SE(β̂₁) = 4.29 / √40 = 4.29 / 6.32 ≈ 0.679
s ≈ 4.29 exam score points (typical prediction error). SE(β̂₁) ≈ 0.679.
What Increases Precision?

SE(β̂₁) decreases — giving a more precise slope estimate — when: (1) residual variance s² is smaller (better model fit), (2) the x values are spread over a wider range (larger Σ(xᵢ − x̄)²), or (3) the sample size n is larger. Wider x range and larger n are design choices with direct payoff in estimation quality.

Sections 11.10 – 11.14
Inference, Causation, and the Road Ahead
Hypothesis Tests · Confidence Intervals · Prediction · Causation · Common Mistakes · Preview

Inference for the Slope

Under the regression assumptions, the slope estimate β̂₁ follows a t-distribution centered at the true slope β₁. This sampling distribution is the foundation for hypothesis tests and confidence intervals.

t-Distribution for the Slope
(β̂₁ − β₁) / SE(β̂₁) ~ t_{n−2}

Test statistic:   t = β̂₁ / SE(β̂₁)   (for H₀: β₁ = 0)

Confidence interval:   β̂₁ ± t*_{n−2} · SE(β̂₁)
Example 11.10.1
Testing H₀: β₁ = 0
  • HypothesesH₀: β₁ = 0 (no linear association).   Hₐ: β₁ ≠ 0 (a linear association exists).
  • Givenβ̂₁ = 3.7, SE(β̂₁) = 0.679, n = 5, so df = n − 2 = 3.
  • Test Statt = 3.7 / 0.679 ≈ 5.45
  • p-valueWith df = 3, |t| = 5.45 yields p ≈ 0.012. At α = 0.05, we reject H₀.
  • ConclusionThere is statistically significant evidence that study hours are positively linearly associated with exam scores in the population.
t ≈ 5.45, p ≈ 0.012. Reject H₀ at α = 0.05. Evidence supports a linear association.
Example 11.10.2
Confidence interval for β₁
  • Givenβ̂₁ = 3.7, SE(β̂₁) = 0.679, t*₃ ≈ 3.182 (for 95%).
  • Solve3.7 ± 3.182 × 0.679 = 3.7 ± 2.16 = (1.54, 5.86)
  • InterpretWe are 95% confident that the population slope β₁ lies between 1.54 and 5.86 points per study hour. The interval does not contain zero, consistent with rejecting H₀.
95% CI for β₁: (1.54, 5.86). The interval excludes zero, confirming a significant positive association.

Confidence and Prediction Intervals as an Introduction

At a new value x*, two different questions produce two different intervals. The distinction is one of the most important ideas in regression.

QuestionInterval TypeWidthSources of Uncertainty
What is the mean response for all individuals with x = x*?Confidence interval for mean responseNarrowerUncertainty in β̂₀ and β̂₁ only
What will one new individual's response be at x = x*?Prediction intervalWiderUncertainty in regression line + individual variability (σ²)
Formulas at x*
Confidence interval (mean): ŷ* ± t*_{n−2} · s · √(1/n + (x*−x̄)²/Σ(xᵢ−x̄)²)

Prediction interval (new obs.): ŷ* ± t*_{n−2} · s · √(1 + 1/n + (x*−x̄)²/Σ(xᵢ−x̄)²)

Both intervals are widest when x* is far from x̄. The extra "1" under the radical makes prediction intervals always wider.
Example 11.11.1
Computing confidence and prediction intervals at x* = 7
  • Givenŷ* = 77.7, n = 5, x̄ = 6, Σ(xᵢ−x̄)² = 40, s = 4.29, t*₃ = 3.182.
  • CI (mean)77.7 ± 3.182 × 4.29 × √(1/5 + 1/40) = 77.7 ± 3.182 × 4.29 × 0.474 ≈ 77.7 ± 6.5 → (71.2, 84.2)
  • PI (new)77.7 ± 3.182 × 4.29 × √(1 + 1/5 + 1/40) = 77.7 ± 3.182 × 4.29 × 1.107 ≈ 77.7 ± 15.1 → (62.6, 92.8)
  • CompareThe prediction interval (width ≈ 30 points) is far wider than the confidence interval (width ≈ 13 points), reflecting the additional uncertainty of predicting a single individual.
95% CI for mean score at x = 7: (71.2, 84.2). 95% PI for one student: (62.6, 92.8).

Correlation Is Not Causation

This is one of the most important principles in all of statistics. A significant regression or a large correlation coefficient does not imply that x causes y. Several mechanisms produce association without causation.

MechanismDescriptionExample
Confounding variableA third variable z is associated with both x and y, inducing a spurious association between them.Cities with more firefighters have larger fires — city size confounds both.
Reverse causationy causes x, not x causes y (or they cause each other).Depression and low self-esteem are correlated; the causal direction is unclear.
Spurious correlationTwo unrelated variables happen to be correlated by chance in a particular data set.Mozzarella consumption correlates with civil engineering doctorates awarded.
Selection biasData collection induces a correlation not present in the underlying population.Studying only hospitalized patients can reverse true population associations.
What Causation Requires

The gold standard for causal inference is a randomized controlled experiment. Random assignment breaks the link between x and confounders, so differences in y between groups can be attributed to x. When experiments are infeasible, observational studies use careful design and statistical adjustment — but these approaches rest on assumptions that data alone cannot verify.

Regression as description: A fitted line describes an association in the data and may be useful for prediction. It does not, by itself, explain why the association exists or what would happen if we intervened on x.

Common Regression Mistakes

Mistake 1 — Ignoring the scatter plot
Fitting a line without examining the data first

A curved relationship, outlier, or cluster structure can make the fitted line meaningless. Always plot before fitting. The scatter plot is not optional.

Mistake 2 — Extrapolation
Predicting ŷ for x far outside the observed range

A linear model fit to crop yield vs. fertilizer cannot predict negative yields. Most relationships change character outside the observed range. Confine predictions to the range of the data or explicitly state the extrapolation assumption.

Mistake 3 — Misreading R²
"R² = 0.92, so the linear model is clearly correct."

A high R² means the model accounts for much variance in the sample — not that the model is correct. A curved relationship can produce high R² over a restricted range while violating linearity. Always examine the residual plot alongside R².

Mistake 4 — Confusing non-significance with no relationship
"p = 0.23 > 0.05, so there is no relationship between x and y."

A non-significant result means the data are consistent with β₁ = 0, not that β₁ is zero. The test may lack power due to small n. Report the estimate and confidence interval, not just the p-value.

Mistake 5 — Assuming causation from regression
"More education causes higher income because β̂₁ = 3.2 with p < 0.01."

A significant regression describes an association. Causation requires experimental evidence or explicit causal assumptions. Use associative language: "is associated with," not "causes."

Mistake 6 — Ignoring influential observations
Fitting a line without checking for high-leverage or high-residual points

A single observation with an extreme x-value (high leverage) can substantially change the slope. Examine residual plots and leverage statistics. Investigate unusual points before reporting results.

Mistake 7 — Confusing the two regression lines
Using the regression of x on y to predict y from x

The regression of y on x minimizes vertical residuals; the regression of x on y minimizes horizontal residuals. They give different lines. Use the regression of y on x when predicting y, and be explicit about which variable is the response.

Mistake 8 — Statistical vs. practical significance
"p < 0.01 means this predictor is practically important."

With large n, even tiny slopes produce small p-values. A statistically significant slope may correspond to a trivially small effect. Always interpret the magnitude of β̂₁ in context alongside the p-value.

Preparing for Multiple Regression and ANOVA

Chapter 11 developed simple linear regression with one predictor. Chapter 12 extends the framework in two important directions. Everything built in this chapter carries forward directly.

Multiple regression adds more predictors: y = β₀ + β₁x₁ + β₂x₂ + ⋯ + βpxp + ε. The least squares criterion is the same; the solution requires matrix algebra (β̂ = (XᵀX)⁻¹Xᵀy). Crucially, the interpretation of each slope coefficient changes: β̂j is the predicted change in y per unit increase in xj holding all other predictors fixed. This adjusted interpretation is how regression partially controls for confounders in observational data.

Analysis of Variance (ANOVA) compares means across groups. One-way ANOVA with k groups is equivalent to a multiple regression with k − 1 indicator (dummy) variables. The F-test in ANOVA is the same F-test as in regression. Both are unified under the general linear model.

What to Carry Forward

The four regression assumptions carry over unchanged. The decomposition SST = SSR + RSS generalizes; the F-test is built on the same sums of squares. Residual analysis remains the primary diagnostic tool. And the principle that correlation does not imply causation applies with equal force in multiple regression — adding variables does not confer causation.

The move from one predictor to many is a move toward greater realism. Real data involve complex, overlapping influences. Chapter 12 is the tool that begins to address that complexity.

Chapter Summary

Key Terms Review

simple linear regression
A statistical model y = β₀ + β₁x + ε describing a linear relationship between one predictor and one response variable.
predictor variable (x)
The explanatory or independent variable; placed on the horizontal axis of a scatter plot.
response variable (y)
The outcome or dependent variable; placed on the vertical axis of a scatter plot.
correlation coefficient (r)
The Pearson r: a unit-free measure of linear association strength and direction; −1 ≤ r ≤ 1.
least squares criterion
The principle of choosing the regression line to minimize the sum of squared residuals (RSS).
fitted value (ŷᵢ)
The value β̂₀ + β̂₁xᵢ predicted by the regression line at xᵢ.
residual (eᵢ)
The difference eᵢ = yᵢ − ŷᵢ between an observed value and its fitted value.
normal equations
The two linear equations obtained by setting ∂RSS/∂β₀ = 0 and ∂RSS/∂β₁ = 0; their solution gives the OLS estimates.
R² (coefficient of determination)
SSR/SST; the proportion of variability in y explained by the regression. For simple regression, R² = r².
residual plot
A scatter plot of residuals against fitted values (or x); used to check the regression assumptions.
homoscedasticity
The assumption that all errors have the same variance: Var(εᵢ) = σ² for all i.
heteroscedasticity
A violation of constant variance; spread of residuals changes with x or ŷ.
standard error of regression (s)
√(RSS/(n−2)); estimates σ, the standard deviation of errors; measured in units of y.
SE(β̂₁)
s/√Σ(xᵢ−x̄)²; estimated standard error of the slope; measures precision of the slope estimate.
confidence interval (mean response)
An interval at x* capturing where the population mean response E[y|x*] lies, with stated probability.
prediction interval
An interval at x* capturing where a single new observation y* will fall; always wider than the CI for mean response.
extrapolation
Using the fitted line to predict y at x-values outside the observed range; assumes the linear relationship extends.
confounding variable
A third variable associated with both x and y that can produce a spurious association between them.
high-leverage point
An observation with an x-value far from x̄ that has the potential to strongly influence the fitted line.
OLS (ordinary least squares)
The standard estimation method that minimizes the sum of squared residuals.

Scatter Plot Practice

  1. Describe in words what the scatter plot would look like if two variables had (a) a strong positive linear association; (b) a weak negative linear association; (c) a moderate positive association with one clear outlier; (d) no linear association but a clear curved relationship.
  2. For each scenario, identify which variable you would place on the horizontal axis and which on the vertical axis, and explain your reasoning. (a) Studying whether advertising spending predicts sales revenue. (b) Studying whether birth weight is associated with gestational age. (c) Studying whether altitude is associated with average temperature.
  3. A researcher plots mean temperature (horizontal) against annual ice cream consumption per capita (vertical) across 30 countries and finds a positive, moderate association. (a) Describe the association. (b) Should the researcher conclude warmer temperatures cause more ice cream consumption? Explain. (c) Name one plausible confounding variable.
  4. A scatter plot of hours of sleep and reaction time shows a negative association with moderate spread. (a) What direction of association does this suggest? Interpret in context. (b) What additional features of the scatter plot would you examine before fitting a linear model?

Correlation Practice

  1. Compute the correlation coefficient for the data: (1, 5), (3, 9), (5, 11), (7, 15), (9, 17). Show all steps.
  2. For each value of r, describe the strength and direction of the association: (a) r = 0.95; (b) r = −0.42; (c) r = 0.08; (d) r = −0.87.
  3. Two variables have r = 0.70. (a) What is R² for the regression of y on x? (b) If the units of x are changed from inches to centimeters (multiplied by 2.54), what happens to r? (c) If y is replaced by y' = 2y + 10, what happens to r?
  4. Summary statistics: x̄ = 20, ȳ = 50, sₓ = 4, sᵧ = 10, sₓᵧ = 28 (where sₓᵧ is the sample covariance). (a) Compute r. (b) Compute β̂₁. (c) Compute β̂₀.
  5. A scatter plot shows a clear U-shaped relationship between x and y. Explain why r might be close to zero even though an obvious relationship exists in the data.

Least Squares Practice

Problem LS-1Computing the Regression Line

Use the following data for all parts.

xy
210
414
620
822
1028
  1. Compute x̄, ȳ, Σ(xᵢ−x̄)(yᵢ−ȳ), and Σ(xᵢ−x̄)².
  2. Compute β̂₁ and β̂₀. Write the equation of the fitted regression line.
  3. Predict y when x = 7. Is this a legitimate prediction? Explain.
  4. A student claims: "The regression line always passes through the origin if the data is centered." Is this correct? Under what condition does the line pass through the origin?
Problem LS-2Summary Statistics Given

For a data set with n = 12: x̄ = 8, ȳ = 35, Σ(xᵢ−x̄)² = 180, Σ(xᵢ−x̄)(yᵢ−ȳ) = −270.

  1. Compute β̂₁ and β̂₀.
  2. Interpret the slope in context, given that x is weekly screen time (hours) and y is a reading proficiency score.
  3. What does the sign of β̂₁ indicate about the direction of the association?

Residual Analysis

  1. For the data in Problem LS-1: compute fitted values ŷᵢ and residuals eᵢ. Verify Σeᵢ = 0. Compute RSS, s², and s.
  2. A residual plot for a regression of car price (y) on age (x) shows a fan-shaped pattern — small spread for low ŷ, large spread for high ŷ. (a) Which regression assumption does this violate? (b) What might a researcher do to address it?
  3. A residual plot shows a curved arc (positive residuals at low ŷ, negative in the middle, positive at high ŷ). (a) What does this indicate? (b) Does a high R² necessarily mean a linear model is appropriate here?
  4. True or False. Justify each answer. (a) A residual plot with random scatter confirms the model is correct. (b) Residuals always sum to zero. (c) A large residual always means an influential observation. (d) A residual of zero means the model fits that observation perfectly.

Inference Problems

  1. A regression of exam score on study hours (n = 25) gives β̂₁ = 4.5, SE(β̂₁) = 1.8. (a) Compute the t-statistic for H₀: β₁ = 0. (b) State the degrees of freedom. (c) Do you expect the p-value to be significant at α = 0.05? Explain. (d) Construct a 95% CI using t*₂₃ ≈ 2.069.
  2. A researcher reports: β̂₁ = 1.2 mmHg/year with 95% CI (0.8, 1.6) for a regression of blood pressure on age. (a) Interpret the CI in context. (b) Does this provide evidence of a positive association? (c) Without computing, what can you conclude from the CI about the test of H₀: β₁ = 0?
  3. For n = 18, β̂₁ = −2.3, s = 5.6, Σ(xᵢ−x̄)² = 320: (a) Compute SE(β̂₁). (b) Construct a 90% CI using t*₁₆ ≈ 1.746. (c) Interpret in context with x = temperature (°C) and y = number of defective units.
  4. A 95% CI for the slope is (−3.5, 0.4). (a) Can we reject H₀: β₁ = 0 at α = 0.05? Explain. (b) Can we reject at α = 0.10? What additional information would you need?
  5. Explain in your own words the difference between a confidence interval for the mean response and a prediction interval for a new observation. Give a practical example where each is more appropriate.

Applications

  1. (Biology) A biologist measures length (x, cm) and weight (y, g) of n = 30 fish. The regression line is ŷ = −22.4 + 5.8x, with R² = 0.88 and s = 8.3 g. (a) Interpret the slope. (b) Interpret R². (c) Predict weight for a fish of length 18 cm. (d) Should we predict for a fish of length 55 cm? Why or why not?
  2. (Economics) An economist regresses income (y, thousands of dollars) on education (x, years) for n = 150 adults: β̂₀ = 12.4, β̂₁ = 3.2, SE(β̂₁) = 0.7, R² = 0.41. (a) Interpret the slope. (b) Test H₀: β₁ = 0 at α = 0.01. (c) Evaluate the claim: "More education causes higher income."
  3. (Engineering) A quality engineer studies curing temperature (x, °C) and tensile strength (y, MPa) for n = 20 specimens: β̂₁ = 0.45, RSS = 120, Σ(xᵢ−x̄)² = 500. (a) Compute s and SE(β̂₁). (b) Construct a 95% CI using t*₁₈ ≈ 2.101. (c) The engineer says temperature "explains" tensile strength. Critique this statement.
  4. (Finance) An analyst regresses monthly stock returns (y, %) on market index returns (x, %) for n = 60 months (the market model; the slope is the stock's beta). (a) If β̂₁ = 1.4, interpret this value. What does it suggest about how the stock moves relative to the market? (b) If β̂₁ = 0.6, what would that suggest? (c) If r = 0.55, what percentage of the stock's return variability is explained by the market?
  5. (Public Health) A researcher regresses life expectancy (y, years) on per capita GDP (x, thousands of dollars) across 50 countries. The scatter plot shows a positive association with noticeable curvature: steep for low GDP, flattening for high GDP. (a) Why might a linear model be inadequate? (b) What transformation of x might linearize the relationship? (c) If the researcher fits a linear model anyway, what would the residual plot likely reveal?

Error Analysis

Each problem shows a student's error. Identify it and write the correct statement or calculation.

Problem EA-1
"r = 0.85, so 85% of the data is explained by the linear model."

Identify and correct the error. What quantity equals 85% in this context, and what is R²?

Problem EA-2
"p = 0.23 > 0.05, so we have proven there is no relationship between x and y."

What is wrong with this conclusion? What does a non-significant result actually tell us?

Problem EA-3
"R² = 0.92, so the linear model is clearly the correct model for these data."

Explain the flaw. Construct a scenario where a high R² accompanies a clearly inappropriate linear model.

Problem EA-4
"The intercept is 51.8, which proves students who don't study can still pass with a score above 50."

What is wrong with interpreting the intercept this way? When can an intercept be interpreted literally?

Problem EA-5
A researcher computes the regression of y on x and then the regression of x on y, and is surprised the two lines differ. She concludes that she computed one incorrectly.

(a) Explain why the two regression lines are not the same. (b) Under what condition would the two lines coincide? (c) Which regression should be used to predict y from x?

Problem EA-6
"p < 0.01 for the slope, so this predictor is practically important and we should act on it."

Critique this reasoning. What else must be considered beyond the p-value when judging practical importance?

Chapter 11 Checkpoint

Chapter 11 Checkpoint
Complete without assistance — assesses all key skills and concepts from Chapter 11
Section 1 — Fundamentals
  1. Explain the difference between a deterministic line y = β₀ + β₁x and the statistical model y = β₀ + β₁x + ε. Why is the error term ε necessary?
  2. State the four regression assumptions. For each, describe one diagnostic check.
  3. Why is the Pearson correlation coefficient not sufficient on its own to assess the appropriateness of a linear model?
Section 2 — Computation

Use the following data for problems 4–9: daily high temperature (x, °F) and ice cream stand customers (y) for 8 days. Summaries: x̄ = 79.75, ȳ = 112.75, Σ(xᵢ−x̄)(yᵢ−ȳ) = 2138.5, Σ(xᵢ−x̄)² = 378, RSS = 248.6.

DayTemp (x)Customers (y)
17285
278102
385130
46874
590155
67595
782119
888142
  1. Compute β̂₁ and β̂₀. Write the regression equation.
  2. Interpret the slope in the context of this problem.
  3. Compute the fitted value and residual for Day 3 (x = 85, y = 130).
  4. Compute s and SE(β̂₁).
  5. Test H₀: β₁ = 0 against Hₐ: β₁ > 0 at α = 0.05. State your hypotheses, test statistic, degrees of freedom, and conclusion.
  6. Predict the number of customers on a day when the high temperature is 80°F. Would you also predict for a 120°F day? Explain.
Section 3 — Interpretation and Reasoning
  1. The stand owner says: "High temperatures cause more customers to come." Evaluate this causal claim rigorously. Name at least one alternative explanation.
  2. A separate regression of laptop price (y) on age (x) for n = 40 gives: β̂₁ = −95.4, β̂₀ = 1240, R² = 0.74, s = 115, SE(β̂₁) = 14.3. Compute the t-statistic for H₀: β₁ = 0. Using t*₃₈ ≈ 2.024, construct a 95% CI for β₁ and interpret it.
  3. Explain in your own words (in approximately 100 words) why prediction intervals are always wider than confidence intervals for the mean response at the same value of x*.
Section 4 — Error Analysis
  1. A psychology researcher reports r = 0.55, p < 0.01 between social media use and anxiety, and concludes that social media increases anxiety. Write a brief critique of this conclusion. Address: the distinction between association and causation, at least one plausible alternative explanation, and what type of study would be needed to support the causal claim.
  2. A regression analysis produces a residual plot showing a curved pattern (arc), with R² = 0.89. A student concludes: "The model is excellent — R² is very high." Identify the error and explain what the residual plot actually indicates.
Looking Ahead
Chapter 12: Multiple Regression and Analysis of Variance

Chapter 11 gave you the foundational tools for modeling a relationship between two quantitative variables. Chapter 12 extends the framework in two directions. Multiple regression adds more predictors simultaneously — each slope coefficient is interpreted holding the others fixed, which is how regression begins to control for confounders. Analysis of Variance (ANOVA) addresses group comparisons — testing whether the mean response differs across several groups using the same F-test structure you saw here. Both are faces of the general linear model, unified by least squares, the normal equations, the SST = SSR + RSS decomposition, residual analysis, and the assumption framework of Chapter 11. Everything you have learned here carries forward directly.

MGU Library Connection
  • Regression and ANOVA Reference — Appendix P of this textbook
  • Linear Algebra Readiness Review — Appendix C of this textbook (for matrix regression)
  • Estimation and Confidence Interval Reference — Appendix M of this textbook
  • Hypothesis Testing Reference — Appendix N of this textbook
  • Linear Algebra, Chapter 4: Matrix Multiplication and Systems of Equations
  • MGU Dictionary entries: regression, correlation, residual, least squares, R², confounding, causation