AP STATISTICS • INFERENCE FOR QUANTITATIVE DATA: SLOPES

Setting Up a Test for the Slope of a Regression Model

Learn to formulate hypotheses and verify conditions for inference about the true linear relationship between two quantitative variables.

Historical Context & Motivation

When we fit a least-squares regression line to a sample of bivariate data, the resulting slope b₁ is a point estimate of the true population slope β₁. But how confident can we be that the observed relationship did not arise purely from random sampling variability? This question—whether the apparent linear trend is statistically meaningful—motivated some of the most important developments in 20th-century statistics. The machinery of hypothesis testing for regression slopes grew from work on correlation, least-squares estimation, and the theory of sampling distributions.

1805
Legendre's Least Squares
Adrien-Marie Legendre published the first formal account of the method of least squares for fitting a line to data, laying the algebraic foundation for regression analysis.
1885
Galton Coins 'Regression'
Sir Francis Galton introduced the term 'regression' while studying the heights of parents and children, observing that extreme values tended to 'regress' toward the mean in the next generation.
1908
Student's t-Distribution
William Sealy Gosset, writing under the pseudonym 'Student,' derived the t-distribution for small-sample inference—the very distribution we rely on when testing regression slopes.
1922
Fisher's Framework
R. A. Fisher formalized the concepts of maximum likelihood estimation and significance testing, unifying the theory behind testing parameters such as the slope of a regression model.

The central question this lesson addresses is deceptively simple: given sample data with a nonzero slope b₁, can we conclude that the true population slope β₁ is different from zero (or some other hypothesized value)? Answering this requires specifying the correct hypotheses, defining the population model, checking the conditions that legitimize inference, and identifying the appropriate test statistic—all of which we will develop step by step.

Core Principles & Definitions

Before performing any significance test, you must understand the theoretical model that underpins inference about the slope. The simple linear regression model posits that for each value of the explanatory variable x, the response variable y is drawn from a distribution whose mean falls on the true regression line. Formally, we write y = β₀ + β₁x + ε, where ε represents the random deviation of each observation from that line. Setting up a test for β₁ requires familiarity with several foundational ideas that work together to make inference valid.

1

The Population Regression Model

The true model is y = β₀ + β₁x + ε. The parameters β₀ (intercept) and β₁ (slope) are fixed but unknown constants that describe the population relationship.
2

Null & Alternative Hypotheses

H₀: β₁ = 0 (no linear relationship) versus Hₐ: β₁ ≠ 0 (or β₁ > 0 or β₁ < 0). The null claims that x has no linear effect on y.
3

Conditions for Inference

Linearity, Independence, Normal responses, and Equal variance (the LINE conditions) must be met for the t-test on the slope to be valid.
4

The t-Test Statistic

t = (b₁ − β₁₀) / SE(b₁), where β₁₀ is the hypothesized value of the slope (usually 0). This statistic follows a t-distribution with df = n − 2.
5

Standard Error of the Slope

SE(b₁) quantifies the variability of the sample slope across repeated samples. It depends on the residual standard deviation s and the spread of the x-values.
KEY TAKEAWAY
Think of the sample slope b₁ like a single measurement from a thermometer that has some built-in measurement error. The hypothesis test asks: is the reading far enough from zero that we can rule out the possibility that the true temperature (β₁) is actually zero? The standard error is like the precision rating of the thermometer—smaller SE means greater confidence that our reading reflects reality.

Visual Explanation: The Regression Model

The diagram below illustrates the conceptual framework behind inference for the slope. At each value of x, the response y is assumed to come from a normal distribution centered on the true regression line. The spread of each distribution is σ (assumed equal at every x), and the slope β₁ determines how the center shifts as x increases. When we test H₀: β₁ = 0, we are asking whether the centers are truly shifting—or whether the apparent tilt in our sample regression line could be attributed to chance.

At each value of x, the response y follows a normal distribution (violet ellipse) centered on the true regression line (dashed cyan). The pink dots represent observed sample data. Testing β₁ = 0 asks whether these conditional means truly shift as x changes.

Notice that all three normal distributions have the same spread (σ). This reflects the equal variance (homoscedasticity) condition. If the true slope β₁ were zero, these distributions would all be centered at the same height—meaning the response would be unrelated to x. The hypothesis test formalizes exactly this comparison.

Mathematical Framework

Setting up the test requires specifying the hypotheses, the test statistic, and its sampling distribution. We begin with the population regression model and derive the t-statistic used to assess whether the sample slope provides sufficient evidence against the null.

POPULATION MODEL
y = β₀ + β₁x + ε, where ε ~ N(0, σ)
β₀ = population y-intercept; β₁ = population slope (the parameter of interest); ε = random error term, assumed to follow a normal distribution with mean 0 and standard deviation σ, which is constant for all x.
HYPOTHESES
H₀: β₁ = 0 vs. Hₐ: β₁ ≠ 0 (or Hₐ: β₁ > 0 or Hₐ: β₁ < 0)
The null hypothesis states there is no linear relationship between x and y. The alternative may be two-sided or one-sided, depending on the research question. On the AP exam, the context of the problem determines the direction.
TEST STATISTIC
t = (b₁ − 0) / SE(b₁) with df = n − 2
b₁ = sample slope from least-squares regression; SE(b₁) = standard error of the slope, typically given in computer output; n = number of data points; degrees of freedom = n − 2 because two parameters (β₀ and β₁) are estimated.
STANDARD ERROR OF THE SLOPE
SE(b₁) = s / √(Σ(xᵢ − x̄)²)
s = √(Σeᵢ² / (n − 2)) is the residual standard error (also called the standard deviation of the residuals). A smaller s and a wider spread of x-values both reduce SE(b₁), yielding a more powerful test.

In practice, the AP Statistics exam provides computer output that lists b₁, SE(b₁), the t-statistic, and the p-value. Your primary responsibility is to state the hypotheses correctly, verify the conditions, identify the correct test (a t-test for the slope of a regression model), and interpret the output in context. Understanding the formula for SE(b₁) deepens your intuition: more data, less scatter around the line, and more spread in x all give you a sharper test.

The LINE Conditions in Detail

Before a t-test for the slope is valid, four conditions—often remembered by the acronym LINE—must be verified. Failing to check these conditions on a free-response question is one of the most common point-losing mistakes on the AP exam. The following diagram and table detail each condition, including how to assess it from residual plots and contextual information.

Top-left: residuals with random scatter and constant spread (conditions met). Top-right: a curved pattern in the residuals reveals a nonlinear relationship. Bottom-left: a roughly symmetric histogram of residuals supports normality. Bottom-right: a fan-shaped residual plot indicates unequal variance (heteroscedasticity).
The LINE conditions for inference on the slope of a regression model.
ConditionWhat It MeansHow to Check
L — LinearityThe true relationship between x and y is linear.Look at the scatterplot of x vs. y and the residual plot vs. x. There should be no obvious curved pattern.
I — IndependenceIndividual observations are independent of each other.Consider the data collection: random sampling or random assignment supports independence. For samples without replacement, verify n < 10% of the population.
N — NormalFor any given x, the responses y (equivalently, the residuals) are approximately normally distributed.Examine a histogram, dotplot, or normal probability plot of the residuals. With large n, mild departures are acceptable due to the CLT.
E — Equal VarianceThe standard deviation of y is the same for all values of x.Check the residual plot for a 'fan' or 'trumpet' shape. The vertical spread of residuals should remain roughly constant across x.
📝 AP Exam Tip
On free-response questions, you must explicitly name or describe each condition and provide evidence from the context or given plots that it is (or is not) satisfied. Simply listing 'LINE' without explanation earns minimal credit. Describe what you see in the residual plot and connect it to the specific condition.

Worked Example: Setting Up the Slope Test

A researcher investigates whether the number of hours students spend studying per week is a significant linear predictor of their exam score (out of 100). A random sample of 25 students is collected. The least-squares regression yields the following computer output:

Regression output: S = 6.13, R-Sq = 42.5%
PredictorCoefSE Coeftp-value
Constant52.3874.21512.43< 0.001
Hours2.8140.6834.120.0004

Additionally, the residual plot shows random scatter with no obvious pattern, and a histogram of the residuals is roughly symmetric and bell-shaped.

Setting Up and Identifying the Test for the Slope
1
Step 1 — State the HypothesesLet β₁ represent the true slope of the population regression line relating weekly study hours (x) to exam score (y). We test:
H₀: β₁ = 0 (study hours have no linear effect on exam score) vs. Hₐ: β₁ ≠ 0 (study hours do have a linear effect on exam score). A two-sided alternative is appropriate because the research question asks whether hours predict score, without specifying a direction a priori.
2
Step 2 — Identify the Test and ParametersWe will perform a t-test for the slope of a regression model. The relevant parameter is β₁, the population slope. The sample slope is b₁ = 2.814, with SE(b₁) = 0.683. Degrees of freedom: df = n − 2 = 25 − 2 = 23.
This is a t-test for the slope with df = 23.
3
Step 3 — Check Conditions (LINE)Linearity: The residual plot shows no curved pattern, so a linear model is appropriate. Independence: The 25 students were selected randomly, and it is reasonable to assume that 25 is less than 10% of all students in the population. Normal: The histogram of residuals is roughly symmetric and bell-shaped, with no strong skewness or outliers, supporting approximate normality. Equal Variance: The residual plot shows roughly constant vertical spread across x, with no fan shape.
All four LINE conditions are satisfied; we may proceed with the t-test.
4
Step 4 — Compute (or Read) the Test StatisticFrom the output: t = b₁ / SE(b₁) = 2.814 / 0.683 = 4.12. We can verify this matches the value reported in the table. The p-value for this two-sided test is 0.0004.
t = 4.12, p-value = 0.0004.
5
Step 5 — State the Conclusion in ContextBecause the p-value (0.0004) is less than any conventional significance level (e.g., α = 0.05), we reject H₀. There is convincing statistical evidence that the true slope of the population regression line relating weekly study hours to exam score is not zero—meaning study hours are a significant linear predictor of exam score.
Reject H₀. There is convincing evidence at the α = 0.05 level that weekly study hours have a linear effect on exam score.

Common Errors & Pitfalls

Students frequently lose points on AP free-response questions not because they cannot do the calculation (the computer output provides the numbers), but because they misstate hypotheses, inadequately check conditions, or misinterpret results. The table below contrasts common errors with best practices.

Common errors and corrections when setting up a slope test.
Common ErrorCorrect Practice
Writing hypotheses in terms of b₁ (sample slope) instead of β₁ (population slope).Always write H₀: β₁ = 0 and Hₐ: β₁ ≠ 0 (or one-sided). The hypothesis is about the population parameter, not the sample statistic.
Using r (correlation) or r² in the hypotheses instead of β₁.The t-test for the slope tests β₁. Although testing ρ = 0 yields the same t-statistic, the AP exam expects β₁ for the regression slope test.
Saying 'the data are normal' or 'x is normal' when checking conditions.State that the residuals are approximately normally distributed. Check via a histogram or normal probability plot of residuals.
Skipping the independence check because 'it's a random sample.'Mention both that the data were collected via random sampling (or assignment) AND, if sampling without replacement, verify that n < 10% of the population.
Concluding that x 'causes' y based solely on the test result.A significant slope from an observational study indicates a linear association, not causation. Only randomized experiments support causal claims.
KEY TAKEAWAY
The mechanics of the t-test are handled by software; your job on the AP exam is to communicate the reasoning behind the test. Think of yourself as a lawyer presenting a case: you must state the claim (hypotheses), present the evidence (conditions and test statistic), and deliver a verdict (conclusion in context). Omitting any part weakens your argument—and costs you rubric points.

Connections to Confidence Intervals & Multiple Regression

The t-test for the slope is closely related to the confidence interval for β₁, which provides a range of plausible values for the true slope. A 95% confidence interval that does not contain zero leads to the same conclusion as a two-sided test at α = 0.05 that rejects H₀. This duality—hypothesis test and confidence interval yielding consistent conclusions—is a central theme in inference. In more advanced coursework, these ideas extend naturally to multiple linear regression, where each predictor's slope is tested while controlling for other variables.

Comparing simple regression inference with multiple regression.
FeatureSlope t-Test (AP Statistics)Multiple Regression (Beyond AP)
Number of predictors1 (simple linear regression)2 or more
HypothesesH₀: β₁ = 0H₀: βⱼ = 0 for each predictor j, controlling for others
Degrees of freedomn − 2n − k − 1, where k is the number of predictors
Complementary intervalb₁ ± t* × SE(b₁)bⱼ ± t* × SE(bⱼ) for each coefficient
Global testt-test and F-test are equivalent (F = t²)F-test evaluates whether at least one predictor is significant

For the AP Statistics exam, you need only work with simple linear regression (one predictor). However, recognizing that the t-test for the slope is a building block of more general linear modeling deepens your understanding and provides a bridge to college-level courses in regression analysis and econometrics.

Practice Problems

1
A statistics student writes the following hypotheses for a test of the slope of a regression model: H₀: b₁ = 0 Hₐ: b₁ > 0 Which of the following best describes the error in these hypotheses?
2
A regression analysis of the relationship between daily temperature (°F) and ice cream sales ($) for a random sample of 30 days produced b₁ = 3.45 and SE(b₁) = 1.15. What are the value of the test statistic and the degrees of freedom for testing H₀: β₁ = 0?
3
A biologist collects data on the wing length (mm) and body mass (g) of 40 randomly captured birds of a particular species. She fits a least-squares regression of body mass on wing length and obtains the following partial output: b₁ = 0.482, SE(b₁) = 0.126, s = 3.87, R² = 0.278 The residual plot shows no clear pattern, but the histogram of residuals reveals a moderate right skew. Which of the following is the best assessment of the conditions for performing a t-test on the slope?
PROBLEM 4APPLIED
An environmental scientist studies the relationship between the concentration of a pollutant (ppm) in a lake and the distance (km) from an industrial discharge point. Data are collected from 20 randomly selected locations. The regression output is shown below. Predictor | Coef | SE Coef | t | p-value Constant | 14.82 | 1.37 | 10.82 | <0.001 Distance | −0.96 | 0.21 | −4.57 | 0.0002 S = 2.44, R-Sq = 53.7% The scientist wants to determine whether pollutant concentration decreases significantly as distance from the discharge point increases. The residual plot shows random scatter with constant spread, and a normal probability plot of residuals is approximately linear. (a) State the appropriate hypotheses for the scientist's research question. Define the parameter in context. (b) Verify the conditions for performing the test. (c) Identify the test statistic and p-value from the output. Does the p-value from the output need to be adjusted? Explain. (d) State an appropriate conclusion at the α = 0.05 significance level in context.
PROBLEM 5CRITICAL THINKING
A researcher fits a least-squares regression line predicting annual medical expenditure (in thousands of dollars) from body mass index (BMI) using a random sample of 200 adults from a health survey. The computer output gives b₁ = 0.37, SE(b₁) = 0.058, t = 6.38, and p < 0.001. (a) A colleague argues: 'The p-value is extremely small, so BMI must have a large effect on medical expenditure.' Critique this reasoning. In your response, distinguish between statistical significance and practical significance, and reference the value of b₁. (b) Another colleague notes that the residual plot shows a clear fan shape—residuals become more spread out for higher fitted values. Explain why this matters for the validity of the test and describe a possible remedy. (c) The data come from an observational study. A news article reports the findings by stating, 'Higher BMI causes increased medical costs.' Is this conclusion justified? Explain, referencing the study design. (d) Suppose the researcher wanted a more powerful test. Identify two features of the data or sampling design that, if changed, would increase the power of the t-test for the slope, and explain why each would help.

Summary

Setting up a test for the slope of a regression model begins with the population regression model y = β₀ + β₁x + ε. We state hypotheses about β₁—typically H₀: β₁ = 0 versus a two-sided or one-sided alternative—then verify the LINE conditions (Linearity, Independence, Normal residuals, Equal variance) using residual plots and contextual information. The test statistic is t = b₁ / SE(b₁) with df = n − 2, and the conclusion must be stated in the context of the problem, distinguishing association from causation.

Remember: on the AP exam, hypotheses use the population parameter β₁ (never b₁), conditions must be explicitly checked with evidence, and for one-sided tests you may need to halve the two-sided p-value from computer output. Mastering these procedural details, paired with a deep understanding of the underlying model, equips you to earn full credit on inference-for-slope questions.

Varsity Tutors • AP Statistics • Setting Up a Test for the Slope of a Regression Model