# Thread: Covariance/variance with two random variables

1. ## Covariance/variance with two random variables

So, the question/problem I have is this: Prove that the Cov(x,x) = Var(x)

I had the idea to use the definition of cov(x,y) = sum all x sum all y of (x-E(x))(y-E(y))p(x,y), and by plugging in x for y i would then have two sums over all x of (x-E(x))^2 * p(x,x)
the definition of var(x) is the sum over all x of (x-E(x))^2 * p(x)

is it okay to say that p(x,x) = p(x)?
Also, how do i get rid of that second summation?
Thanks!!

2. Hello,
Originally Posted by mistykz
So, the question/problem I have is this: Prove that the Cov(x,x) = Var(x)

I had the idea to use the definition of cov(x,y) = sum all x sum all y of (x-E(x))(y-E(y))p(x,y), and by plugging in x for y i would then have two sums over all x of (x-E(x))^2 * p(x,x)
the definition of var(x) is the sum over all x of (x-E(x))^2 * p(x)

is it okay to say that p(x,x) = p(x)?
Also, how do i get rid of that second summation?
Thanks!!
Use the fact that cov(X,Y)=E[(X-E(X)) (Y-E(Y))] (it's equivalent to what you said...)

So cov(X,X)=E[(X-E(X))^2]

but this is the definition of the variance... ?

3. Yeah, I saw that when I took another look at it earlier today. Thank you!