I'm having trouble on this question and was wondering if you guys could hep me out.

I have the linear regression model $Y_i=\alpha+\beta x_i +R_i$, with data $y=(y_1, \ldots,y_n) $ and $x = (x_1, \ldots, x_n)$ from the model. I know that the correlation coefficient between $y$ and $x$ is defined as $r(y,x)=s_{xy}/(\sqrt{s_{yy}}\sqrt{s_{xx}})$. Let $\hat{r}=(\hat{r_1}, \ldots , \hat{r_n})$ where $r_i=y_i-\hat{\alpha} - \hat{\beta} x_i$, $i=1,\ldots,n$ be the residuals from fitting the simple regression model.

I'm can't seem to show that $r(\hat{r}, x) = 0$.


We have $\beta = s_{xy}/s_{xx}$ and we have to show $r(\hat{r},x)=0$. I will show that $s_{x\hat{r}}=0$. I use the symbols $\bar{x}, \bar{y}, \bar{r}$ for the mean values. Please note that $\sum{(x_i-\bar{x})}=0$, this will be used a few times.

$s_{x\hat{r}}=\sum{(x_i-\bar{x})(r_i - \bar{r}}) = \sum{(x_i-\bar{x})(y_i-\alpha -\beta x_i- \bar{r})}$

$s_{x\hat{r}}= \sum{(x_i-\bar{x})(y_i-\alpha -\beta x_i)} - \bar{r}\sum{(x_i-\bar{x})}$

$s_{x\hat{r}}=\sum{(x_i-\bar{x})(y_i-\alpha -\beta x_i)}$

$s_{x\hat{r}}=\sum{(x_i-\bar{x})((y_i-\bar{y})+ (\bar{y}-\alpha) - (\beta x_i- \beta \bar{x}}+ \beta\bar{x}))$

$s_{x\hat{r}}=\sum{(x_i-\bar{x})(y_i-\bar{y})}+ (\bar{y}-\alpha) \sum{(x_i-\bar{x})}- \beta\sum{(x_i-\bar{x})^2}- \beta\bar{x} \sum{(x_i-\bar{x})}$

Again, since $\sum{(x_i-\bar{x})}=0$ this simplifies to

$s_{x\hat{r}}=\sum{(x_i-\bar{x})(y_i-\bar{y})} - \beta\sum{(x_i-\bar{x})^2} $

$s_{x\hat{r}}=s_{xy} - \beta s_{xx} = 0$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.