Shortcut for regression correlations using linear algebra

25 Views Asked by At

There's a paper I am reading and the author states that the following is the vector of correlations:

$$c(\hat{Y})=X^T(Y-\hat{Y})$$

A few assumptions we have is that Y and $\hat{X}$ have means of zero, and that the vector $\hat{X}$ is of length 1. We're also assuming all the covariates are linearly independent. I believe to understand the following:

$$\rho_{x,y}=\frac{Cov(X,\hat{Y})}{||X||\ ||\hat{Y}||}=\frac{<X,\hat{Y}>}{||X||\ ||\hat{Y}||}=\frac{X^T\hat{Y}}{||X||\ ||\hat{Y}||}$$