Let $X$ and $Y$ be independent random variables such that $X\sim \operatorname{Poisson}(\lambda_1 = 5)$ and $Y\sim \operatorname{Poisson}(\lambda_2 = 15)$. Let $Z = X + Y$ . Compute $\operatorname{Corr}(X, Z)$.
Answer:
$\operatorname{Var}(X) = 5$
$\operatorname{Var}(Y) = 15$
$\operatorname{Cov}(Z) = \operatorname{Cov}(X, X+Y) = \operatorname{Cov}(X, X) = \operatorname{Var}(X) = 5$
$\operatorname{Var}(Z) = \operatorname{Var}(X + Y) = V(X) + V(Y) = 5 + 15 = 20$
$$\operatorname{Corr}(X, Z) = \frac{\operatorname{Cov}(X, Z)}{\sqrt{\operatorname{Var}(X)} \sqrt{\operatorname{Var}(Z)}} = \frac{5}{\sqrt{5 \cdot 20}} = 0.5$$
I'm just wondering if this statement is true for all covariance values or just if independent.
$\operatorname{Cov}(Z) = \operatorname{Cov}(X, X+Y) = \operatorname{Cov}(X, X) = \operatorname{Var}(X) = 5$
Couldn't find it on wiki
$$Cov(X,Z) = Cov(X,X+Y)$$ Let $E(X) = \mu_X$ and $E(Y) = \mu_Y$ then $$Cov(X,X+Y) = E(X-\mu_X)(X-\mu_X + Y - \mu_Y) $$ which is $$Cov(X,X+Y) = E((X-\mu_X)^2) + E(X-\mu_X)(Y-\mu_Y) $$ hence $$Cov(X,X+Y)= Var X + E(XY) - \mu_XEY -\mu_YEX +\mu_X\mu_Y $$ Due to independence of $X$ and $Y$, we have $$Cov(X,X+Y) = Var X + E(X)E(Y) - \mu_X\mu_Y -\mu_Y\mu_X +\mu_X\mu_Y$$ i.e. $$Cov(X,X+Y) = Var X + \mu_X\mu_Y- \mu_X\mu_Y -\mu_Y\mu_X +\mu_X\mu_Y = Var X$$