# Thread: a die is rolled...compute cov(x,y)

1. ## a die is rolled...compute cov(x,y)

a die is rolled twice, let X be the sum of the outcomes and let Y be the first outcome minus the second outcome. Compute Cov(X,Y)

2. If $\displaystyle A$ is the outcome of your first roll and $\displaystyle B$ is the outcome of the second roll, then according to the question$\displaystyle X=A+B \; and\; Y=A-B$

Now use the properties of covariancesto find:

$\displaystyle Cov(X,Y) = Cov(A+B, A-B)$

$\displaystyle = Cov(A,A)-Cov(A,B)+Cov(A,B)-Cov(B,B)=....$

3. i did: Cov(A+B,A-B)=E(A+B)(A-B) - E(A+B)E(A-B) which equals Var(A^2)+ Var(B^2) is that correct also ?

4. Or you can say $\displaystyle \displaystyle cov(X,Y) = E(X,Y)-E(X)\times E(Y)$

Find the expected values from these tables

Code:
		First
X		1	2	3	4	5	6
Second	1	2	3	4	5	6	7
2	3	4	5	6	7	8
3	4	5	6	7	8	9
4	5	6	7	8	9	10
5	6	7	8	9	10	11
6	7	8	9	10	11	12

First
Y		1	2	3	4	5	6
Second	1	0	1	2	3	4	5
2	-1	0	1	2	3	4
3	-2	-1	0	1	2	3
4	-3	-2	-1	0	1	2
5	-4	-3	-2	-1	0	1
6	-5	-4	-3	-2	-1	0

XY		First
Second		1	2	3	4	5	6
1	0	3	8	15	24	35
2	-3	0	5	12	21	32
3	-8	-5	0	7	16	27
4	-15	-12	-7	0	9	20
5	-24	-21	-16	-9	0	11
6	-35	-32	-27	-20	-11	0

5. Originally Posted by nikie1o2
i did: Cov(A+B,A-B)=E(A+B)(A-B) - E(A+B)E(A-B) which equals Var(A^2)+ Var(B^2) is that correct also ?
Seems like you're messed up.

look at the second post and go over the link

$\displaystyle Cov(X,Y) = Cov(A+B, A-B)$

$\displaystyle =Cov(A,A)-Cov(A,B)+Cov(A,B)-Cov(B,B)$

$\displaystyle =Cov(A,A)-Cov(B,B)$

$\displaystyle =Var(A)-Var(B)$

$\displaystyle =0 \;\;\; WHY??$