How can I calculate the covariance of 2 random variables, given the second one and the variance of the first one?

318 Views Asked by At

If X is a random variable with variance 1 and $Y = -2X+5$ how do I calculate the covariance of X and Y? I know the formula of the covariance is $cov(X,Y) = E(XY) - E(X)E(Y)$, but from the given data, I'm not sure how to use it. Any ideas?

2

There are 2 best solutions below

0
On BEST ANSWER

Summarizing the comments so this can be marked as resolved..


Let $\mu$ denote the unknown mean of $X$, and let $\sigma^2 = 1$ be the variance of $X$.

Observe that $XY = -2X^2 + 5X$, so $$E(XY) = -2E(X^2) + 5E(X) = -2(\sigma^2 + \mu^2) + 5\mu$$ Also, $$E(Y) = -2E(X) + 5 = -2\mu + 5$$ Therefore, $$\begin{aligned} cov(X,Y) &= E(XY) - E(X)E(Y)\\ &= -2(\sigma^2 + \mu^2) + 5\mu - \mu(-2\mu + 5) \\ &= -2\sigma^2 \\ &= -2 \end{aligned}$$ (The terms involving $\mu$ cancel, so it's not necessary to know its value.)

0
On

Since the correlation coefficient $\rho=-1$ and the standard deviation of $Y$ is $\sigma_Y=2$ we have $\sigma_{XY}=\rho\sigma_X\sigma_Y=-2$.