How to find the coefficient of correlation

37 Views Asked by At

This question was appeared in my practice test last week and i was bit confused about it, how to approach this question as a whole.

Q. If a linear relation $ + + = 0$ exists between the variables $X$ and $Y$ and $ < 0$ , then find coefficient of correlation between $X$ and $Y$.

I have two doubts:

  1. ax < 0, what does it means and what effect does it shows on the answer, like if it is ab < 0 rather than ax < 0. what effect does it had on the solution.

  2. How to approach these kind of questions.

What is Know is

  1. $$r = \frac {cov(x,y)}{\sqrt {\sigma_x^2}.\sqrt {\sigma_y^2}}$$

$$r = \frac {cov(x,y)}{\sigma_x.\sigma_y}$$

Thanks in advance

Edit : this is the solution I produce

$a(x - \bar x) + b(y - \bar y) = 0$ $$(x - \bar x) = \frac {-b}{a}(y-\bar y)$$ $$cov(X,Y) = \frac {1}{n} \Sigma (x-\bar x)(y-\bar y)$$ $$=\frac {-b}{a} \frac {1}{n} \Sigma (y-\bar y)^2$$ $$=\frac {-b}{a} \sigma_y^2$$ $$\sigma_x^2 = \frac {1}{n} \Sigma (x-\bar x)^2$$ $$ =\frac {b^2}{a^2} (\frac {1}{n} \Sigma (y-\bar y)^2)$$ $$r = \frac {cov(x,y)}{\sigma_x.\sigma_y}$$ $$=\frac {\frac {-b}{a} \sigma_y^2}{\sqrt {\frac {b^2}{a^2} \sigma_y^2} .\sigma_y}$$ $=-1$ or $1$ as $$\sqrt {\frac {b^2}{a^2}} = \vert\frac{b}{a}\vert$$

1

There are 1 best solutions below

2
On

Well if there is a linear relation like that then $cor(X,Y)$ is either $1$ or $-1$.

$cor(X,Y)$ is $1$ when $a$ and $b$ are of opposite signs.

$cor(X,Y)$ is $-1$ when $a$ and $b$ are of same signs.