• Support PF! Buy your school textbooks, materials and every day products Here!

How to work out Covariance ?

  • Thread starter laura_a
  • Start date
  • #1
66
0

Homework Statement



I have a joint pdf f_{XY}(x,y) = (2+x+y)/8

and I have to find cov(x,y)

Homework Equations


Now I know the formula is cov(X,Y)=E((X-mu)(Y-v)) where E(X)=mu and E(Y)=v

Well I found that formula on wikipedia, but it doesn't make sense to me because if E(X)=mu then doesn't E(X-mu) equal zero?

Well thats my main problem, I dont know how to use the formula.

The Attempt at a Solution



I've worked out the distribution table to see if that would help

. . . . y
. . . -1___0___1
. -1 0, 1/8, 1/4 (X=-1) =3/8
x 0 1/8, 1/4, 3/8 (X=0) =3/4
. .1 1/4, 3/8, 1/2 (X=1)=1/18
(Y=-1) = 3/8 (Y=0)=3/4 (Y=1) = 1/1/8

Sorry its not in LaTex I couldn't remember how to start the code.

I've also worked out that the var(Y) = 1 if that is any help? I have an exam on this very soon and I really want to be able to get a hold of all the main concepts... thanks for any information
 

Answers and Replies

  • #2
[tex]cov(X,Y) = E[(X-\mu)(Y-\nu)] = E(X Y) - \mu \nu[/tex]

You are right to say that [tex]E(X) = \mu, E(Y) = \nu[/tex] which is why the cross terms are gone, but...

since the pdf is not separable the variables are correlated and [tex]E(XY) \neq E(X) E(Y)[/tex] and your expression is non-zero.

You must evaluate the expectation values by integration. What is your domain? I ask that because it can't be over the whole space, because your pdf would be non-normalizable.
 
  • #3
The expectation value for a random variable, say for example [tex]X^3 Y^2[/tex], is given by

[tex]E(X^3 Y^2) = \int dx dy f(x,y) x^3 y^2[/tex] if your distribution is already normalized else it's given by

[tex]E(X^3 Y^2) = \frac{\int dx dy f(x,y) x^3 y^2}{\int dx dy f(x,y)}[/tex]
 
  • #4
66
0
The domain is -1 < x < 1 and -1 < y < 1
 
  • #5
exk
119
0
The expectation value for a random variable, say for example [tex]X^3 Y^2[/tex], is given by

[tex]E(X^3 Y^2) = \int dx dy f(x,y) x^3 y^2[/tex] if your distribution is already normalized else it's given by

[tex]E(X^3 Y^2) = \frac{\int dx dy f(x,y) x^3 y^2}{\int dx dy f(x,y)}[/tex]
Out of curiosity, why would she need to normalize it? From what I understand normalizing would be done to find the correlation matrix.
 
Last edited:
  • #6
Out of curiosity, why would she need to normalize it? From what I understand normalizing would be done to find the correlation matrix.
Well the expectation value/mean/average wouldn't be uniquely defined otherwise. It has nothing to do with the correlation matrix, it has to do with the fact that [itex]E(1) = \int f dA = P(\textup{entire domain}) = 1[/itex]. See, it's just one step from an axiom of probability theory.
 
  • #7
exk
119
0
Ah of course. I usually check that the pdf integrates to 1 over the domain (general case with classroom problems) and it slipped my mind that this may not be a case like that.
 

Related Threads for: How to work out Covariance ?

  • Last Post
Replies
4
Views
592
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
0
Views
1K
  • Last Post
Replies
20
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
3
Views
2K
Replies
3
Views
783
  • Last Post
Replies
3
Views
1K
Top