Tutorials › VEE Mathematical Statistics › Confidence Intervals For The Regression Intercept

VEE Mathematical Statistics · Regression Inference · Tutorial 755 of 880

Confidence Intervals For The Regression Intercept

Learn to build and interpret an exact t confidence interval for the regression intercept, and understand why its precision depends on where zero lies relative to the observed predictor values.

Advanced 12 min read

What You'll Learn

  • State the assumptions that make the regression-intercept interval exact.
  • Calculate the intercept standard error from the residual standard error, sample size, predictor mean, and centered sum of squares.
  • Select the correct t critical value and residual degrees of freedom.
  • Interpret the population intercept in relation to the predictor value zero.
  • Explain how centering the predictor changes the intercept being estimated.
  • Assess how the location and spread of observed predictor values affect intercept precision.

Why an Intercept Confidence Interval Needs Care

A regression intercept describes the population mean response when the predictor equals zero. That may be a meaningful quantity, such as a baseline measurement, or it may be an extrapolation if the observed predictor values are far from zero. A confidence interval for the intercept must reflect this distinction: its width depends not only on the residual variation and sample size, but also on the location and spread of the observed predictor values.

This tutorial constructs the exact t-based interval for the population intercept in simple linear regression. The calculation uses the standard error of the least-squares intercept and \(n-2\) residual degrees of freedom. The interval is exact under the normal-error model stated below; without those assumptions, the same t procedure need not have exact coverage.

Model and assumptions: For fixed observed predictors \(x_1,\ldots,x_n\), assume $$ Y_i=\beta_0+\beta_1x_i+\varepsilon_i,\qquad \varepsilon_i\ \text{independent and identically distributed as }N(0,\sigma^2), $$ where \(n\geq 3\), the predictor values are not all equal, and \(\sigma^2>0\). Thus the responses are independent normal variables with means \(\beta_0+\beta_1x_i\) and common variance \(\sigma^2\). The population intercept is \(\beta_0\), the mean response at \(x=0\).

Write \(\bar{x}=n^{-1}\sum_{i=1}^n x_i\) and \(S_{xx}=\sum_{i=1}^n(x_i-\bar{x})^2\). Let \(b_0\) and \(b_1\) be the least-squares estimates of \(\beta_0\) and \(\beta_1\). The residual standard error is \(s=\sqrt{\mathrm{SSE}/(n-2)}\), where \(\mathrm{SSE}=\sum_{i=1}^n(Y_i-b_0-b_1x_i)^2\). The denominator \(n-2\) accounts for estimating two regression coefficients.

The Exact Interval and Its Standard Error

Under the model assumptions, the standard error of the estimated intercept is obtained by replacing \(\sigma\) with \(s\) in its standard deviation formula. The resulting confidence interval is:

Theorem: Let \(t_{1-\alpha/2,n-2}\) denote the \(1-\alpha/2\) quantile of a Student t distribution with \(n-2\) degrees of freedom. An exact two-sided \(100(1-\alpha)\%\) confidence interval for \(\beta_0\) is $$ b_0\ \mathbin{\pm}\ t_{1-\alpha/2,n-2}\,s \sqrt{\frac{1}{n}+\frac{\bar{x}^{\,2}}{S_{xx}}}. $$ Equivalently, its endpoints are \(b_0-t_{1-\alpha/2,n-2}s\sqrt{1/n+\bar{x}^{\,2}/S_{xx}}\) and \(b_0+t_{1-\alpha/2,n-2}s\sqrt{1/n+\bar{x}^{\,2}/S_{xx}}\).

For a 95% interval, \(\alpha=0.05\), so the critical value is \(t_{0.975,n-2}\). The degrees of freedom are \(n-2\), not \(n-1\): the residual variance is estimated after fitting both the slope and intercept. The standard error includes \(\bar{x}^{\,2}/S_{xx}\); omitting that term gives the standard error for a different quantity, not the original intercept.

Why the Intercept Standard Error Has This Form

The least-squares intercept can be written as \(b_0=\bar{Y}-b_1\bar{x}\), where \(\bar{Y}=n^{-1}\sum_{i=1}^nY_i\). Under the stated model, \(\bar{Y}\) has variance \(\sigma^2/n\), \(b_1\) has variance \(\sigma^2/S_{xx}\), and their covariance is zero. Consequently, the variance of their indicated linear combination is:

$$ \begin{aligned} \operatorname{Var}(b_0\mid x_1,\ldots,x_n) &=\operatorname{Var}(\bar{Y}-\bar{x}b_1\mid x_1,\ldots,x_n)\\ &=\frac{\sigma^2}{n}+\bar{x}^{\,2}\frac{\sigma^2}{S_{xx}}\\ &=\sigma^2\left(\frac{1}{n}+\frac{\bar{x}^{\,2}}{S_{xx}}\right). \end{aligned} $$

The zero covariance follows because \(\bar{Y}\) is based on the average errors, while the slope error is proportional to \(\sum_i(x_i-\bar{x})\varepsilon_i\); their covariance contains the factor \(\sum_i(x_i-\bar{x})=0\). The normal-error assumption makes \(b_0\) normally distributed. In addition, the residual sum of squares divided by \(\sigma^2\) has a chi-square distribution with \(n-2\) degrees of freedom and is independent of \(b_0\). Therefore, standardizing \(b_0-\beta_0\) by its true standard deviation and by \(s/\sigma\) produces a t statistic with \(n-2\) degrees of freedom. Inverting that t probability statement gives the interval above.

Worked Example: A 95% Interval With a Predictor Mean Near Zero

A hypothetical laboratory fits a simple regression relating a calibration reading \(Y\) to a centered instrument setting \(x\). Suppose the model assumptions hold, with \(n=7\), \(\bar{x}=1\), \(S_{xx}=12\), estimated intercept \(b_0=3\), and residual standard error \(s=2\). Construct a 95% confidence interval for the population intercept, using \(t_{0.975,5}=2.571\). Report endpoints to two decimal places.

Method. Apply the exact t interval with \(n-2=7-2=5\) degrees of freedom. First calculate the intercept standard error:

$$ \begin{aligned} \operatorname{SE}(b_0) &=2\sqrt{\frac{1}{7}+\frac{1^2}{12}}\\ &=2\sqrt{\frac{12}{84}+\frac{7}{84}}\\ &=2\sqrt{\frac{19}{84}}\\ &\approx 2(0.4756)=0.9512. \end{aligned} $$

The margin of error is \(2.571(0.9512)\approx2.4455\). Thus the unrounded endpoints are \(3-2.4455=0.5545\) and \(3+2.4455=5.4455\). Rounded to two decimal places, the 95% interval is \((0.55,5.45)\).

Check and common mistake avoided. The interval is centered at \(b_0=3\), since \(3-0.5545=2.4455\) and \(5.4455-3=2.4455\). Using \(s/\sqrt{n}\) alone would omit the positive \(\bar{x}^{\,2}/S_{xx}\) contribution and understate the standard error.

Centering and the Meaning of the Intercept

The term \(\bar{x}^{\,2}/S_{xx}\) reveals an important feature of intercept precision. If the predictor values cluster around a value far from zero, estimating the mean response at zero is less precise than estimating the mean response near the center of the observed predictor values. This is because the original intercept is an extrapolation away from the data’s center.

To see the effect of centering, define a new predictor \(z_i=x_i-\bar{x}\). Its sample mean is zero, and its centered sum of squares is still \(S_{xx}\). In this parameterization, the intercept is the population mean response at the original predictor value \(x=\bar{x}\), not at \(x=0\). Its estimated standard error is \(s/\sqrt{n}\). This can be smaller than the standard error of the original intercept, but it estimates a different population quantity. Centering does not by itself improve the precision of the original \(\beta_0\).

For the original intercept, increasing \(S_{xx}\) while holding \(n\), \(s\), and \(\bar{x}\) fixed reduces the term \(\bar{x}^{\,2}/S_{xx}\). A wider spread of predictor values can therefore improve precision. However, the predictor range alone does not determine \(S_{xx}\): the locations of all observations matter. Further, a wider spread cannot remove the \(1/n\) component, and the effect of spread is most important when \(\bar{x}\) is far from zero.

Worked Example: Predictor Location and Intercept Precision

Two hypothetical studies use the same response scale, sample size \(n=10\), and residual standard error \(s=1.5\). In Study A, \(\bar{x}=2\) and \(S_{xx}=20\); in Study B, \(\bar{x}=0\) and \(S_{xx}=20\). Both satisfy the regression model assumptions. Compare the estimated standard errors of the original intercept in the two studies.

Study A. Substitute the Study A summaries into the standard error formula:

$$ \begin{aligned} \operatorname{SE}(b_0) &=1.5\sqrt{\frac{1}{10}+\frac{2^2}{20}}\\ &=1.5\sqrt{0.1+0.2}\\ &=1.5\sqrt{0.3}\\ &\approx1.5(0.5477)=0.8216. \end{aligned} $$

Study B. Here \(\bar{x}=0\), so the second term vanishes:

$$ \operatorname{SE}(b_0) =1.5\sqrt{\frac{1}{10}+\frac{0^2}{20}} =1.5\sqrt{0.1} \approx1.5(0.3162)=0.4743. $$

Study B has the smaller standard error because the observed predictor values are centered at the value where the original intercept is defined. This comparison does not imply that the response residual variation differs: both studies have the same \(s\). It is the predictor location relative to zero that changes the intercept precision. The calculation also avoids the mistake of treating the standard error as dependent on \(n\) and \(s\) alone.

Using the Interval and Avoiding Common Traps

The interval gives a range of parameter values compatible with the observed data under the model and the stated confidence procedure. A 95% confidence level describes the long-run coverage of the method under repeated samples satisfying the assumptions; it does not mean that the fixed parameter \(\beta_0\) has a 95% probability of lying in this particular computed interval.

Worked Example: A Full Intercept Interval and a Centering Trap

A hypothetical maintenance study models annual service cost \(Y\), in thousands of dollars, against operating hours \(x\), measured in thousands of hours. Assume the fixed-predictor normal-error model. The fitted summaries are \(n=10\), \(\bar{x}=2\), \(S_{xx}=40\), \(b_0=15\), \(b_1=1.5\), and \(s=4\). Construct a 95% confidence interval for the original population intercept, using \(t_{0.975,8}=2.306\). Then identify the intercept after centering \(x\) at its sample mean and its standard error.

Original intercept. The residual degrees of freedom are \(10-2=8\). Its standard error is:

$$ \begin{aligned} \operatorname{SE}(b_0) &=4\sqrt{\frac{1}{10}+\frac{2^2}{40}}\\ &=4\sqrt{0.1+0.1}\\ &=4\sqrt{0.2}\\ &\approx4(0.4472)=1.7889. \end{aligned} $$

The margin of error is \(2.306(1.7889)\approx4.1252\). The endpoints are \(15-4.1252=10.8748\) and \(15+4.1252=19.1252\). To two decimal places, the 95% confidence interval for the original intercept is \((10.87,19.13)\).

Centered predictor. With \(z=x-2\), the fitted intercept is \(b_0+2b_1=15+2(1.5)=18\). It estimates the mean service cost at the original predictor value \(x=2\), not at \(x=0\). Since the centered predictor mean is zero, its standard error is \(s/\sqrt{n}=4/\sqrt{10}\approx1.2649\).

Check and common mistake avoided. The original interval is centered at 15 and has a margin of about 4.13. The centered intercept is 18 and estimates a different quantity, so its standard error must not be substituted into the interval for \(\beta_0\). Nor can one obtain a valid interval for \(b_0+2b_1\) by simply shifting both original interval endpoints: the uncertainty of that linear combination must be calculated for the centered parameterization.

A reliable calculation follows a fixed sequence: verify the model and that \(S_{xx}>0\); determine the residual degrees of freedom; calculate the full intercept standard error; select the t critical value for the desired confidence level; then calculate both endpoints and check that they are symmetric about \(b_0\). The exact interval relies on normal, independent errors with a common variance. If these conditions are not appropriate, the stated exact t coverage is not guaranteed.

Key takeaway: The exact t interval for the population intercept is centered at \(b_0\), uses \(n-2\) degrees of freedom, and has standard error \(s\sqrt{1/n+\bar{x}^{\,2}/S_{xx}}\). Centering the predictor changes the intercept’s reference point; it does not make the original intercept more precise.

Check Your Understanding

For each problem, use the stated normal-error regression model and round interval endpoints to two decimal places.

  1. A hypothetical regression has \(n=8\), \(\bar{x}=1\), \(S_{xx}=14\), \(b_0=4\), and \(s=1\). Use \(t_{0.975,6}=2.447\) to construct a 95% interval for the population intercept. (Answer: \((2.92,5.08)\))
  2. A hypothetical study has \(n=12\), \(\bar{x}=0\), \(S_{xx}=30\), \(b_0=7\), and \(s=1.5\). Use \(t_{0.975,10}=2.228\). What is the intercept standard error, and what is the 95% interval? (Answer: standard error \(0.43\); interval \((6.04,7.96)\))
  3. Two regression designs have the same \(n=10\) and \(s=1\). Design A has \(\bar{x}=2\), \(S_{xx}=20\); Design B has \(\bar{x}=0\), \(S_{xx}=20\). Which design gives the smaller standard error for the original intercept, and what are the two standard errors to four decimal places? (Answer: Design B; Design A \(0.5477\), Design B \(0.3162\))
  4. For a hypothetical fit, \(n=9\), \(\bar{x}=1\), \(S_{xx}=8\), \(b_0=2\), and \(s=1\). Use \(t_{0.975,7}=2.365\). Construct the 95% intercept interval, showing the standard error before rounding the endpoints. (Answer: standard error \(0.4859\); interval \((0.85,3.15)\))
  5. A model has \(n=10\), \(\bar{x}=3\), \(S_{xx}=30\), \(s=2\), and \(b_0=5\). A candidate uses \(2/\sqrt{10}\) as the intercept standard error because that is the standard error when the predictor is centered. Explain the error and calculate the original intercept standard error. (Answer: the centered formula estimates the mean at \(x=\bar{x}\), not the mean at zero; original standard error \(2\sqrt{0.1+9/30}=1.2649\))
Clinical Biostats