R squared in linear regression

247 Views Asked by At

How do I see that :

$\frac{(\sum(x_i-\bar{x})(y_i - \bar{y}))^2}{\sum(x_i-\bar{x})^2\sum(y_i-\bar{y})^2}$ is always between 0 and 1?


where $\bar{x}=1/n *\sum(x_i)$, or the sample mean

2

There are 2 best solutions below

5
On BEST ANSWER

The $\leq 1$ part follows from the Cauchy-Schwarz Inequality, where $$\sum a_i^2\sum b_i^2\geq\left(\sum a_ib_i\right)^2$$ The $\geq 0$ part is straightforward because $x^2\geq0$ for any $x$.

2
On

We know that $-1\leq r\leq 1.$ The given quantity is, by definition, square of the correlation coefficient. Hence, $$0\leq r^2=\dfrac{\left[\sum (x_{i}-\bar{x})(y_{i}-\bar{y})\right]^2}{\sum (x_{i}-\bar{x})^2\sum (y_{i}-\bar{y})^2}\leq 1$$.