博士笔记

01 A Brief Review of Linear Regression

Lingfeng 2026-09-15

01 A Brief Review of Linear Regression

1. Model

Definition (Multiple Linear Regression Model)

Suppose we observe independent observations with predictors
For the th observation, the multiple linear regression model is
In matrix form,
where

2. Basic Assumptions

Definition (Basic Assumptions)

Consider the multiple linear regression model . The basic assumptions are:

  1. Zero mean: , or equivalently .
  2. Constant variance and uncorrelated errors: , i.e. and for .
  3. Normality (for exact finite-sample inference): .

3. Estimation

3.1 Ordinary Least Squares

The ordinary least squares (OLS) estimator minimizes the sum of squared residuals

Expanding,

Taking derivative with respect to ,

Setting the derivative equal to zero gives the normal equations

Since the Hessian is positive semidefinite, the solution minimizes . If , then is nonsingular and

3.2 Fitted Values and Residuals

The fitted values are

where

is called the hat matrix. The residual vector is

Moreover, from the normal equations,

i.e., each column of is orthogonal to .

3.3 Properties of the Hat Matrix

Theorem (Properties of the Hat Matrix)

The hat matrix has the following important properties:

  1. Symmetric: .
  2. Idempotent: .
  3. Orthogonal projection: , .
  4. Rank and trace: .

Thus is the orthogonal projection matrix onto , the column space of .

Proof.

  1. Since is symmetric,
  2. is a linear combination of the columns of , so . Moreover,

    so , i.e., .
  3. A symmetric idempotent matrix has all eigenvalues equal to or , so . By cyclicity of the trace,

3.4 Estimation of Error Variance

Recall that . Since ,

The residual sum of squares is . Since is symmetric and idempotent,

Proof. By symmetry and idempotency of ,

For any fixed symmetric matrix , since and ,

Taking and using gives the result.

Definition (Unbiased Estimator of )

An unbiased estimator of is

3.5 Maximum Likelihood Estimation

Under the normal linear model , the likelihood is

Maximizing the likelihood gives

and

Proof. For fixed , maximizing over is equivalent to minimizing , which yields the OLS estimator. The log-likelihood is, up to constants,

Substituting and solving gives . Note that is biased downward, since .

4. Properties of the OLS Estimator

4.1 Unbiasedness and Variance

Theorem (Unbiasedness and Variance)

Under Assumptions 1–2, the OLS estimator satisfies

Proof. Recall that

Therefore . Moreover,

4.2 Distributional Properties under Normality

Theorem (Distributional Properties under Normality)

If , then:

  1. .
  2. .
  3. and are independent, hence is independent of (and ).

Proof.

  1. is an affine transformation of the multivariate normal vector , hence normal with mean and variance .
  2. Recall that , so

    a quadratic form in . A standard result states that if and is symmetric idempotent with (diagonalize by an orthogonal matrix). Here has rank .
  3. and are jointly normal as linear transformations of . Since ,

    Under joint normality, zero covariance implies independence.

Note (Property 3 is what makes the -statistics and confidence intervals below exact in finite samples.)

5. Test

5.1 Overall F Test

Consider testing whether there is a regression relation between the response variable and the set of predictors:

The total variation can be decomposed as

where

Proof of the decomposition. Since ,

The cross term equals . Both and (the first column of ) lie in , while , so the cross term vanishes.

Define

Under ,

reject for large values of .

5.2 Test for an Individual Regression Coefficient

To test

let . Since , the standard error is estimated by , and the test statistic is

Under , , since is independent of . For the common hypothesis ,

Reject when is sufficiently large.

5.3 Interpretation of the Individual t-Test

For , the question is whether contributes to the regression after controlling for the other predictors. In the multiple regression model

measures the change in the conditional mean of associated with a one-unit increase in , holding all other predictors fixed. Thus

tests whether provides additional linear information given the other predictors in the model.

5.4 Partial F-Test

Suppose we want to test whether a group of predictors contributes to the model:

Compare the reduced model ( imposed) with the full model (all predictors included). Let be the SSE from the reduced model and the SSE from the full model. The extra sum of squares due to the predictors is

and the partial F statistic is

Under , ; reject for large values of .

6. Confidence Intervals

6.1 Confidence Intervals for Regression Coefficients

Let and . Since

a confidence interval for is

More generally, for any linear combination , the estimator is normal (as a linear combination of the jointly normal ) and independent of , so a confidence interval for is

6.2 Confidence Interval for the Mean Response

For a given predictor vector

the conditional mean response is

with estimator

Since

a confidence interval is

The target here is the average response of the population at .

6.3 Prediction Interval for a New Observation

For a new observation at the same predictor value ,

The point prediction is

Thus the two point predictions are the same, but their uncertainties are different. The prediction error is

where is independent of , so

Hence a prediction interval is

The extra under the square root reflects the uncertainty of the new noise term , so the prediction interval is always wider than the confidence interval for the mean response.

7. Residuals

Recall that

Then

so for the th residual, with the th diagonal element of the hat matrix,

Proof. , and by symmetry and idempotency of ,

7.1 Studentized Residuals

Because varies with , raw residuals are not directly comparable across observations. The studentized residual is

which adjusts the residual by its estimated standard deviation.

更新于 2026-09-15 14:59:39