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?
2026-04-06 07:47:20.1775461640
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 Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
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.)