How to calculate covariance with an minus like V(X-Y)?

75 Views Asked by At

my task is this:

Be $ X $ and $ Z $ independent with the same distribution and $ Y :=X-Z . $ Calculate $ \operatorname{cov}(X, Y) $ and $ \operatorname{corr}(X, Y) . $

My Problem is the minus in $X-Z$ because than everything I try doesn't work. Lets do $ \operatorname{cov}(X, Y) $ first

$ \operatorname{cov}(X, Y) = \operatorname{cov}(X, X-Z) \operatorname{cov}(X, X + (-)Z) = \operatorname{cov}(X,X) + \operatorname{cov}(X,(-1)Z) $

Now I have the first Problem. Normal I would use the in dependency between X and Z, because than would be $\operatorname{cov}(X,Z) = 0$, but this is not working with the minus, or am I wrong? If yes a proof would be nice.

Now lets do $\operatorname{corr}(X, Y)$:

$ \operatorname{corr}(X, Y) = \frac{\operatorname{cov}(X, Y)}{\sqrt{\mathbb{V} (X) \mathbb{V} (Y)}} = ?$

Therefor we need to calculate the $\mathbb{V} (Y)$ first. So

$ \operatorname{cov}(X-Z) = \operatorname{cov}(X+(-1)Z) = \mathbb{E}\left[(X+(-1)Z)^{2}\right]-(\mathbb{E}[X+(-1)Z])^{2} = $$ \mathbb{E}[X^{2}]+2 \mathbb{E}[X\cdot{}(-1)Z]+\mathbb{E}[{(-Z]}^{2}]-(\mathbb{E}[X]^{2}+2 \mathbb{E}[X] \mathbb{E}[-Z]+\mathbb{E}[-Z]^{2}) = $$ \mathbb{E}[X^{2}]- \mathbb{E}[X]^{2} + \mathbb{E}[{(-Z]}^{2} - \mathbb{E}[-Z]^{2} + \mathbb{E}[X\cdot{}(-1)Z] - \mathbb{E}[X] \mathbb{E}[-Z] = \mathbb{E} (X) + \mathbb{E}[{(-Z]}^{2} - \mathbb{E}[-Z]^{2} + \mathbb{E}[X\cdot{}(-1)Z] - \mathbb{E}[X] \mathbb{E}[-Z] $

And we have this minus again. cant use any definition .

Could you help me to find the Problem?

3

There are 3 best solutions below

0
On

$\newcommand{\cov}{\operatorname{cov}}\newcommand{\E}{\Bbb{E}}$Hint: Note that $\cov(X,-Z)=-\cov(X,Z)$ (also, $\E[X\cdot(-1)Z]=-\E[XZ]$ and $\E[-Z]=-\E[Z]$).

In general, you can pull constant factors outside expectation and covariance.

7
On

$$\operatorname{cov}(X, Y) $$ $$= \operatorname{cov}(X, X-Z)$$ $$=E[X(X-Z)] - E[X]E[X-Z]$$ $$=E[X^2] -E[XZ] - E[X]^2 + E[X]E[Z]$$ $$=V(X)$$

Because $X,Z$ are independent, therefore

$$E[XZ] = E[X]E[Z]$$

1
On

Note that : $Cov(X, Y ) = E(XY ) − E(X)E(Y)$, and that $cov(X)$ simply means $Var(X)=VX$. Thus, for the expression you tried computing: $$cov(X-Z) = Var(X-Z)= E[(X-Z)^2] - [E(X-Z)]^2=\\ E(X^2)+E(Z^2)-2EXEZ - [EX - EZ]^2\\ =E(X^2)+E(Z^2)-2EXEZ - [(EX)^2+(EZ)^2-2EXEZ]=\\ VX+VZ$$

Based on independence of $X$ and $Z$ we can write $E(XZ)=EXEZ$, and always $E(-X)=-EX$ and $E(X+Y)=EX+EY$.