What you'll learn
This guide covers inference procedures for the slope of a least-squares regression line, a critical component of AP Statistics. You will learn to construct and interpret confidence intervals for the true slope, conduct hypothesis tests about the slope parameter, and verify the conditions necessary for valid inference. These techniques allow you to draw conclusions about linear relationships in populations based on sample data.
Key terms and definitions
Slope (b₁) — the estimated change in the response variable for each one-unit increase in the explanatory variable, calculated from sample data using least-squares regression.
Standard error of the slope (SE_b₁) — the standard deviation of the sampling distribution of the slope statistic, measuring how much sample slopes typically vary from the true population slope.
t-statistic for slope — the standardized test statistic calculated as (b₁ - β₁) / SE_b₁, where β₁ is the hypothesized population slope, used to test hypotheses about the true slope.
Degrees of freedom — for inference about slopes, df = n - 2, where n is the number of data points; accounts for estimating both the intercept and slope.
Residual — the vertical distance between an observed y-value and the predicted y-value from the regression line, calculated as y - ŷ.
Linear regression t-interval — a confidence interval for the true slope β₁, constructed as b₁ ± t* × SE_b₁.
Coefficient of determination (r²) — the proportion of variation in the response variable explained by the linear relationship with the explanatory variable.
Residual plot — a scatterplot of residuals versus the explanatory variable (or predicted values), used to assess whether conditions for inference are met.
Core concepts
The linear regression model
The theoretical foundation for inference about slopes rests on a statistical model:
y = β₀ + β₁x + ε
where:
- y is the response variable
- x is the explanatory variable
- β₀ is the true population y-intercept
- β₁ is the true population slope (the parameter of interest)
- ε represents the random error term
From sample data, we estimate this model as: ŷ = b₀ + b₁x
The sample slope b₁ serves as a point estimate for the population parameter β₁. Because b₁ varies from sample to sample, we need inference procedures to account for sampling variability.
Conditions for inference about slopes
Before conducting any inference procedure for slopes, you must verify four conditions using the acronym LINE:
L — Linear relationship
- Check: Examine the scatterplot of y versus x for a roughly linear pattern
- Also check: The residual plot shows no clear curved pattern
- Why it matters: The least-squares regression line only provides appropriate predictions if the relationship is truly linear
I — Independence
- Check: Determine whether observations are independent through random sampling or random assignment
- Rule of thumb: If sampling without replacement, the sample size should be less than 10% of the population size
- Why it matters: Violations of independence invalidate the probability calculations underlying inference
N — Normal distribution of residuals
- Check: Construct a histogram or Normal probability plot of residuals
- Alternative: For large samples (n ≥ 30), the sampling distribution of b₁ is approximately Normal by the Central Limit Theorem
- Why it matters: The t-distribution only applies when the sampling distribution is approximately Normal
E — Equal variance (homoscedasticity)
- Check: Examine the residual plot; the vertical spread of residuals should remain roughly constant across all x-values
- Also called: Constant variance or homoscedasticity
- Why it matters: Unequal variance violates model assumptions and affects the accuracy of standard errors
Most AP Statistics exam questions will either state that conditions are met or require you to verify them systematically.
Confidence intervals for the slope
A confidence interval estimates a plausible range of values for the true population slope β₁.
Formula: b₁ ± t* × SE_b₁
where:
- b₁ is the sample slope from least-squares regression
- t* is the critical value from the t-distribution with df = n - 2
- SE_b₁ is the standard error of the slope (typically provided by technology output)
Interpretation template: "We are [C%] confident that the true slope of the relationship between [explanatory variable] and [response variable] is between [lower bound] and [upper bound] [units]."
Practical interpretation: Also state what this means in context: "For each additional [unit of x], we are [C%] confident that [y] changes by between [lower bound] and [upper bound] [units of y], on average."
The standard error SE_b₁ is calculated as: SE_b₁ = (s / √(Σ(x - x̄)²))
where s is the standard deviation of the residuals. However, AP Statistics typically provides this value through calculator or computer output rather than requiring hand calculation.
Hypothesis tests for the slope
The most common hypothesis test examines whether a linear relationship exists in the population.
Standard hypotheses:
- H₀: β₁ = 0 (no linear relationship)
- Hₐ: β₁ ≠ 0 (some linear relationship exists)
Alternative hypotheses may be one-sided:
- Hₐ: β₁ > 0 (positive linear relationship)
- Hₐ: β₁ < 0 (negative linear relationship)
Test statistic: t = (b₁ - β₁) / SE_b₁
When testing H₀: β₁ = 0, this simplifies to: t = b₁ / SE_b₁
P-value: The probability of obtaining a slope as extreme as (or more extreme than) the observed slope, assuming the null hypothesis is true. Calculate using the t-distribution with df = n - 2.
Decision:
- If p-value < α (significance level), reject H₀
- If p-value ≥ α, fail to reject H₀
Conclusion template: "Because the p-value [is/is not] less than α = [significance level], we [reject/fail to reject] the null hypothesis. There [is/is not] convincing evidence that [interpret β₁ ≠ 0 in context]."
Understanding computer output
AP Statistics exams frequently provide regression output from statistical software. You must identify and interpret key values:
Typical output format:
Predictor Coef SE Coef T P
Constant 24.50 3.21 7.63 0.000
Variable X 1.85 0.42 4.40 0.001
S = 5.67 R-sq = 61.2% R-sq(adj) = 59.8%
Key components:
- Coef under the predictor row: the sample slope b₁
- SE Coef for the predictor: the standard error SE_b₁
- T: the t-statistic for testing H₀: β₁ = 0
- P: the p-value (often for a two-sided test)
- S: the standard deviation of residuals
- R-sq: the coefficient of determination (r²)
Relationship to correlation
The hypothesis test for slope is mathematically equivalent to testing whether the population correlation ρ equals zero:
- H₀: β₁ = 0 is equivalent to H₀: ρ = 0
- The p-values are identical
However, the slope has a more practical interpretation because it includes units and describes the rate of change in y per unit change in x.
Worked examples
Example 1: Constructing a confidence interval
Question: A researcher investigates the relationship between hours of study (x) and exam scores (y) for 22 students. The least-squares regression equation is ŷ = 52.3 + 4.2x with SE_b₁ = 1.3.
(a) Calculate a 95% confidence interval for the true slope. (b) Interpret this interval in context.
Solution:
(a) Identify the components:
- b₁ = 4.2
- SE_b₁ = 1.3
- df = n - 2 = 22 - 2 = 20
- For 95% confidence with df = 20, t* = 2.086
Calculate the interval: 4.2 ± 2.086(1.3) = 4.2 ± 2.71 = (1.49, 6.91)
(b) Interpretation: We are 95% confident that the true slope of the relationship between hours of study and exam scores is between 1.49 and 6.91 points per hour. This means that for each additional hour of study, we are 95% confident that exam scores increase by between 1.49 and 6.91 points, on average.
Example 2: Hypothesis test for slope
Question: An agricultural scientist studies whether fertilizer amount (kg per hectare) affects wheat yield (tonnes per hectare) using data from 18 plots. Computer output shows:
Predictor Coef SE Coef T P
Constant 2.45 0.32 7.66 0.000
Fertilizer 0.087 0.025 3.48 0.003
(a) State appropriate hypotheses to test whether fertilizer amount is associated with wheat yield. (b) What is the value of the test statistic? (c) At the α = 0.01 significance level, what conclusion should the scientist draw?
Solution:
(a) Hypotheses:
- H₀: β₁ = 0 (There is no linear relationship between fertilizer amount and wheat yield)
- Hₐ: β₁ ≠ 0 (There is a linear relationship between fertilizer amount and wheat yield)
(b) Test statistic: From the output, T = 3.48
Alternatively, calculate: t = b₁ / SE_b₁ = 0.087 / 0.025 = 3.48
(c) Conclusion: The p-value is 0.003, which is less than α = 0.01, so we reject the null hypothesis. There is convincing evidence of a linear relationship between fertilizer amount and wheat yield. Specifically, there is convincing evidence that increased fertilizer is associated with changes in wheat yield.
Example 3: Checking conditions
Question: Before conducting inference on the relationship between daily temperature (°C) and ice cream sales (£) for 35 days, describe how you would check each condition for inference about the slope.
Solution:
Linear condition: Create a scatterplot of ice cream sales versus temperature. The relationship should show a roughly linear pattern. Additionally, examine a residual plot; if the relationship is linear, residuals should be randomly scattered with no obvious curved pattern.
Independence condition: Verify that the 35 days were randomly selected or that observations are independent. Check that 35 days represents less than 10% of all possible days (which it does). Note: consecutive days might violate independence due to weather patterns, which could be a concern depending on how data were collected.
Normal condition: Construct a histogram or Normal probability plot of the residuals. The distribution should be approximately Normal, or since n = 35 > 30, the Central Limit Theorem suggests the sampling distribution of b₁ will be approximately Normal even if residuals show some non-Normality.
Equal variance condition: Examine the residual plot. The vertical spread of residuals should remain roughly constant across all temperature values. There should be no "fanning out" or systematic changes in variability.
Common mistakes and how to avoid them
Confusing b₁ and β₁: Remember that b₁ is the sample slope (a statistic) while β₁ is the population slope (a parameter). Your confidence interval and hypothesis test are about β₁, not b₁.
Incorrect degrees of freedom: Always use df = n - 2 for inference about slopes, not n - 1. The subtraction of 2 accounts for estimating both the slope and intercept.
Forgetting context in interpretations: Never give a purely numerical interpretation. Always state what the slope means in terms of the specific variables studied, including appropriate units.
Misinterpreting "no relationship": Failing to reject H₀: β₁ = 0 means there is insufficient evidence of a linear relationship. A non-linear relationship might still exist.
Checking conditions after calculation: Always verify conditions before performing calculations. If conditions aren't met, the inference procedures are invalid.
Confusing confidence level with confidence: A 95% confidence interval doesn't mean "95% of the data falls in this range." It means we're 95% confident the true parameter lies in this interval.
Exam technique for "Inference for Quantitative Data: Slopes"
Command word "Check conditions": Write out all four LINE conditions explicitly. For each condition, state what you would check and whether it appears satisfied. Even if the question states conditions are met, briefly acknowledge this in your answer.
Show your working: Even when using calculator output, write down the formula, identify values, and show substitution. A typical confidence interval question awards marks for: identifying the correct formula (1 mark), correct calculation (1 mark), and proper interpretation (1-2 marks).
Context is essential: Generic answers like "we are 95% confident the slope is between 2 and 5" earn minimal marks. Always include the variable names, units, and practical meaning to earn full credit for interpretation.
Hypothesis test structure: Use a consistent four-part structure: (1) State hypotheses in context, (2) Identify test statistic and p-value, (3) Make a decision comparing p-value to α, (4) Write conclusion in context of the original question. This ensures you address all marking points.
Quick revision summary
Inference for slopes uses t-procedures with df = n - 2 to estimate or test the true slope β₁. Before inference, check LINE conditions: Linear relationship, Independence, Normal residuals, and Equal variance. Confidence intervals take the form b₁ ± t* × SE_b₁. The most common hypothesis test examines H₀: β₁ = 0 versus Hₐ: β₁ ≠ 0 using t = b₁/SE_b₁. Always interpret results in context with appropriate units. Computer output typically provides the slope coefficient, standard error, t-statistic, and p-value needed for inference procedures.