Loading
Quantifying the linear relationship between two variables to make predictions grounded in data.
The desire to fit a straight line to data is far older than the discipline of statistics itself. In the late eighteenth century, astronomers faced the practical challenge of combining multiple, slightly discrepant measurements of planetary orbits into a single best estimate. The method of least squares emerged from this need, providing a principled criterion for choosing one line over infinitely many alternatives. Over the next two centuries, the technique was refined into the modern linear regression model — arguably the most widely used statistical tool in science, economics, medicine, and public policy.
The central question that drove all of this work remains the same today: given a cloud of data points in two dimensions, how do we find the single straight line that best summarizes the relationship between the explanatory variable x and the response variable y? And once we have that line, how confidently can we use it to predict new outcomes or infer the nature of the underlying process?
A linear regression model rests on a small number of foundational ideas. Before diving into formulas, you should internalize the conceptual framework: what the model assumes, what quantities it estimates, and what yardstick it uses to judge a good fit. The four concepts below form the backbone of every regression analysis you will encounter on the AP Statistics exam.
A scatterplot with the regression line overlaid is the single most important visual in any regression analysis. It allows you to assess the direction and strength of the relationship at a glance, spot potential outliers, and detect non-linear patterns that might violate the model's assumptions. The diagram below illustrates a dataset with a moderately strong positive linear association together with the LSRL and several key features referenced throughout this lesson.
Notice that the regression line passes through the point (x̄, ȳ). This is not a coincidence — it is a mathematical consequence of the least-squares derivation. When you interpret a scatterplot on the AP exam, start by noting three things: the direction (positive or negative slope), the form (linear, curved, or clustered), and the strength (how tightly the points hug the line). These three descriptors — direction, form, and strength — are the language of scatterplot interpretation expected in free-response questions.
The formulas below define the LSRL and its key summary statistics. You are expected to interpret these quantities on the AP exam; while calculator output typically provides the numerical values, understanding where they come from gives you the reasoning power needed for free-response explanations.
Fitting a line is only half the story. The other half is checking whether a linear model is appropriate. The primary diagnostic tool is the residual plot — a scatterplot of residuals (y − ŷ) on the vertical axis against the explanatory variable x (or the predicted values ŷ) on the horizontal axis. If the linear model is a good fit, the residual plot should show a random scatter with no obvious pattern. Systematic curvature, fanning, or clusters indicate that the linear model is inadequate and a different model form or transformation should be considered.
On the AP exam, you will often be asked to determine whether a linear model is appropriate based on a residual plot. The decision rule is straightforward: if the residual plot exhibits no discernible pattern and the residuals are roughly symmetric about the horizontal zero line, a linear model is reasonable. Any systematic curvature, clustering, or change in spread suggests the model needs revision. Additionally, pay attention to influential points — observations with unusually large leverage (extreme x-values) or large residuals (outliers in the y-direction). A point is influential if removing it substantially changes the slope or intercept of the regression line.
A researcher collects data on the number of hours studied (x) and exam scores (y) for 8 students. The summary statistics are: x̄ = 5.0, ȳ = 74.0, sx = 2.0, sy = 8.0, and r = 0.85. Find the equation of the LSRL, interpret the slope and r² in context, and predict the exam score for a student who studies 7 hours.
On the AP exam, clear and precise interpretation of regression output earns or loses you credit on free-response questions. The table below summarizes correct versus incorrect interpretive language for the most frequently tested quantities. Memorizing these templates will help you write concise, rubric-aligned responses under time pressure.
| Quantity | Correct Interpretation Template | Common Error |
|---|---|---|
| Slope (b) | For each additional [unit of x], the predicted [y] increases/decreases by [b] [units of y], on average. | Omitting 'predicted' or 'on average,' implying causation, or forgetting context (variable names and units). |
| Intercept (a) | When [x] = 0, the predicted [y] is [a]. (Add: 'This may not have practical meaning if x = 0 is outside the data range.') | Interpreting the intercept as meaningful when x = 0 is nonsensical (e.g., 0 hours of sunlight). |
| r² | Approximately [r² × 100]% of the variability in [y] is explained by the linear relationship with [x]. | Saying 'r² percent of [y] is caused by [x]' or confusing r² with r. |
| r (correlation) | There is a [strong/moderate/weak], [positive/negative], linear association between [x] and [y]. | Using 'relationship' instead of 'linear association,' implying causation, or describing a non-linear pattern as strong because |r| is large. |
| Residual | The actual [y] was [residual value] [units] above/below the value predicted by the model. | Confusing the sign: positive residual means the observed y is above the predicted value, not below. |
Everything covered so far falls under descriptive regression — summarizing a dataset. The AP Statistics curriculum also includes inference for regression, which asks whether the observed linear association in a sample provides convincing evidence of a true linear relationship in the population. This inferential step involves hypothesis tests and confidence intervals for the population slope β, and it requires additional conditions beyond what we have discussed.
| Feature | Descriptive Regression (This Lesson) | Inference for Regression (Later Unit) |
|---|---|---|
| Goal | Summarize the relationship in the observed data | Determine whether the relationship exists in the population |
| Key Statistic | b (sample slope), r, r² | t = b / SE(b), with df = n − 2 |
| Conditions | Linearity (check residual plot) | Linearity, independence, normality of residuals, equal variance (LINE) |
| Output | Equation: ŷ = a + bx; r² | p-value, confidence interval for β |
| Hypothesis | Not applicable | H₀: β = 0 (no linear relationship) vs. Hₐ: β ≠ 0 |
The bridge between the two topics is the acronym LINE: Linearity, Independence, Normality of residuals, and Equal variance (homoscedasticity). In descriptive regression, you focus primarily on the L; in inferential regression, all four conditions must be verified. Mastering residual analysis now will pay dividends when you encounter t-tests and confidence intervals for the slope later in the course.
A linear regression model summarizes the relationship between an explanatory variable x and a response variable y using the equation ŷ = a + bx, where the slope b equals r × (s_y / s_x) and the intercept a equals ȳ − b × x̄. The line always passes through the point (x̄, ȳ) and is chosen to minimize the sum of squared residuals, where each residual is y − ŷ.
The coefficient of determination r² measures the fraction of variability in y explained by the linear model. Always check a residual plot for random scatter before trusting the model — a high r² alone is not sufficient. Avoid extrapolation (predicting beyond the observed data range) and never infer causation from observational regression. Interpret every statistic — slope, intercept, r², and residuals — in the context of the data using the variable names and units.
Keep learning with more lessons from the same subject.