AP Statistics • Inference for Quantitative Data: Slopes

Confidence Intervals for the Slope of a Regression Model

Quantify the uncertainty in a linear relationship by constructing an interval estimate for the true population slope.

A scatter plot with data columns and a percentage symbol.
Inside this lesson 9 sections 5 questions 9 figures

SECTION 1

Historical Context & Motivation

When we fit a least-squares regression line to sample data, the resulting slope b₁ is a point estimate—a single number drawn from one particular sample. A different sample from the same population would almost certainly produce a different slope. The fundamental question that motivated generations of statisticians is: how precisely does our sample slope estimate the true population parameter β₁? Confidence intervals answer that question by wrapping b₁ in a range of plausible values, accompanied by a stated level of confidence.

1805 • Legendre's Method of Least Squares

Adrien-Marie Legendre published the first formal description of the least-squares criterion, giving researchers a systematic way to fit lines to data.

1908 • Student's t-Distribution

William Sealy Gosset, writing under the pseudonym 'Student,' derived the t-distribution for inference with small samples—the same distribution used in slope inference today.

1922 • Fisher's Maximum Likelihood Framework

R. A. Fisher formalized estimation theory and showed that least-squares estimators have desirable statistical properties under normal error assumptions.

1934 • Neyman's Confidence Interval Theory

Jerzy Neyman introduced the modern confidence interval, defining it as a procedure whose long-run coverage rate equals the stated confidence level.

These developments converge in a single question that pervades modern regression analysis: given a sample regression slope, what range of values for the true population slope β₁ is consistent with the observed data at a specified confidence level? This lesson develops the full machinery for answering that question on the AP Statistics exam.

SECTION 2

Core Principles & Definitions

Constructing a confidence interval for the slope rests on a clearly defined population model, a set of conditions that validate the procedure, and an understanding of sampling variability. Before diving into formulas, it is essential to internalize the conceptual building blocks.

1

Population Regression Model

We assume the true relationship is y = β₀ + β₁x + ε, where β₁ is the fixed but unknown slope and ε represents random deviations from the line.
2

Sampling Distribution of b₁

If conditions are met, b₁ follows an approximately normal distribution centered at β₁ with standard error SE(b₁). Different samples yield different b₁ values.
3

Standard Error of the Slope

SE(b₁) = s / √(Σ(xᵢ − x̄)²), where s is the residual standard deviation. This measures how much b₁ varies from sample to sample.
4

The t-Distribution

Because we estimate σ with s, the standardized slope follows a t-distribution with df = n − 2, which has heavier tails than the normal for small n.
5

Confidence Level Interpretation

A 95% confidence interval means that if we repeated the sampling process many times, about 95% of the resulting intervals would capture the true β₁.

SECTION 3

Visual Explanation

The diagram below illustrates the core idea: a sample regression line with its point-estimate slope sits inside a confidence band that fans outward from the center of the data. The band captures all lines whose slopes fall within the confidence interval for β₁.

x (explanatory variable)y (response variable)Regression Line with Confidence Band for Slopeupper bound slopelower bound slopeŷ = b₀ + b₁x
The solid cyan line is the least-squares regression line with slope b₁. The dashed lines represent the steepest and shallowest slopes consistent with the confidence interval. The shaded confidence band encloses all such plausible lines. Notice that the band is narrowest near x̄ and widens at extreme x-values.

Each point on the scatterplot represents a paired observation (xᵢ, yᵢ). The regression line summarizes the linear trend, and the confidence band captures the uncertainty associated with that summary. A narrower band signals a more precise estimate of β₁, which results from larger sample sizes, less scatter in the residuals, or greater spread in the x-values.

SECTION 4

Mathematical Framework

The confidence interval for the slope of a regression model has the same general form as any t-interval: point estimate ± (critical value)(standard error). Below are the key equations, each with full variable definitions.

POPULATION REGRESSION MODEL

y=β0+β1x+ε,whereε N(0,σ)y = β₀ + β₁x + ε, where ε ~ N(0, σ)

β₀ = population y-intercept; β₁ = population slope (the parameter we want to estimate); ε = random error term, assumed independently and normally distributed with mean 0 and constant standard deviation σ.

CONFIDENCE INTERVAL FOR β₁

b1±t∗×SE(b1)b₁ ± t* × SE(b₁)

b₁ = sample slope from least-squares regression; t* = critical value from the t-distribution with df = n − 2 for the desired confidence level; SE(b₁) = standard error of the slope.

STANDARD ERROR OF THE SLOPE

SE(b1)=s/√(Σ(xi−xˉ)2)SE(b₁) = s / √(Σ(xᵢ − x̄)²)

s = √(Σeᵢ² / (n − 2)) is the residual standard deviation (also called the standard error of the regression); Σ(xᵢ − x̄)² measures the total spread of the x-values around their mean. Greater spread in x reduces SE(b₁).

DEGREES OF FREEDOM

df=n−2df = n − 2

We lose 2 degrees of freedom because two parameters (β₀ and β₁) are estimated from the data. On the AP exam, computer output provides SE(b₁) directly, so the primary task is reading the output, identifying df, and looking up t*.

ℹ
AP Exam Tip

SECTION 5

Conditions for Inference (LINE)

Before constructing a confidence interval for β₁, four conditions must be checked. The AP exam uses the acronym LINE to organize them. Each condition corresponds to an assumption about the error term ε in the population model. Violations of these conditions can invalidate the interval, so thorough checking is essential for full credit on free-response questions.

LINE Conditions for Regression InferenceLLinear RelationshipThe true relationship between x and yis linear. Check: scatterplot of data orresidual plot shows no curved pattern.✓ random scatterIIndependenceIndividual observations are independent.Check: data collected via randomsampling or experiment. If samplingw/o replacement, n < 10% of population.n < 0.10 × NNNormal ResidualsFor any given x, the responses y areapproximately normally distributed.Check: histogram or normal probabilityplot of residuals shows no strongskewness or outliers.EEqual VarianceThe standard deviation of y is the samefor all values of x (homoscedasticity).Check: residual plot shows roughlyconstant vertical spread across x—nomegaphone or fan shape.
The four LINE conditions: Linear relationship, Independence, Normal residuals, and Equal variance. Each card lists what to check and how to check it using residual plots or context.

On free-response questions, you should explicitly state each condition and describe what evidence supports it. For Linearity and Equal Variance, reference the residual plot (e.g., "The residual plot shows no obvious pattern and roughly constant spread"). For Independence, reference the study design (random sampling or randomized experiment) and, if sampling without replacement, verify the 10% condition. For Normality, reference a histogram or normal probability plot of residuals, or note that the sample size is large enough for the Central Limit Theorem to compensate for mild non-normality.

SECTION 6

Worked Example

A researcher randomly selects 22 college students and records the number of hours each student studies per week (x) and their GPA (y). A computer regression analysis produces the following output:

PredictorCoefSE Coeftp
Constant1.56000.21807.160.000
Hours0.08200.01505.470.000

s = 0.3210, R-Sq = 59.9%, n = 22

Construct a 95% confidence interval for the true slope of the regression line relating study hours to GPA.

Worked example

  1. 1

    Step 1 — Identify the Parameter

    We wish to estimate β₁, the true slope of the population regression line that relates weekly study hours (x) to GPA (y) for all college students in the population.
  2. 2

    Step 2 — Check Conditions (LINE)

    L: Assume the residual plot shows no curved pattern, supporting linearity. I: Students were randomly selected, and 22 is plausibly less than 10% of all college students. N: Assume the histogram of residuals shows no strong skewness or outliers. E: Assume the residual plot shows roughly constant vertical spread across x-values. All conditions are met.
  3. 3

    Step 3 — Read Output Values

    From the regression output: b₁ = 0.0820 and SE(b₁) = 0.0150.
    b₁ = 0.0820, SE(b₁) = 0.0150
  4. 4

    Step 4 — Find t* and Degrees of Freedom

    df = n − 2 = 22 − 2 = 20. For a 95% confidence interval, the critical value from the t-table with 20 degrees of freedom is t* = 2.086.
    t* = 2.086, df = 20
  5. 5

    Step 5 — Construct the Interval

    CI = b₁ ± t* × SE(b₁) = 0.0820 ± 2.086 × 0.0150 = 0.0820 ± 0.0313.
    (0.0507, 0.1133)
  6. 6

    Step 6 — Interpret in Context

    We are 95% confident that the true slope of the population regression line relating weekly study hours to GPA is between 0.0507 and 0.1133. This means that for each additional hour of study per week, the average GPA is estimated to increase by between 0.0507 and 0.1133 points.
ℹ
Interpretation Template

SECTION 7

Strengths & Limitations

StrengthsLimitations
Provides a range of plausible values rather than a single point estimate, acknowledging sampling variability.Assumes a linear model is appropriate; if the true relationship is nonlinear, the interval estimates a meaningless parameter.
Based on well-understood t-distribution theory; coverage rates are reliable when conditions hold.Sensitive to outliers and influential points, which can distort both b₁ and SE(b₁).
Directly connects to hypothesis testing: if 0 is not in the CI, we reject H₀: β₁ = 0.Requires the LINE conditions; violations (especially non-constant variance) can produce misleadingly narrow intervals.
Width of the interval is easy to reduce by increasing sample size or choosing x-values with greater spread.Association does not imply causation—even a CI that excludes 0 does not prove x causes y without a randomized experiment.
★

Key takeaway

PRACTICAL CONTEXT

SECTION 8

Connection to Hypothesis Testing & Advanced Methods

Confidence intervals and hypothesis tests for β₁ are two sides of the same coin. The t-statistic for testing H₀: β₁ = 0 is t = b₁ / SE(b₁), and this is exactly the value printed in the computer output. A 95% confidence interval that does not contain 0 corresponds to rejecting H₀ at α = 0.05. This duality means you can always convert between the two procedures.

FeatureCI for β₁ (AP Level)Advanced Extensions
ModelSimple linear regression (one predictor)Multiple regression with many predictors
Distributiont-distribution with df = n − 2t-distribution with df = n − k − 1
ConditionsLINE checked via residual plotsAdditional checks: multicollinearity, leverage diagnostics
Robust alternativesNot covered on AP examBootstrap CIs, heteroscedasticity-consistent SEs

AP-level slope inference compared with college-level extensions

In a college statistics or econometrics course, you will encounter multiple regression, where a confidence interval for a single slope coefficient βⱼ is still computed as bⱼ ± t* × SE(bⱼ), but the degrees of freedom change to n − k − 1 (where k is the number of predictors) and the standard error accounts for correlations among predictors. The bootstrap offers a nonparametric alternative that does not require the Normality or Equal Variance conditions, making inference more robust when those assumptions are suspect.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

A 90% confidence interval for the slope of a regression line is (0.45, 1.20). Which of the following is a correct interpretation? A. There is a 90% probability that the true slope is between 0.45 and 1.20. B. 90% of all sample slopes fall between 0.45 and 1.20. C. We are 90% confident that the true slope of the population regression line is between 0.45 and 1.20. D. If we take one more sample, there is a 90% chance its slope will be between 0.45 and 1.20. E. The sample slope is 0.825 with a margin of error of 90%.
  • A. There is a 90% probability that the true slope is between 0.45 and 1.20.
  • B. 90% of all sample slopes fall between 0.45 and 1.20.
  • C. We are 90% confident that the true slope of the population regression line is between 0.45 and 1.20.
  • D. If we take one more sample, there is a 90% chance its slope will be between 0.45 and 1.20.
  • E. The sample slope is 0.825 with a margin of error of 90%.
Show answer (C)
Correct: C. This is the standard correct interpretation of a confidence interval. A is wrong because the true slope is a fixed constant, not a random variable—it either is or is not in the interval, so probability language about the parameter is incorrect. B confuses the CI with the sampling distribution of b₁. D confuses the CI for β₁ with a prediction interval for a future sample slope. E incorrectly states the margin of error as 90%; the margin of error is 0.375, and 90% is the confidence level.

Question 2: BASIC CALCULATION

A regression analysis of n = 27 data points gives b₁ = 3.40 and SE(b₁) = 0.80. Construct a 95% confidence interval for β₁. (t* for df = 25 at 95% confidence is 2.060.) A. (1.75, 5.05) B. (1.83, 4.97) C. (1.75, 4.97) D. (1.83, 5.05) E. (2.60, 4.20)
  • A. (1.75, 5.05)
  • B. (1.83, 4.97)
  • C. (1.75, 4.97)
  • D. (1.83, 5.05)
  • E. (2.60, 4.20)
Show answer (A)
Correct: A. With n = 27 data points, df = 27 − 2 = 25. The margin of error is t* × SE(b₁) = 2.060 × 0.80 = 1.648. The confidence interval is 3.40 ± 1.648: the lower bound is 3.40 − 1.648 = 1.752 ≈ 1.75 and the upper bound is 3.40 + 1.648 = 5.048 ≈ 5.05. So the 95% confidence interval for β₁ is (1.75, 5.05). B uses an incorrect critical value (e.g., t* ≈ 1.96 instead of 2.060), yielding a narrower interval. C mixes the correct lower bound with an incorrect upper bound. D mixes an incorrect lower bound with the correct upper bound. E incorrectly uses t* = 1.00 (or a z-value of 1.00), yielding a margin of error of only 0.80 and the interval (2.60, 4.20).

Question 3: INTERMEDIATE

A researcher increases the sample size from 12 to 50 while keeping the same residual standard deviation s and the same spread of x-values. Which of the following best describes the effect on the 95% confidence interval for β₁? A. The interval becomes narrower because both SE(b₁) and t* decrease. B. The interval becomes wider because the degrees of freedom increase. C. The interval stays the same width because s and the x-spread are unchanged. D. The interval becomes narrower because SE(b₁) decreases, but t* increases. E. The interval becomes narrower only because t* decreases; SE(b₁) is unchanged.
  • A. The interval becomes narrower because both SE(b₁) and t* decrease.
  • B. The interval becomes wider because the degrees of freedom increase.
  • C. The interval stays the same width because s and the x-spread are unchanged.
  • D. The interval becomes narrower because SE(b₁) decreases, but t* increases.
  • E. The interval becomes narrower only because t* decreases; SE(b₁) is unchanged.
Show answer (A)
Correct: A. When n increases, SE(b₁) = s / √(Σ(xᵢ − x̄)²) decreases because the sum Σ(xᵢ − x̄)² grows with more data points spread over the same range. Additionally, t* decreases because df = n − 2 increases and the t-distribution approaches the normal distribution. Both effects make the interval narrower. B is wrong because increased df makes t* smaller, not the interval wider. C ignores that Σ(xᵢ − x̄)² increases with n even if the range is the same. D incorrectly claims t* increases with more df. E incorrectly claims SE(b₁) is unchanged.

Question 4: APPLIED

An environmental scientist collects data on 30 randomly selected lakes, recording the average water temperature (°C) and dissolved oxygen concentration (mg/L). Computer output gives: Predictor | Coef | SE Coef Constant | 14.62 | 0.95 Temperature | −0.34 | 0.052 s = 1.18, R-Sq = 60.1% (a) Construct a 99% confidence interval for β₁. (t* = 2.763 for df = 28 at 99% confidence.) (b) Interpret the interval in context. (c) A colleague claims that temperature has no linear relationship with dissolved oxygen. Does the interval support or refute this claim? Explain. (d) Describe one condition for this inference that you would check using a residual plot and explain what you would look for.
Show answer
(a) [2 points] b₁ = −0.34, SE(b₁) = 0.052, df = 30 − 2 = 28, t* = 2.763. Margin of error = 2.763 × 0.052 = 0.1437. CI: −0.34 ± 0.1437 = (−0.484, −0.196). (b) [1 point] We are 99% confident that the true slope of the population regression line relating water temperature to dissolved oxygen is between −0.484 and −0.196 mg/L per °C. For each additional degree Celsius increase in temperature, the mean dissolved oxygen concentration decreases by between 0.196 and 0.484 mg/L. (c) [1 point] The interval does not contain 0, so we have convincing evidence at the 99% confidence level that there is a negative linear relationship between temperature and dissolved oxygen. The colleague's claim is refuted. (d) [1 point] The Equal Variance (E) condition can be checked with a residual-vs.-fitted or residual-vs.-x plot. We look for roughly constant vertical spread (no fan or megaphone shape) across all x-values. Alternatively, the Linear (L) condition can be checked: the residual plot should show no curved pattern.

Question 5: CRITICAL THINKING

A statistics student constructs a 95% confidence interval for the slope from a dataset of n = 15 observations and obtains (−0.12, 0.88). The student also runs the two-sided t-test for H₀: β₁ = 0 and finds p = 0.12. (a) Is it possible for the confidence interval to contain 0 and yet the student to report p = 0.12? Explain. (b) The student decides to remove an influential observation and recalculates. The new interval is (0.25, 0.95). Explain why removing a single observation can shift the interval dramatically. (c) Discuss whether the student's decision to remove the observation is statistically justified. (d) If the student increased the confidence level to 99% using the original data, what would happen to the width of the interval and the likelihood of capturing β₁? Explain.
Show answer
(a) [1 point] Yes, this is consistent. The 95% CI contains 0, which means we fail to reject H₀: β₁ = 0 at α = 0.05. Failing to reject means p > 0.05, and p = 0.12 satisfies this. The CI containing 0 and p > 0.05 are equivalent conclusions. (b) [1 point] With only n = 15, each observation has substantial influence on the regression line. An influential observation (one with high leverage or a large residual) can pull the slope toward itself, inflating the residual standard deviation or altering b₁ dramatically. Removing it changes both b₁ and SE(b₁), shifting the entire interval. (c) [1 point] Removing an observation solely to obtain a significant result is not statistically justified—it constitutes data manipulation. The decision to remove a point should be based on a substantive reason (recording error, known data quality issue) identified before seeing the results, not on its effect on the analysis. The student should report both analyses or explain the substantive justification for removal. (d) [1 point] Increasing the confidence level from 95% to 99% increases t*, which increases the margin of error, making the interval wider. A wider interval is more likely to capture the true β₁ (99% of intervals will capture it in the long run, compared to 95%). However, the interval becomes less precise as a trade-off for greater confidence.

Varsity Tutors • AP Statistics • Confidence Intervals for the Slope of a Regression Model