SECTION 1
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
1885 • Galton Coins 'Regression'
1908 • Student's t-Distribution
1922 • Fisher's Framework
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.
SECTION 2
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.
The Population Regression Model
Null & Alternative Hypotheses
Conditions for Inference
The t-Test Statistic
Standard Error of the Slope
KEY TAKEAWAY
SECTION 3
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.
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.
SECTION 4
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
β₀ = 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
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
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
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.
SECTION 5
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.
| Condition | What It Means | How to Check |
|---|---|---|
| L — Linearity | The 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 — Independence | Individual 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 — Normal | For 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 Variance | The 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. |
The LINE conditions for inference on the slope of a regression model.
AP Exam Tip
SECTION 6
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:
| Predictor | Coef | SE Coef | t | p-value |
|---|---|---|---|---|
| Constant | 52.387 | 4.215 | 12.43 | < 0.001 |
| Hours | 2.814 | 0.683 | 4.12 | 0.0004 |
Regression output: S = 6.13, R-Sq = 42.5%
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 Hypotheses
Let β₁ 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 Parameters
We 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 Statistic
From 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 Context
Because 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.
SECTION 7
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 Error | Correct 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. |
Common errors and corrections when setting up a slope test.
KEY TAKEAWAY
SECTION 8
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.
| Feature | Slope t-Test (AP Statistics) | Multiple Regression (Beyond AP) |
|---|---|---|
| Number of predictors | 1 (simple linear regression) | 2 or more |
| Hypotheses | H₀: β₁ = 0 | H₀: βⱼ = 0 for each predictor j, controlling for others |
| Degrees of freedom | n − 2 | n − k − 1, where k is the number of predictors |
| Complementary interval | b₁ ± t* × SE(b₁) | bⱼ ± t* × SE(bⱼ) for each coefficient |
| Global test | t-test and F-test are equivalent (F = t²) | F-test evaluates whether at least one predictor is significant |
Comparing simple regression inference with multiple regression.
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.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
- A. The alternative hypothesis should be two-sided (b₁ ≠ 0) rather than one-sided.
- B. The hypotheses should be written in terms of the population parameter β₁, not the sample statistic b₁.
- C. The null hypothesis should set the slope equal to the sample slope rather than zero.
- D. The hypotheses should reference the correlation coefficient r instead of the slope.
- E. There is no error; the hypotheses are correctly stated.
Show answer (B)
Question 2: BASIC CALCULATION
- A. t = 3.00, df = 29
- B. t = 3.00, df = 28
- C. t = 3.45, df = 28
- D. t = 3.00, df = 30
- E. t = 0.333, df = 28
Show answer (B)
Question 3: INTERMEDIATE
- A. The conditions are not met because the normality condition is severely violated by the right skew.
- B. The conditions are met because R² is large enough to guarantee valid inference.
- C. The conditions are approximately met because linearity, independence, and equal variance appear satisfied, and with n = 40 the t-test is robust to moderate skewness.
- D. The conditions cannot be assessed without seeing the original scatterplot of the data.
- E. The conditions are not met because the sample size of 40 does not exceed the minimum of 50 required for regression inference.
Show answer (C)
Question 4: APPLIED
4 ptsShow answer
Question 5: CRITICAL THINKING
4 ptsShow answer
SUMMARY
Summary
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.