Find the correlation coefficient between $2$ variables

42 Views Asked by At

Value $A$ is the product of $2$ integers $X$ and $Y$. Each of the last two integers takes values from the set {$1,2,5$} with probabilities: $0.2$, $0.5$, $0.3$. Determine the correlation coefficient between $X$ and $A$.

Any ideas on how to solve this? I would appreciate any help.

2

There are 2 best solutions below

1
On BEST ANSWER

We have \begin{align} \mathbb P(X = 1) &= \frac15\\ \mathbb P(X = 2) &= \frac12\\ \mathbb P(X = 5) &= \frac3{10}\\ \mathbb P(A = 1) &= \frac1{25}\\ \mathbb P(A = 2) &= \frac15\\ \mathbb P(A = 4) &= \frac14\\ \mathbb P(A = 5) &= \frac3{25}\\ \mathbb P(A = 10) &= \frac3{10}\\ \mathbb P(A = 25) &= \frac9{100}, \end{align} and so $$ \mathbb E[X] = 1\cdot\frac15 + 2\cdot\frac12+5\cdot\frac3{10} = \frac{27}{10}, $$ $$ \mathbb E[X^2] = 1^2\cdot\frac15 + 2^2\cdot\frac12+5^2\cdot\frac3{10} = \frac{97}{10} $$ and $$ \mathrm{Var}(X) = \mathbb E[X^2] - \mathbb E[X]^2 = \frac{97}{10} - \frac{729}{100} = \frac{241}{100}. $$ Similarly, $$ \mathbb E[A] = \frac{729}{100}, \quad \mathbb E[A^2] = \frac{9409}{100},\quad \mathrm{Var}(A) = \frac{9409}{100} - \left(\frac{729}{100}\right)^2 = \frac{409459}{100000}. $$ Moreover, \begin{align} \mathbb E[XA] &= \mathbb E[X^2Y]\\ &= \mathbb E[X^2]\mathbb E[Y]\\ &= \frac{241}{100}\cdot \frac{27}{10}\\ &= \frac{6507}{1000}. \end{align} It follows that \begin{align} \rho(X,A) &= \frac{\mathrm{Cov}(X,A)}{\sigma(X)\sigma(A)}\\ &= \frac{\mathbb E[XA] - \mathbb E[X]\mathbb E[A]}{\sqrt{\mathrm{Var}(X)}\sqrt{\mathrm{Var}(A)}}\\ &=\frac{\frac{6507}{1000} - \frac{27}{10}\cdot\frac{9409}{100}}{\sqrt{\frac{241}{100}}\sqrt{\frac{409459}{100000}}}\\ \end{align}

There is an error in my computations as this value is not between $-1$ and $1$, but the method should be correct.

1
On

It seems like you should be able to use the definition of "population correlation", for example given by: https://en.wikipedia.org/wiki/Pearson_correlation_coefficient. The equation there is given as:

$\rho_{X,Y}=\frac{\operatorname{E}[XY]-\operatorname{E}[X]\operatorname{E}[Y]}{\sqrt{\operatorname{E}[X^2]-[\operatorname{E}[X]]^2}~\sqrt{\operatorname{E}[Y^2]- [\operatorname{E}[Y]]^2}}.$

In your case, you want $\rho_{X,A}$, so substitute the definition of A for Y everywhere in the above equation for $\rho$. For example, $\operatorname{E}[XY]$ will become $\operatorname{E}[XA]=\operatorname{E}[X^2Y]$ etc. In terms of the probability mass functions, you are given that $P\left(X=1\right)=0.2$, $P\left(X=2\right)=0.5$, etc. and I suppose we are assuming that $X$ and $Y$ are independent so that $P\left(X,Y\right)=P\left(X\right)P\left(Y\right)$ for each of the values.

From the above information, you should be able to compute the various expectation values to determine that correlation coefficient.

I hope this helps.