Tutorials › Statistical Theory III - Theories of Inference, Multivariate Methods, and Contingency Tables › Confidence Regions for a Mean Response at a Fixed Design Point

Confidence and Prediction Regions · Tutorial 251 of 972

Confidence Regions for a Mean Response at a Fixed Design Point

Learn to construct and interpret an exact confidence interval for the mean response at a fixed design point, using the uncertainty in the fitted regression mean rather than future-observation variation.

Intermediate 10 min read

What You'll Learn

  • Define the regression mean at a fixed design point and identify its estimator.
  • Calculate the variance factor for the estimated mean from the design matrix.
  • Derive the exact Student \(t\) confidence interval under the normal linear model.
  • Work through examples using both an intercept-only model and a regression with a slope.
  • Distinguish uncertainty about a mean response from residual variation in a future outcome.
  • Recognize when projecting a joint coefficient ellipsoid gives a different interval.

What Is Being Estimated at a Fixed Design Point?

In a regression model, the mean response at a specified design point is a parameter, not a future observed outcome. For example, a model may describe the expected outcome for a patient with a particular covariate profile, or the expected measurement at a fixed experimental setting. The confidence interval for this mean should reflect uncertainty in the estimated regression coefficients. It should not include the additional residual variation that would affect an individual future response.

Let \(Y\) be the \(n\)-vector of responses, \(X\) an \(n\times p\) fixed design matrix of full column rank, and \(\beta\) the \(p\)-vector of regression coefficients. Assume the normal linear model

$$ Y=X\beta+\varepsilon,\qquad \varepsilon\sim N(0,\sigma^2 I_n), $$

where \(\sigma^2>0\). Let \(x_0\) be a fixed \(p\)-vector specifying the design point of interest. The mean response there is \(x_0^T\beta\). The ordinary least-squares estimator of \(\beta\) is \(\hat{\beta}=(X^TX)^{-1}X^TY\), so the estimated mean response is \(x_0^T\hat{\beta}\).

Definition: At a fixed design point \(x_0\), the mean response is \(x_0^T\beta=E[Y_0\mid x_0]\), where \(Y_0\) denotes a response having design vector \(x_0\). Its estimator is \(x_0^T\hat{\beta}\). The quantity being estimated is the conditional mean, not a particular realized value of \(Y_0\).

The uncertainty in this estimate is determined by the design-dependent factor

$$ q_0=x_0^T(X^TX)^{-1}x_0. $$

Because \(X^TX\) is positive definite, \(q_0\geq 0\), and it is positive whenever \(x_0\neq 0\). The standard nondegenerate interval below assumes \(q_0>0\).

The Exact Confidence Interval

Write \(\nu=n-p\) for the residual degrees of freedom, let \(\mathrm{SSE}=(Y-X\hat{\beta})^T(Y-X\hat{\beta})\), and define \(\hat{\sigma}^2=\mathrm{SSE}/\nu\). For a confidence level \(1-\alpha\), the exact interval is

$$ x_0^T\hat{\beta}\ \pm\ t_{\nu,1-\alpha/2}\,\hat{\sigma}\sqrt{q_0}, \qquad q_0=x_0^T(X^TX)^{-1}x_0. $$

Here \(t_{\nu,1-\alpha/2}\) is the \(1-\alpha/2\) quantile of the Student \(t\) distribution with \(\nu\) degrees of freedom. The interval’s estimated standard error is \(\hat{\sigma}\sqrt{q_0}\). The factor \(q_0\) describes uncertainty from estimating the regression coefficients at the chosen design point; it is not a residual variance added for a future outcome.

Theorem: Under the fixed-design normal linear model above, with \(X\) of full column rank, \(n>p\), and \(q_0>0\), the displayed interval has coverage probability \(1-\alpha\) for \(x_0^T\beta\), for every \(\beta\) and every \(\sigma^2>0\).

Proof. The least-squares estimator is a linear transformation of \(Y\), so

$$ \hat{\beta}=\beta+(X^TX)^{-1}X^T\varepsilon \sim N\!\left(\beta,\sigma^2(X^TX)^{-1}\right). $$

Consequently, \(x_0^T\hat{\beta}\) is normal with mean \(x_0^T\beta\) and variance \(\sigma^2q_0\). Thus

$$ Z=\frac{x_0^T\hat{\beta}-x_0^T\beta}{\sigma\sqrt{q_0}}\sim N(0,1). $$

Let \(H=X(X^TX)^{-1}X^T\), the orthogonal projection onto the column space of \(X\). The residual vector is \((I_n-H)Y=(I_n-H)\varepsilon\), since \((I_n-H)X=0\). The matrices \(H\) and \(I_n-H\) project onto orthogonal subspaces. For a multivariate normal vector, these orthogonal projections are independent: their cross-covariance is \(\sigma^2H(I_n-H)=0\), and zero covariance implies independence for jointly normal vectors. Therefore \(\hat{\beta}\) and the residual vector are independent. Also, \(I_n-H\) has rank \(n-p=\nu\), so the squared length of the projected normal error, divided by \(\sigma^2\), has a chi-squared distribution with \(\nu\) degrees of freedom. In particular,

$$ U=\frac{\mathrm{SSE}}{\sigma^2}\sim\chi^2_\nu, \qquad U\text{ is independent of }Z. $$

Since \(\hat{\sigma}^2=\mathrm{SSE}/\nu\), it follows that

$$ T=\frac{x_0^T\hat{\beta}-x_0^T\beta}{\hat{\sigma}\sqrt{q_0}} =\frac{Z}{\sqrt{U/\nu}}\sim t_\nu. $$

By the definition of the two-sided \(t\) quantile, \(P(-t_{\nu,1-\alpha/2}\leq T\leq t_{\nu,1-\alpha/2})=1-\alpha\). Rearranging these inequalities to isolate \(x_0^T\beta\) gives exactly the stated interval. \(\square\)

Why the Standard Error Has This Form

The interval’s standard error follows directly from the covariance matrix of \(\hat{\beta}\). This calculation also shows how uncertainty in the estimated mean depends on the particular \(x_0\).

Result: Under the stated model, \(\operatorname{Var}(x_0^T\hat{\beta})=\sigma^2q_0\). Therefore the estimated standard error is \(\hat{\sigma}\sqrt{q_0}\), and the interval’s total width is \(2t_{\nu,1-\alpha/2}\hat{\sigma}\sqrt{q_0}\).

Derivation. For any fixed vector \(a\), the variance of \(a^T\hat{\beta}\) is \(a^T\operatorname{Var}(\hat{\beta})a\). Taking \(a=x_0\) and using \(\operatorname{Var}(\hat{\beta})=\sigma^2(X^TX)^{-1}\) gives

$$ \operatorname{Var}(x_0^T\hat{\beta}) =x_0^T\operatorname{Var}(\hat{\beta})x_0 =\sigma^2x_0^T(X^TX)^{-1}x_0 =\sigma^2q_0. $$

Taking the square root gives the standard deviation \(\sigma\sqrt{q_0}\); estimating \(\sigma\) by \(\hat{\sigma}\) gives the standard error. Multiplying the interval’s half-width by two gives its stated total width. \(\square\)

This is a scalar confidence interval for one specified linear combination of coefficients. It is not generally the same as taking a joint confidence ellipsoid for all of \(\beta\) and projecting that ellipsoid onto \(x_0^T\beta\). That projection is a valid region if the joint ellipsoid has the required coverage, but its calibration is for simultaneous coefficient coverage and generally produces a different, wider interval. The direct \(t\) calculation uses the exact distribution of the particular contrast \(x_0^T\hat{\beta}\).

Worked Confidence Intervals

Worked Example: An Intercept-Only Model

Suppose \(Y_i=\beta+\varepsilon_i\) for \(i=1,\ldots,16\), with independent \(N(0,\sigma^2)\) errors. The sample mean is \(12\), and the sample standard deviation is \(3\). Find a 95% confidence interval for the mean response.

Here \(p=1\), \(x_0=1\), and \(X\) is a column of sixteen ones. Thus \(X^TX=16\) and \(q_0=1/16\). The estimated mean is \(12\), and its standard error is

\(\hat{\sigma}\sqrt{q_0}=3\sqrt{1/16}=3/4=0.75.\)

The residual degrees of freedom are \(16-1=15\), and \(t_{15,0.975}\approx2.13145\). The margin is \(2.13145(0.75)=1.5985875\). Therefore the interval is

\(12\pm1.5985875=[10.4014125,13.5985875]\), or approximately \([10.401,13.599]\).

This estimates the common mean response. The sample standard deviation enters through its estimate of \(\sigma\), but the standard error is reduced by \(\sqrt{16}\) because the target is a mean estimated from sixteen observations.

Worked Example: A Regression Mean With Nontrivial Design Uncertainty

Consider a full-rank regression fit with \(n=10\), \(p=1\), estimated mean response \(x_0^T\hat{\beta}=6.6\), residual standard deviation \(\hat{\sigma}=2\), and \(q_0=7/9\). Find the 95% interval.

The degrees of freedom are \(\nu=10-1=9\), and the estimated standard error is

\(\hat{\sigma}\sqrt{q_0}=2\sqrt{7/9}=2\sqrt{7}/3\approx1.763834.\)

Using \(t_{9,0.975}\approx2.262157\), the margin is

\(2.262157(1.763834)\approx3.99007.\)

Thus the 95% interval is \(6.6\pm3.99007\), or approximately \([2.60993,10.59007]\). To three decimal places, this is \([2.610,10.590]\). The calculation uses the unrounded standard error and critical value for the reported margin and endpoints.

Worked Example: Computing the Variance Factor in a Slope Model

Suppose there are eight observations at predictor values \(-1\) and \(1\), with four observations at each value. Fit the model \(E[Y\mid x]=\beta_0+\beta_1x\), and estimate the mean response at \(x_0=1\). Suppose the fitted coefficients are \(\hat{\beta}_0=5\) and \(\hat{\beta}_1=0.4\). Within each predictor group, let the residuals be \((r,-r,0,0)\), where \(r=\sqrt{2.16}\). Construct the 95% interval.

There are \(p=2\) coefficients, so \(\nu=8-2=6\). The design columns are orthogonal: \(X^TX\) is diagonal with entries \(8\) and \(8\), hence \((X^TX)^{-1}\) is diagonal with entries \(1/8\) and \(1/8\). At \(x_0=1\), the design vector is \((1,1)^T\), giving

\(q_0=(1,1)\begin{pmatrix}1/8&0\\0&1/8\end{pmatrix}(1,1)^T=1/4.\)

The fitted mean is \(5+0.4(1)=5.4\). The residual sum of squares is \(4r^2=4(2.16)=8.64\), so \(\hat{\sigma}^2=8.64/6=1.44\) and \(\hat{\sigma}=1.2\). The standard error is \(1.2\sqrt{1/4}=0.6\). With \(t_{6,0.975}\approx2.446912\), the margin is \(2.446912(0.6)=1.4681472\). The interval is therefore

\(5.4\pm1.4681472=[3.9318528,6.8681472]\), or approximately \([3.932,6.868]\).

The slope estimate contributes to the fitted mean at \(x_0=1\), and the covariance of the coefficient estimates is accounted for through \(q_0\). The interval still concerns the mean at that setting, not the variation of an individual response around that mean.

Mean Uncertainty Is Not Future-Response Variation

The distinction is easiest to see by writing the two sources of randomness separately. The fitted mean \(x_0^T\hat{\beta}\) varies from sample to sample because \(\hat{\beta}\) varies. A future response at the same design point also varies around its mean because of the model error. The interval derived here is for \(x_0^T\beta\); its estimated standard error is \(\hat{\sigma}\sqrt{q_0}\). It does not add a separate \(\hat{\sigma}^2\) term for the future response’s residual.

A common mistake is to use a standard error involving \(\hat{\sigma}\sqrt{1+q_0}\) when the target is the mean response. That extra \(1\) represents residual variation for a future individual observation, not uncertainty in the mean itself. Using it for a mean-response interval answers a different question and makes the interval unnecessarily wide for the stated target. Conversely, omitting residual variation when the target is a future observation would understate uncertainty; prediction intervals are treated separately.

The point \(x_0\) need not be one of the observed design rows for the algebraic interval formula to apply. The model assumptions must still be credible at that point. In particular, the formula does not make an extrapolated mean reliable merely because it produces a numerical interval. The value of \(q_0\) captures the design-matrix contribution to standard error, while assessing an extrapolation’s plausibility requires attention to the model and design.

Key takeaway: For a fixed design point, estimate the mean by \(x_0^T\hat{\beta}\), calculate \(q_0=x_0^T(X^TX)^{-1}x_0\), and use \(\hat{\sigma}\sqrt{q_0}\) with the \(t_{n-p}\) critical value. Do not add residual variation unless the target is a future response rather than its mean.

Check Your Understanding

Use the model assumptions and formulas in this tutorial to answer the following.

  1. In the fixed-design normal linear model, what parameter does a confidence interval at \(x_0\) cover?
  2. For \(X\) of full column rank, write the variance of \(x_0^T\hat{\beta}\) and identify its design-dependent factor.
  3. Why does the exact interval use a Student \(t\) critical value rather than a normal critical value when \(\sigma^2\) is unknown?
  4. In an intercept-only model with \(n\) observations, what is \(q_0\) for the common mean response?
  5. A proposed mean-response standard error contains \(\hat{\sigma}\sqrt{1+q_0}\). What target does the extra term correspond to, and why is it not part of the interval derived here?
Clinical Biostats