SECTION 1
Historical Context & Motivation
The question of whether two quantitative variables share a genuine linear relationship—or whether an apparent trend is merely the product of sampling variability—has occupied statisticians for well over a century. Early work in regression analysis focused on fitting lines to data, but it was the development of formal hypothesis testing that transformed regression from a descriptive tool into an inferential one. The ability to calculate a slope from sample data is useful, but it becomes powerful only when we can determine whether that slope is statistically distinguishable from zero—indicating a real linear association in the population.
1805 • Legendre & Least Squares
1908 • Student's t-Distribution
1922 • Fisher's Framework
1970s–Present • Computer-Aided Regression
In AP Statistics, you will encounter scenarios in which you collect paired quantitative data—such as hours of study and exam scores, or amount of fertilizer applied and crop yield—and must determine whether the sample slope provides convincing evidence that the true population slope is nonzero. The central question this lesson addresses is: How do we carry out a significance test for β₁, the true slope of the population regression line?
SECTION 2
Core Principles & Definitions
Before executing the mechanics of the test, it is essential to understand the conceptual building blocks. A test for the slope of a regression model determines whether the linear relationship observed in sample data provides statistically significant evidence of a linear relationship in the broader population. The test relies on a clearly stated model, precise hypotheses, a test statistic drawn from the sampling distribution of the slope estimator, and a comparison to a reference distribution to obtain a p-value.
Population Regression Model
Hypotheses
t-Statistic for the Slope
Conditions for Inference
Decision via p-Value
KEY TAKEAWAY
SECTION 3
Visual Explanation: The Regression Slope Test
The following diagram illustrates the conceptual flow of carrying out a significance test for the slope of a regression model. On the left, paired data is collected and a least-squares regression line is fit, producing the sample slope b₁ and its standard error SE(b₁). These values feed into the t-statistic computation, which is then compared to the t-distribution with n − 2 degrees of freedom to produce a p-value.
Notice that the process begins with data and ends with a contextual conclusion—this mirrors the four-step inference procedure emphasized on the AP exam. The conditions panel on the left reminds you that the LINE conditions (Linearity, Independence, Normality, Equal variance) must be verified before the test statistic and p-value carry any meaning. A residual plot is the primary diagnostic tool for verifying the Linearity, Normality, and Equal variance conditions, while Independence is typically established through knowledge of the study design.
SECTION 4
Mathematical Framework
The mathematical framework for testing the slope of a regression model rests on the simple linear regression model, a formal statement about the population from which the sample data are drawn. Each response value yᵢ is assumed to be the sum of a deterministic linear component β₀ + β₁xᵢ and a random error εᵢ. The least-squares regression procedure applied to the sample produces the point estimate b₁ for the population parameter β₁, along with a standard error that quantifies sampling variability in that estimate.
POPULATION REGRESSION MODEL
β₀ = population y-intercept; β₁ = population slope (parameter of interest); xᵢ = value of the explanatory variable for observation i; εᵢ = random error for observation i, assumed independent and normally distributed with mean 0 and constant standard deviation σ.
HYPOTHESES
The null hypothesis states that the true slope is zero (no linear relationship). The alternative is chosen based on the research question: two-sided (≠ 0) when testing for any linear relationship, or one-sided when the direction is specified.
TEST STATISTIC
b₁ = sample slope (from least-squares regression); SE(b₁) = standard error of the slope, reported in calculator or computer output. Under H₀, this statistic follows a t-distribution with df = n − 2.
STANDARD ERROR OF THE SLOPE
s = the estimated standard deviation of the residuals (also called the standard error of the regression); Σ(xᵢ − x̄)² measures the spread of x-values. You will not need to compute SE(b₁) by hand on the AP exam—it is provided in the regression output table.
The degrees of freedom for this test are n − 2, where n is the number of data points. Two degrees of freedom are lost because we estimate both β₀ and β₁ from the data. The p-value is then computed from the t-distribution: for a two-sided test, it equals 2 × P(T ≥ |t|); for a one-sided test, it equals P(T ≥ t) or P(T ≤ t) depending on the direction of Hₐ. On the AP exam, you will typically obtain the p-value from calculator output (e.g., LinRegTTest) or from a provided computer printout.
READING COMPUTER OUTPUT
SECTION 5
Checking Conditions in Detail
Before computing the test statistic or interpreting a p-value, you must verify that the conditions for inference are reasonably met. The AP exam awards substantial credit for explicitly checking these conditions. The mnemonic LINE organizes the four conditions: Linearity, Independence, Normal responses, and Equal variance. A residual plot (residuals vs. x or residuals vs. fitted values) is the single most important diagnostic graphic, as it can reveal violations of three of the four conditions.
| Condition | What to Check | How to Check It |
|---|---|---|
| L — Linearity | The true relationship between x and y is linear. | Residual plot shows no obvious curved pattern; scatterplot of y vs. x appears roughly linear. |
| I — Independence | Individual observations are independent of one another. | Justified by study design (e.g., random sampling). If sampling without replacement, check that n < 10% of population. |
| N — Normal | For each value of x, the response y is normally distributed (equivalently, residuals are normally distributed). | Histogram or normal probability plot of residuals shows no strong skewness or outliers. For large n, this condition becomes less critical by the CLT. |
| E — Equal Variance | The standard deviation of y (and thus of the residuals) is the same for all values of x. | Residual plot shows roughly constant spread (no fan or megaphone shape) across the range of x-values. |
The LINE conditions for inference about the regression slope
SECTION 6
Worked Example
A researcher wants to investigate whether there is a linear relationship between the number of hours spent studying and exam score. A random sample of n = 20 students is selected. After performing a least-squares regression analysis, the following computer output is obtained:
| Predictor | Coef | SE Coef | T | P |
|---|---|---|---|---|
| Constant | 52.340 | 3.210 | 16.31 | 0.000 |
| Hours | 3.170 | 0.682 | 4.648 | 0.0002 |
Regression output: s = 5.84, R² = 54.6%
The residual plot shows random scatter with no discernible pattern, and a histogram of the residuals is roughly symmetric with no outliers. At the α = 0.05 significance level, is there convincing evidence of a linear relationship between hours spent studying and exam score?
Carrying Out the t-Test for the Slope
- 1
Step 1 — State Hypotheses
Let β₁ represent the true slope of the population regression line relating hours of study (x) to exam score (y). We test:H₀: β₁ = 0 (no linear relationship between hours studied and exam score) vs. Hₐ: β₁ ≠ 0 (there is a linear relationship between hours studied and exam score). - 2
Step 2 — Check Conditions (LINE)
Linearity: The residual plot shows random scatter with no curved pattern, so the linearity condition is satisfied. Independence: The students were randomly selected, and 20 is less than 10% of all students, so the independence condition is satisfied. Normal: The histogram of residuals is approximately symmetric with no outliers, so the normality condition is satisfied. Equal variance: The residual plot shows roughly constant spread across the range of fitted values, so the equal variance condition is satisfied.All four LINE conditions are met. - 3
Step 3 — Compute the Test Statistic
From the computer output, b₁ = 3.170 and SE(b₁) = 0.682. The test statistic is: t = b₁ / SE(b₁) = 3.170 / 0.682 = 4.648. The degrees of freedom are df = n − 2 = 20 − 2 = 18.t = 4.648 with df = 18 - 4
Step 4 — Find the p-Value
Since this is a two-sided test, the p-value = P(|T| ≥ 4.648) with df = 18. From the computer output, the p-value = 0.0002. Alternatively, using a calculator: 2 × tcdf(4.648, 1E99, 18) ≈ 0.0002.p-value = 0.0002 - 5
Step 5 — State Conclusion in Context
Because the p-value (0.0002) is less than α = 0.05, we reject H₀. There is convincing evidence at the α = 0.05 significance level of a linear relationship between the number of hours spent studying and exam score for students in this population. The positive slope (b₁ = 3.170) suggests that, on average, each additional hour of study is associated with an increase of approximately 3.17 points on the exam.Reject H₀. There is convincing evidence of a positive linear relationship between hours studied and exam score.
SECTION 7
Common Pitfalls & Best Practices
Students frequently lose points on the AP exam not because they cannot compute the t-statistic, but because they omit critical steps in communication or misinterpret results. The table below contrasts common mistakes with the correct approach.
| Common Mistake | Correct Approach |
|---|---|
| Failing to define β₁ in context—writing only 'H₀: β₁ = 0' without stating what β₁ represents. | Always define: 'Let β₁ = the true slope of the population regression line relating [x variable] to [y variable].' Then state H₀ and Hₐ. |
| Skipping conditions or checking them generically without referencing the data. | Explicitly check each LINE condition with specific reference to the residual plot, study design, and sample size. |
| Using n − 1 degrees of freedom instead of n − 2. | The t-test for slope uses df = n − 2 because two parameters (β₀ and β₁) are estimated. This differs from one-sample t-tests. |
| Concluding 'x causes y' from a significant regression slope. | Unless the data come from a randomized experiment, state that there is evidence of an association or linear relationship, not causation. |
| Writing 'Accept H₀' when the p-value is large. | The proper language is 'We fail to reject H₀. There is not convincing evidence of a linear relationship…' |
| Forgetting to halve the two-sided p-value from output for a one-sided test. | If Hₐ is one-sided and the computer reports a two-sided p-value, divide by 2 (only when the sample slope is in the direction specified by Hₐ). |
Common exam mistakes and their corrections
AP EXAM COMMUNICATION
SECTION 8
Connections to Confidence Intervals & Beyond
The t-test for the regression slope is closely related to the confidence interval for β₁. In fact, a two-sided hypothesis test at significance level α rejects H₀: β₁ = 0 if and only if the corresponding (1 − α) × 100% confidence interval does not contain 0. Understanding this duality deepens your grasp of both procedures and can serve as a useful cross-check on the AP exam.
| Feature | Significance Test for β₁ | Confidence Interval for β₁ |
|---|---|---|
| Question Answered | Is there evidence that β₁ ≠ 0? | What is a plausible range for β₁? |
| Formula | t = b₁ / SE(b₁) | b₁ ± t* × SE(b₁) |
| Output | p-value → reject or fail to reject H₀ | An interval estimate (lower bound, upper bound) |
| Conditions | LINE (identical) | LINE (identical) |
| Degrees of Freedom | n − 2 | n − 2 |
| Key Relationship | Reject H₀ at level α ↔ | 0 is NOT in the (1 − α) × 100% CI |
Duality between the significance test and confidence interval for the regression slope
Looking beyond the AP Statistics curriculum, the regression slope test extends naturally to multiple linear regression, where the model includes multiple explanatory variables and each slope coefficient receives its own t-test. The F-test in ANOVA for regression simultaneously tests whether all slope coefficients are zero. In the simple linear regression case studied here, the F-statistic equals t² and the two tests are equivalent. Understanding the single-predictor case provides essential intuition for more advanced regression modeling in later coursework.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
- A. The sample slope b₁ is equal to zero.
- B. There is no linear relationship between x and y in the population.
- C. The correlation coefficient r equals zero in the sample.
- D. The standard error of the slope is equal to zero.
- E. There is no association of any kind between x and y.
Show answer (B)
Question 2: BASIC CALCULATION
- A. t = 3.00, df = 24
- B. t = 3.00, df = 23
- C. t = 0.33, df = 23
- D. t = 2.40, df = 23
- E. t = 3.00, df = 22
Show answer (B)
Question 3: INTERMEDIATE
- A. Reject H₀ because the one-sided p-value is 0.036, which is less than 0.05.
- B. Fail to reject H₀ because 0.072 > 0.05.
- C. Reject H₀ because 0.072 < 0.10.
- D. Fail to reject H₀ because the one-sided p-value is 0.144.
- E. The test cannot be completed without knowing the sample size.
Show answer (A)
Question 4: APPLIED
4 ptsShow answer
Question 5: CRITICAL THINKING
4 ptsShow answer
SUMMARY
Summary & Key Concepts
Summary
Carrying out a t-test for the slope of a regression model follows the standard four-step inference framework. Begin by stating hypotheses about the population slope β₁, with H₀: β₁ = 0 asserting no linear relationship and Hₐ specifying the direction of interest. Next, verify the LINE conditions (Linearity, Independence, Normal responses, Equal variance) using a residual plot and knowledge of the study design.
Compute the test statistic t = b₁ / SE(b₁), which follows a t-distribution with n − 2 degrees of freedom under H₀. Obtain the p-value from the t-distribution (halving the two-sided p-value if Hₐ is one-sided), and compare it to the significance level α. If p-value < α, reject H₀ and conclude there is convincing evidence of a linear relationship; otherwise, fail to reject H₀. Always state the conclusion in the context of the problem, and remember that a significant slope from an observational study indicates association, not causation.