Suppose we have a linear regression $Y = Xbeta + e$, and we have new data come in. $Y_{new} = X_{new}beta + e_{new}$. And we know that $Y_{new}$ and $hat{Y_{new}}$ are independent. So $Var(Y_{new} – hat{Y_{new}})$ = $Var(Y_{new}) + Var(hat{Y_{new}})$ = $(I + H)sigma^2$, where $H$ is the projection matrix. But according to the formula $Var(Ay) = AVar(y)A^{T}$, so we can get $Var(Y_{new} – hat{Y_{new}})$ = $(I-H)sigma^2(I-H)^{T}$ = $(I – H)sigma^2$.

My question is that are they he same? Or I missed something? Thank you!!

**Contents**hide

#### Best Answer

The problem here is that $hat{Y}_{new} neq H Y_{new}$, so your working falls apart. The hat matrix comes from the data that was used to fit the model. Using the model *estimated from the initial data*, you have:

$$begin{equation} begin{aligned} hat{Y}_{new} = X_{new} hat{beta} = X_{new} (X^text{T} X) X^text{T} Y neq X (X^text{T} X) X^text{T} Y_{new}. end{aligned} end{equation}$$

To find the variance of interest, you should substitute the proper expressions for the two parts and simplify from there using standard variance rules. (Be careful to be clear about what you condition on; e.g., whether or not you are conditioning on the original data, or the new explanatory vector.)

### Similar Posts:

- Solved – How to derive the covariance matrix of $hatbeta$ in linear regression
- Solved – How to derive the covariance matrix of $hatbeta$ in linear regression
- Solved – In linear regression, are the noise terms independent of the coefficient estimators
- Solved – Proof of MSE is unbiased estimator in Regression
- Solved – Prove that the variance of the ridge regression estimator is less than the variance of the OLS estimator