Why Estimate a Population Slope with an Interval?
A sample regression line summarizes a relationship in the observed data, but the sample slope is not usually the exact slope in the population. A confidence interval gives a range of plausible values for that population slope while accounting for the sampling variability of the estimate. Its width reflects both the uncertainty in the estimated slope and the confidence level chosen.
This tutorial focuses on constructing the interval. The target is the population slope, not the response expected for one individual or the mean response at a particular predictor value. For example, if \(x\) is a dose in milligrams and \(y\) is a measured response in points, the population slope describes the change in the population mean response, in points, for each additional milligram of dose under a linear model.
The t-Based Slope Interval
For observations \((x_i,y_i)\), the usual simple linear regression model is \(Y_i=\beta_0+\beta_1x_i+\varepsilon_i\). For exact t-based inference, the errors are independent, have mean zero and a common variance \(\sigma^2\), and are normally distributed. Equivalently, conditional on the predictor values, the responses have a linear mean, constant variance, and normal errors. The sampling design must also support treating the observations as independent. These conditions are the basis for the standard t procedure; they should be assessed using the study design and regression diagnostics, not assumed merely because software reports an interval.
Let \(SE(b_1)\) denote the estimated standard error of the sample slope. For simple linear regression with \(n\) observations, the residual degrees of freedom are \(n-2\), because the fitted line estimates two parameters, the intercept and the slope. The critical value \(t^*\) is chosen from the \(t\) distribution with \(n-2\) degrees of freedom so that the central area between \(-t^*\) and \(t^*\) is \(1-\alpha\).
The confidence level determines the central area of the t distribution: for a 95% interval, \(\alpha=0.05\), so 2.5% lies in each tail. A higher confidence level requires a larger critical value and, with the same data and standard error, a wider interval. The degrees of freedom also matter: the critical value comes from \(n-2\), not from \(n\), and not from a standard normal distribution.
Why the Formula Has This Form
Under the linear regression model conditions, the standardized slope estimate follows a t distribution with \(n-2\) degrees of freedom:
The central \(1-\alpha\) probability statement for the t statistic is
The standard error is positive, so multiplying all parts of the inequality by \(SE(b_1)\) preserves the inequality directions. Subtracting \(b_1\) and then multiplying by \(-1\) reverses the directions, giving
This is the interval formula. In repeated sampling under the model, the interval-construction method captures the fixed population slope at the stated rate. It does not make the fixed slope a random quantity after the data have been observed.
Constructing an Interval in Practice
Consider the design and whether the observations can be treated as independent. Check that the relationship in the mean is linear, the residual spread is reasonably constant, and the residuals are reasonably normal for the t procedure, especially with a small sample.
Record the sample slope \(b_1\), its standard error \(SE(b_1)\), and the sample size \(n\). Keep the slope's units visible.
Use the chosen confidence level and \(df=n-2\) to find \(t^*=t_{1-\alpha/2,\ n-2}\).
Multiply \(t^*\) by \(SE(b_1)\), then subtract and add that margin of error to \(b_1\). Report both endpoints with units and an interpretation tied to the variables.
Worked Example: A 95% Interval for Study Time and Quiz Score
Hypothetical data. A sample of \(n=10\) students is used to relate study time in hours to quiz score in points. The fitted sample slope is \(b_1=1.80\) points per hour, and its standard error is \(SE(b_1)=0.42\) points per hour. Construct a 95% confidence interval for the population slope.
The study design treats students as independent observations. Suppose the residual plot shows no marked curvature or change in spread, and the residuals show no strong departure from normality. These checks support using the t interval for this small sample.
For a 95% interval, \(\alpha=0.05\), and the degrees of freedom are \(n-2=10-2=8\). The two-sided critical value is \(t_{0.975,8}=2.306\). Therefore,
Rounded to three significant figures, the interval is 0.832 to 2.77 quiz-score points per hour. Under the model, this method gives a 95% confidence interval for the population mean score change associated with one additional hour of study. The interval describes uncertainty about the slope; by itself it does not establish that study time causes a change in score.
Worked Example: A Negative Slope
Hypothetical data. In a sample of \(n=16\) plants, a researcher models leaf temperature in degrees Celsius as a function of water supplied in millilitres per day. The fitted slope is \(b_1=-0.75\) degrees Celsius per millilitre per day, with \(SE(b_1)=0.30\) degrees Celsius per millilitre per day. Find a 95% confidence interval.
Assume the plants were independently sampled and measured, and that residual checks show an approximately linear mean pattern, fairly constant spread, and no severe nonnormality or influential departure. These findings support the regression t procedure for this example.
Here \(df=16-2=14\), and the 95% critical value is \(t_{0.975,14}=2.145\). The margin of error is \(2.145(0.30)=0.6435\) degrees Celsius per millilitre per day. The endpoints are
The 95% interval is approximately \(-1.39\) to \(-0.107\) degrees Celsius per millilitre per day. The negative estimated slope places both endpoints below zero: the interval estimates a decrease in mean leaf temperature as water supplied increases, within the linear model. This is an association described by the model, not proof of a causal effect.
Worked Example: How the Confidence Level Changes the Interval
Hypothetical data. A sample of \(n=20\) devices is used to estimate the relationship between operating time in hours and battery temperature in degrees Celsius. The sample slope is \(b_1=2.40\) degrees Celsius per hour and \(SE(b_1)=0.85\) degrees Celsius per hour. Construct a 90% confidence interval.
Suppose devices were measured independently and residual checks show a reasonably linear mean relationship, no substantial funnel-shaped spread, and no severe departure from normality. These checks make the t-based interval reasonable for the stated model.
For 90% confidence, \(\alpha=0.10\), so the central t area is 0.90. The degrees of freedom are \(20-2=18\), and \(t_{0.95,18}=1.734\). Thus,
The 90% interval is approximately 0.926 to 3.87 degrees Celsius per hour. It is wider than a 90% interval would be if the same estimate and standard error were paired with a smaller critical value, and narrower than the corresponding interval at a higher confidence level. The change comes from the critical value, not from a change in the observed sample slope.
Common Mistakes and Careful Reporting
A frequent error is to use \(n-1\) degrees of freedom, as might be used for a one-sample t procedure. In simple linear regression, two parameters are estimated from the data, so the residual degrees of freedom are \(n-2\). Another error is to use a normal critical value such as 1.96 regardless of sample size. The slope interval uses a t critical value with the appropriate residual degrees of freedom because the error standard deviation is estimated.
A further mistake is to report only the numerical endpoints. A complete report identifies the confidence level, the population slope being estimated, and the slope units. For instance, an interval for a slope measured in points per hour cannot be reported as merely “0.83 to 2.77”; those numbers have meaning only with the predictor, response, and units attached.
Do not interpret a 95% interval as assigning a 95% probability to the population slope being inside the particular interval already calculated. The population slope is fixed; the interval varies from sample to sample. The confidence level describes the long-run success rate of the procedure when its assumptions hold. If conditions are substantially violated, the nominal coverage may not be reliable.
Check Your Understanding
Try these questions using the interval formula and the regression conditions described above.
- A simple regression uses \(n=12\) observations. What degrees of freedom should be used to find the slope-interval critical value, and why?
- A sample slope is 0.60 and its standard error is 0.20. For a specified confidence level, explain which additional quantity is needed before the endpoints can be calculated.
- For the same sample slope and standard error, explain why a 99% confidence interval is wider than a 90% confidence interval.
- A student uses \(n-1\) degrees of freedom for a simple-regression slope interval. Identify the error and give the correct degrees of freedom.
- In a 95% slope interval, what does the 95% refer to? Explain why it is not the probability that the fixed population slope lies in the particular interval obtained.