Tutorials › Generalized Linear Models › Exact Profile Intervals for Gaussian Regression Slopes

Profile Likelihood and Intervals · Tutorial 288 of 981

Exact Profile Intervals for Gaussian Regression Slopes

Learn how profiling out the regression coefficients and residual variance leads to a slope interval with exact t-based calibration.

Advanced 11 min read

What You'll Learn

  • Write the Gaussian linear regression likelihood and profile out residual variance.
  • Derive the residual sum of squares under a fixed slope constraint.
  • Relate the profile likelihood-ratio statistic to the usual regression t statistic.
  • Show why exact t calibration gives the standard finite-sample confidence interval.
  • Distinguish exact t calibration from the asymptotic chi-square profile cutoff.

Why Gaussian Regression Is a Special Case

For many models, a profile likelihood interval has no simple closed form and its endpoints are found by tracing a curve. Gaussian linear regression is unusually tractable: the profile likelihood for a slope can be written directly in terms of the usual regression \(t\) statistic. With the appropriate finite-sample calibration, the profile interval is exactly the familiar \(t\)-based interval—not merely a large-sample approximation.

The calibration matters. The profile likelihood-ratio statistic is a nonlinear function of the squared \(t\) statistic. Using a chi-square cutoff for that likelihood ratio is generally only an asymptotic procedure; it does not, in finite samples, give the usual exact \(t\) interval. The distinction follows from the model and can be derived explicitly.

Model and Profile Likelihood

Definition: In the Gaussian linear regression model, \(Y\) is an \(n\)-dimensional response vector with \[ Y\sim N_n(X\beta,\sigma^2 I_n), \] where \(X\) is a fixed \(n\times p\) design matrix of full column rank, \(\beta\in\mathbb{R}^p\), and \(\sigma^2>0\) is an unknown residual variance. Assume \(n>p\) and that the unrestricted residual sum of squares is positive. Write \(\hat\beta=(X^\mathsf{T}X)^{-1}X^\mathsf{T}Y\), \(\operatorname{RSS}=\|Y-X\hat\beta\|^2\), and \(\nu=n-p\). We consider a slope \(c^\mathsf{T}\beta\), where \(c\) selects that coefficient (or, more generally, is any fixed nonzero contrast).

The likelihood, as a function of \(\beta\) and \(\sigma^2\), is proportional to \((\sigma^2)^{-n/2}\exp\{-\|Y-X\beta\|^2/(2\sigma^2)\}\). For any fixed coefficient constraint \(c^\mathsf{T}\beta=b\), let \(\operatorname{RSS}(b)\) be the smallest residual sum of squares among coefficient vectors satisfying that constraint. Maximizing the likelihood over the remaining coefficients and over \(\sigma^2\) defines the profile likelihood for \(b\).

For a positive residual sum of squares \(R\), the likelihood at that residual sum of squares is maximized over \(\sigma^2\) at \(\hat\sigma^2=R/n\). Substitution shows that the constrained and unrestricted profile likelihoods have ratio \[ \frac{L_{\mathrm{prof}}(b)}{L_{\mathrm{prof}}(\hat b)} =\left(\frac{\operatorname{RSS}}{\operatorname{RSS}(b)}\right)^{n/2}, \qquad \hat b=c^\mathsf{T}\hat\beta. \] Thus the profile likelihood-ratio statistic is \(2\{\ell_{\mathrm{prof}}(\hat b)-\ell_{\mathrm{prof}}(b)\}=n\log\{\operatorname{RSS}(b)/\operatorname{RSS}\}\).

Worked Example: Profiling the Variance in a Simple Regression

Consider observations \(y=(3,3,9,12,12,18)^\mathsf{T}\) at \(x=0,1,2,3,4,5\), with an intercept and slope. The fitted line is \(\hat y=2+3x\): the residuals are \((1,-2,1,1,-2,1)\), whose sum and whose inner product with the centered \(x\) values are both zero.

The residual sum of squares is \(1+4+1+1+4+1=12\). Here \(n=6\), \(p=2\), and \(\nu=4\). At the fitted line the profile estimate of the residual variance is \(12/6=2\), since profiling uses the likelihood divisor \(n\), not the residual degrees of freedom.

For a proposed slope \(b\), the residual sum of squares increases by \((b-3)^2/17.5\), because the centered predictor sum of squares is \(17.5\). The profiled likelihood ratio is therefore \[ \frac{L_{\mathrm{prof}}(b)}{L_{\mathrm{prof}}(3)} =\left(\frac{12}{12+(b-3)^2/17.5}\right)^3. \] This expression is maximized at the fitted slope \(b=3\) and decreases as \(b\) moves away from 3.

Constrained Residual Sum of Squares

Result: Let \(v=c^\mathsf{T}(X^\mathsf{T}X)^{-1}c\). For any real \(b\), \[ \operatorname{RSS}(b)=\operatorname{RSS}+\frac{(b-c^\mathsf{T}\hat\beta)^2}{v}. \]

To verify the result, write \(\delta=b-c^\mathsf{T}\hat\beta\). Among coefficient changes \(u=\beta-\hat\beta\) satisfying \(c^\mathsf{T}u=\delta\), the extra squared residual sum is \(u^\mathsf{T}X^\mathsf{T}Xu\). The minimizing change is \[ u_*=\frac{\delta}{v}(X^\mathsf{T}X)^{-1}c, \] which satisfies \(c^\mathsf{T}u_*=\delta\). For any other feasible \(u=u_*+w\), \(c^\mathsf{T}w=0\), and \[ u^\mathsf{T}X^\mathsf{T}Xu =u_*^\mathsf{T}X^\mathsf{T}Xu_*+2w^\mathsf{T}X^\mathsf{T}Xu_*+w^\mathsf{T}X^\mathsf{T}Xw. \] The middle term is zero because \(X^\mathsf{T}Xu_*=(\delta/v)c\) and \(c^\mathsf{T}w=0\). The final term is nonnegative, so \(u_*\) minimizes the extra sum of squares. Finally, \(u_*^\mathsf{T}X^\mathsf{T}Xu_*=\delta^2/v\). The ordinary least-squares residual is orthogonal to every column of \(X\), so the squared residual at \(\hat\beta+u_*\) is \(\operatorname{RSS}+u_*^\mathsf{T}X^\mathsf{T}Xu_*\), proving the result. \(\square\)

The variance of the estimated contrast, apart from the unknown factor \(\sigma^2\), is \(v\). The usual estimated standard error is therefore \(s\sqrt v\), where \(s^2=\operatorname{RSS}/\nu\). Substituting the constrained-sum-of-squares identity into the profile likelihood ratio gives a direct link to the regression statistic.

Exact Calibration Gives the Usual \(t\) Interval

Theorem: Under the stated Gaussian regression assumptions, the profile likelihood-ratio statistic for testing \(c^\mathsf{T}\beta=b\) is \[ W(b)=n\log\!\left(1+\frac{T(b)^2}{\nu}\right), \qquad T(b)=\frac{c^\mathsf{T}\hat\beta-b}{s\sqrt v}. \] Under the null hypothesis \(c^\mathsf{T}\beta=b\), \(T(b)\) has exactly a \(t\) distribution with \(\nu\) degrees of freedom. Consequently, using the exact null cutoff \(n\log\{1+t_{1-\alpha/2,\nu}^2/\nu\}\) for \(W(b)\) gives the two-sided \(1-\alpha\) confidence interval \[ c^\mathsf{T}\hat\beta\ \mathbin{\pm}\ t_{1-\alpha/2,\nu}s\sqrt v. \]

For the statistic identity, the residual-sum-of-squares formula gives \[ \frac{\operatorname{RSS}(b)}{\operatorname{RSS}} =1+\frac{(b-c^\mathsf{T}\hat\beta)^2}{v\,\operatorname{RSS}} =1+\frac{T(b)^2}{\nu}, \] because \(s^2=\operatorname{RSS}/\nu\). Taking \(n\) times the logarithm proves the stated expression for \(W(b)\).

For the exact distribution, under the null, \(c^\mathsf{T}\hat\beta-b\) is normal with mean zero and variance \(\sigma^2v\), since \(\hat\beta\) is a linear function of the Gaussian response. Also, \(\operatorname{RSS}/\sigma^2\) has a chi-square distribution with \(\nu\) degrees of freedom: it is the squared length of the response projected onto the residual space, whose dimension is \(n-p\). The contrast \(c^\mathsf{T}\hat\beta-b\) depends on the projection onto the column space of \(X\), whereas the residual sum of squares depends on the orthogonal residual projection. These projections are independent for a multivariate normal vector. Thus the standardized numerator is an independent standard normal variable, and the denominator \(s/\sigma=\sqrt{(\operatorname{RSS}/\sigma^2)/\nu}\) is the square root of an independent chi-square variable divided by its degrees of freedom. Their ratio has a \(t_\nu\) distribution.

It follows that the exact two-sided acceptance condition is \(|T(b)|\leq t_{1-\alpha/2,\nu}\). Since \(W(b)\) is an increasing function of \(T(b)^2\), this condition is equivalent to \[ W(b)\leq n\log\!\left(1+\frac{t_{1-\alpha/2,\nu}^2}{\nu}\right). \] Solving the condition on \(|T(b)|\) for \(b\) yields the displayed interval. Its coverage is exactly \(1-\alpha\) under the model, because the \(t\) pivot has that exact distribution. \(\square\)

Worked Example: The Exact 95% Slope Interval

Continue with the six observations above. The slope estimate is \(3\), the centered predictor sum of squares is \(17.5\), and \(s^2=12/4=3\). Hence the standard error of the slope is \[ s\sqrt{1/17.5}=\sqrt{3/17.5}=\sqrt{6/35}\approx0.4140. \] For \(\nu=4\), the 97.5th percentile of the \(t\) distribution is approximately \(2.776\). The exact 95% interval is \[ 3\pm 2.776(0.4140)=3\pm1.149, \] or approximately \((1.851,4.149)\).

At either endpoint, \(T(b)^2=2.776^2\approx7.706\). The corresponding profile likelihood-ratio statistic is \(6\log(1+7.706/4)\approx6.44\). Thus the exact profile cutoff here is about \(6.44\), not the asymptotic chi-square cutoff \(3.84\).

Why a Chi-Square Cutoff Is Different

A common profile-likelihood convention uses the asymptotic \(\chi^2_1\) cutoff \(3.841\) for a 95% interval. In this regression model, that cutoff is not the exact finite-sample calibration above. For the six-observation example, setting \(W(b)=3.841\) gives \[ \frac{\operatorname{RSS}(b)}{\operatorname{RSS}} =\exp(3.841/6)\approx1.897, \qquad T(b)^2=4(1.897-1)\approx3.588. \] Thus \(|T(b)|\approx1.894\), producing the interval \(3\pm1.894(0.4140)\), or approximately \((2.216,3.784)\). This is much narrower than the exact \(t\) interval because \(1.894\) is less than the exact \(t_4\) critical value \(2.776\).

The distinction is not a contradiction. The chi-square rule is an asymptotic likelihood-ratio calibration; the \(t\) rule uses the exact finite-sample distribution specific to Gaussian regression with unknown variance. The two cutoffs approach one another in large samples, but they need not agree when the residual degrees of freedom are small.

Worked Example: A Slope Adjusted for Another Predictor

Consider a regression with an intercept, a target predictor \(x\), and a nuisance predictor \(z\), using the following eight rows. The listed residual \(e\) is used to construct the response from \(y=1+2x-0.5z+e\).

Row\(x\)\(z\)\(e\)\(y\)
1-3.5-11-4.5
2-2.51-1-5.5
3-1.511-1.5
4-0.5-1-1-0.5
50.5-1-11.5
61.5114.5
72.51-14.5
83.5-119.5

Both predictors sum to zero; their cross-product is zero, and each is orthogonal to the residual vector. Their sums of squares are \(42\) for \(x\) and \(8\) for \(z\), while \(\sum e_i^2=8\). Therefore the fitted coefficients are \(1,2,-0.5\), the residual sum of squares is \(8\), and \(\nu=8-3=5\). For the \(x\) slope, \(v=1/42\), \(s^2=8/5=1.6\), and its standard error is \(\sqrt{1.6/42}\approx0.1952\).

Using \(t_{0.975,5}\approx2.571\), the exact 95% interval for the slope of \(x\), adjusted for \(z\), is \(2\pm2.571(0.1952)\), or approximately \((1.498,2.502)\). The same profile-likelihood derivation applies even though another regression coefficient is treated as a nuisance parameter.

Interpretation and a Common Pitfall

In this setting, profiling the variance and nuisance regression coefficients does not require a numerical search for the interval endpoints. The constrained residual sum of squares is quadratic in the slope displacement, and the exact profile likelihood-ratio statistic is a monotone transformation of the squared \(t\) statistic. That structure makes the exact interval available in closed form.

  • Wrong reasoning: “A profile likelihood interval uses a likelihood-ratio statistic, so the exact cutoff must be the 95th percentile of \(\chi^2_1\).”
  • Correction: A chi-square cutoff is an asymptotic calibration. Under Gaussian regression with unknown variance, the finite-sample statistic is \(n\log(1+T^2/\nu)\), where \(T\sim t_\nu\) under the null. Transform the exact \(t_\nu\) cutoff through this expression to obtain the exact profile cutoff.

This result is useful as a check on profile-likelihood calculations and as a reminder that the likelihood curve alone does not determine a confidence interval: the calibration rule matters. In Gaussian regression, exact \(t\) calibration recovers the conventional interval while retaining its profile-likelihood interpretation.

Check Your Understanding

Use the model assumptions and derivations above to answer these questions.

  1. Why does profiling the residual variance use \(\operatorname{RSS}(b)/n\), while the usual regression standard error uses \(s^2=\operatorname{RSS}/(n-p)\)?
  2. For a contrast \(c^\mathsf{T}\beta\), what does \(v=c^\mathsf{T}(X^\mathsf{T}X)^{-1}c\) represent in the constrained residual-sum-of-squares formula?
  3. Write the profile likelihood-ratio statistic in terms of \(T(b)\) and \(\nu\).
  4. Why is the exact finite-sample cutoff generally different from the \(\chi^2_1\) cutoff?
  5. Which assumptions make the usual slope \(t\) statistic have an exact \(t_\nu\) distribution?
Clinical Biostats