PrepGo

Setting Up a Test for the Slope of a Regression Model - AP Statistics Study Guide

Written by AP Content Team, Verified for 2026 AP Exams, Last updated: May 2026

Learn with study guides reviewed by top AP teachers. This guide takes about 19 minutes to read.

Quick Summary

This guide will equip you to set up and verify the conditions for a significance test for the slope of a regression model. You will learn how to formulate the correct null and alternative hypotheses to determine if a linear relationship exists between two quantitative variables in a population. Furthermore, you will master the critical "LINER" conditions, understanding how to check each one using graphical displays like residual plots to ensure the validity of a t-test for the slope.

Key Concepts

The primary goal of a significance test for the slope is to determine if the evidence from a sample suggests a true linear relationship exists between an explanatory variable (x) and a response variable (y) in the larger population. We are moving beyond just describing a sample relationship and are now making an inference about the population.

1. The Hypotheses

In regression, the sample slope (b) is our statistic, calculated from the data. The population slope (β) is the parameter we want to make an inference about. If the population slope were zero (β = 0), it would mean that there is no linear relationship between the x and y variables. A change in x would correspond to no change in y.

  • Null Hypothesis (H₀): The null hypothesis always states that there is no linear relationship.

    • H₀: β = 0

    • In words: The true slope of the population regression line relating [response variable] to [explanatory variable] is zero.

  • Alternative Hypothesis (Hₐ): The alternative hypothesis states that a linear relationship does exist. It can be two-sided or one-sided, depending on the research question.

    • Hₐ: β \neq 0 (two-sided): We are testing if there is any linear relationship, either positive or negative. This is the most common alternative.

    • Hₐ: β > 0 (one-sided): We are testing specifically for a positive linear relationship.

    • Hₐ: β < 0 (one-sided): We are testing specifically for a negative linear relationship.

2. The Name of the Test

Because we do not know the true standard deviation of the sampling distribution of the slope, we must estimate it using the standard error of the slope (SEb). This means we use a t-distribution, not a Normal distribution.

  • The appropriate test is a t-test for the slope of a regression model.

3. The Conditions for Inference (LINER)

To ensure our calculations and p-value are valid, we must check five conditions. The acronym LINER is essential to remember.

  • (L) Linear: The true relationship between the variables must be linear.

    • How to check: Examine the residual plot (a scatterplot of residuals vs. x-values). There should be no leftover curved pattern. The points should be randomly scattered around the horizontal line at y=0. Also, the initial scatterplot of the data should appear roughly linear.

    • [Image: A good residual plot with randomly scattered points vs. a bad residual plot showing a clear U-shaped pattern.]

  • (I) Independent: Individual observations must be independent of each other.

    • How to check: If sampling without replacement, check the 10% condition: the sample size n should be no more than 10% of the population size N (n \le 0.10N). The problem should also describe a data collection method that ensures independence (e.g., not measuring the same subject repeatedly over a short time).
  • (N) Normal: For any given x-value, the responses (y-values) in the population should follow a Normal distribution. We check this by examining the residuals.

    • How to check: Create a histogram, boxplot, or Normal probability plot of the residuals. The graph should show an approximately Normal distribution (unimodal, roughly symmetric, without strong skew or major outliers). The test is robust to slight departures from Normality, especially with larger sample sizes (n > 30).

    • [Image: A histogram of residuals that is roughly symmetric and unimodal.]

  • (E) Equal Variance (Homoscedasticity): The variability (standard deviation) of the residuals should be the same for all x-values.

    • How to check: Examine the residual plot. The vertical spread of the points should be roughly the same across the entire range of x-values. Avoid a "fanning" or "cone" shape, where the residuals become more or less spread out as x increases.

    • [Image: A good residual plot with consistent vertical spread vs. a bad one showing a clear "fanning out" pattern (heteroscedasticity).]

  • (R) Random: The data must come from a well-designed random sample or a randomized experiment.

    • How to check: This is confirmed by reading the problem description. Look for phrases like "random sample," "randomly selected," or "randomly assigned."

Key Vocabulary

  • β (beta): The true slope of the population regression line. This is the parameter we are testing.

  • b: The slope of the sample regression line, calculated from the data. This is the statistic that estimates β.

  • t-test for the slope: The name of the significance test used to determine if there is a statistically significant linear relationship between two quantitative variables.

  • Residual: The difference between an observed y-value and the y-value predicted by the regression line (residual = y - ŷ). Residuals are the foundation for checking the L, N, and E conditions.

  • Residual Plot: A scatterplot of the residuals against the explanatory variable (or predicted values). It is the primary tool for checking the Linearity and Equal Variance conditions.

  • Homoscedasticity: The formal term for the "Equal Variance" condition. It means the scatter of the residuals is consistent across the range of x-values.

  • Standard Error of the Slope (SEb): An estimate of the standard deviation of the sampling distribution of the sample slope, b. It measures the typical amount that sample slopes will vary from the true population slope.

Calculator Tech (TI-84)

For a t-test for the slope, the function is your primary tool. It performs the entire test after you enter the data.

Steps:

  1. Enter your explanatory data into a list (e.g., L1) and your response data into another list (e.g., L2).

    • STAT -> 1:Edit...
  2. Run the test.

    • STAT -> TESTS -> F:LinRegTTest
  3. Configure the inputs on the screen:

    • Xlist: L1 (or whichever list has your explanatory variable)

    • Ylist: L2 (or whichever list has your response variable)

    • Freq: 1 (unless you have a frequency list)

    • β & ρ: Choose the symbol from your alternative hypothesis (\neq 0, < 0, or > 0).

    • RegEQ: To store the regression equation, press VARS -> Y-VARS -> 1:Function... -> 1:Y₁. This is optional but useful for graphing.

  4. Interpreting the Output: The calculator will display a rich output screen.

    • (the form of the equation)

    • (the calculated test statistic)

    • (the p-value)

    • (degrees of freedom, which is n-2)

    • (the y-intercept of the sample regression line)

    • (the slope of the sample regression line)

    • (the standard deviation of the residuals)

    • and (coefficient of determination and correlation coefficient)

How to Show Work on the FRQ

For a significance test question on the FRQ, you must use the four-step State-Plan-Do-Conclude process.

State

  1. Parameter: Define β in the context of the problem.

    • Template: "Let β be the true slope of the population regression line relating [response variable] to [explanatory variable]."
  2. Hypotheses: State the null and alternative hypotheses using symbols and context.

    • Template:

      • H₀: β = 0 (There is no linear relationship between [explanatory variable] and [response variable] in the population.)

      • Hₐ: β \neq 0 (There is a linear relationship between [explanatory variable] and [response variable] in the population.)

  3. Significance Level: State the alpha (α) level. If not given, use α = 0.05.

    • Template: "We will use a significance level of α = 0.05."

Plan

  1. Procedure: Name the test.

    • Template: "The appropriate procedure is a t-test for the slope of a regression model."
  2. Conditions: Check the LINER conditions.

    • Template:

      • Linear: "The residual plot provided shows no leftover curved pattern, so the linear condition is met." (Or, "The scatterplot appears roughly linear.")

      • Independent: "The problem states the [subjects] were randomly selected. Assuming the sample of n = [sample size] is less than 10% of all possible [subjects], the observations are independent."

      • Normal: "The histogram of residuals is roughly symmetric and unimodal (or the Normal probability plot of residuals is roughly linear), so the Normal condition is met."

      • Equal Variance: "The residual plot shows a similar amount of vertical scatter for all x-values, so the equal variance condition is met."

      • Random: "The problem states that the data come from a random sample."

Do

  1. Identify Values: Report the relevant values from your calculator or the provided computer output.

    • Template: "From the data/computer output, the sample slope is b = [value]. The standard error of the slope is SEb = [value]. The test statistic is t = [value]. The degrees of freedom are df = n - 2 = [value]. The p-value is [value]."
  2. Formula (Optional but Recommended): Write the formula for the test statistic.

    • Test Statistic = (statistic - parameter) / (standard error of statistic)

    • t = (b - β₀) / SEb = (b - 0) / SEb

Conclude

  1. Decision: Compare the p-value to alpha and make a decision about the null hypothesis.

    • Template: "Because our p-value of [p-value] is less than (or greater than) our significance level of α = 0.05, we reject (or fail to reject) the null hypothesis."
  2. Conclusion in Context: State your conclusion in the context of the problem, addressing the alternative hypothesis.

    • Template (if rejecting H₀): "We have convincing statistical evidence that there is a linear relationship between [explanatory variable] and [response variable] in the population."

    • Template (if failing to reject H₀): "We do not have convincing statistical evidence that there is a linear relationship between [explanatory variable] and [response variable] in the population."

Practice Problems

Problem 1:

A real estate agent wants to investigate the relationship between the size of a house (in square feet) and its selling price (in thousands of dollars). She randomly selects 10 houses that recently sold in a large suburban area. The data are provided below. Assume the conditions for inference have been met.

| Size (sq. ft.) | Price (1000s) | | :--- | :--- | | 1800 | 305 | | 2100 | 340 | | 2400 | 380 | | 1600 | 280 | | 2000 | 325 | | 2500 | 400 | | 2200 | 355 | | 1900 | 315 | | 2800 | 450 | | 1700 | 290 | Is there convincing evidence of a linear relationship between the size of a house and its selling price? Carry out a test at the α = 0.05 significance level. **Solution:** **State:** - **Parameter:** Let β be the true slope of the population regression line relating selling price (in thousands of dollars) to the size of a house (in square feet). - **Hypotheses:** - H₀: β = 0 (There is no linear relationship between house size and selling price in this suburban area.) - Hₐ: β \neq 0 (There is a linear relationship between house size and selling price in this suburban area.) - **Significance Level:** We will use α = 0.05. **Plan:** - **Procedure:** The appropriate procedure is a t-test for the slope of a regression model. - **Conditions:** The problem states that the conditions for inference have been met. **Do:** 1. Enter Size into L1 and Price into L2 on the calculator. 2. Run `STAT -> TESTS -> F:LinRegTTest` with Xlist: L1, Ylist: L2, and β & ρ: \neq 0. 3. The output provides: - Test Statistic: **t = 11.08** - p-value: **p = 1.05 x 10⁻⁵ \approx 0.00001** - Degrees of Freedom: **df = n - 2 = 10 - 2 = 8** - Sample slope: **b \approx 0.141** **Conclude:** - **Decision:** Because our p-value of approximately 0.00001 is less than our significance level of α = 0.05, we reject the null hypothesis. - **Conclusion in Context:** We have convincing statistical evidence to conclude that there is a linear relationship between the size of a house (in square feet) and its selling price in this suburban area. --- **Problem 2:** A biologist studied the relationship between the body mass (in grams) and the metabolic rate (in joules per hour) for 12 randomly selected species of mammals. Computer output from a least-squares regression analysis is shown below. | Predictor | Coef | SE Coef | T | P | | :--- | :--- | :--- | :--- | :--- | | Constant | 125.3 | 45.1 | 2.78 | 0.019 | | Body Mass | 2.56 | 0.32 | 8.00 | 0.000 | Is there statistically significant evidence of a positive linear relationship between body mass and metabolic rate for mammals? **Solution:** **State:** - **Parameter:** Let β be the true slope of the population regression line relating metabolic rate (in joules per hour) to body mass (in grams) for mammal species. - **Hypotheses:** The question asks for evidence of a *positive* relationship, so we use a one-sided alternative. - H₀: β = 0 - Hₐ: β > 0 - **Significance Level:** No level is given, so we will use α = 0.05. **Plan:** - **Procedure:** The appropriate procedure is a t-test for the slope of a regression model. - **Conditions:** We must assume the conditions (Linear, Independent, Normal, Equal Variance, Random) have been met to proceed. The problem states the species were randomly selected, which meets the Random condition. **Do:** - From the computer output line for "Body Mass": - Sample slope: **b = 2.56** - Standard error of the slope: **SEb = 0.32** - Test Statistic: **t = 8.00** - Degrees of Freedom: **df = n - 2 = 12 - 2 = 10** - The p-value in the table (P = 0.000) is for a two-sided test (Hₐ: β \neq 0). Since our alternative is one-sided (Hₐ: β > 0) and the sample slope (b=2.56) is positive (in the direction of Hₐ), we find the one-sided p-value by dividing the two-sided p-value by 2. - **p-value = 0.000 / 2 = 0.000** **Conclude:** - **Decision:** Because our p-value of 0.000 is less than our significance level of α = 0.05, we reject the null hypothesis. - **Conclusion in Context:** We have convincing statistical evidence to conclude that there is a positive linear relationship between body mass and metabolic rate for mammal species. ## Common Mistakes to Avoid - **Confusing Parameters and Statistics:** Writing hypotheses using the sample slope $b (e.g., H₀: b = 0). Hypotheses are always about the population parameter .

  • Checking Conditions on the Wrong Data: The Normal and Equal Variance conditions must be checked using the residuals, not the original x or y data. A histogram of y-values might be skewed, but the residuals could still be Normal.

  • Incorrect Degrees of Freedom: For a t-test for slope, the degrees of freedom are always df = n - 2, where n is the number of data pairs. A common mistake is to use n - 1, which is for a one-sample t-test.

  • Misinterpreting a One-Sided P-value from Computer Output: Standard computer output almost always provides a two-sided p-value. If your alternative is one-sided (Hₐ: β > 0 or Hₐ: β < 0), you must divide the provided p-value by 2 (as long as the sample slope is in the direction of your Hₐ).

  • Stating Conditions Without Checking Them: Do not just list "LINER." For each letter, you must explicitly state how you checked the condition by referring to a specific graph (e.g., "The residual plot shows no pattern...") or information from the problem stem ("The 12 mammals were randomly selected...").