# Math Help - variable dependency check

1. ## variable dependency check

hi,
i am a bit confused. i know how to check if two variables are not correlated.
but how do i check they are independent?
for instance i have x-y, max(,x,y)
i guess i should see if the probability of their mult. equals the multiplication of their probabilities. is there an elegant way to do it except for just calculating by hand each of the probabilities?

thanks

2. If X and Y are indepenent, then Cov(X,Y) = 0

3. Originally Posted by zhenyazh
hi,
i am a bit confused. i know how to check if two variables are not correlated.
but how do i check they are independent?
for instance i have x-y, max(,x,y)
i guess i should see if the probability of their mult. equals the multiplication of their probabilities. is there an elegant way to do it except for just calculating by hand each of the probabilities?

thanks
When dealing with random variables, rather than events, it's not as easy.

If you're dealing with 2 discrete random variables, X & Y, check that for any x,y, P(X=x,Y=y)=P(X=x)P(Y=y).

If you're dealing with 2 continuous random variables with pdf, X & Y, check that the joint probability density function is the product of X's pdf and Y's pdf.

Or you can use cumulative density functions as well : check that for all x,y, P(X $\leqslant$x,Y $\leqslant$ y)=P(X $\leqslant$x)P(Y $\leqslant$ y)

There's still other methods, including moment generating functions, among others (see wikipedia)

If you're looking for the independence of X-Y & max(X,Y), try to get to something related to X and Y in the first case.
In the second case, use a jacobian transformation.
In the third case, which is probably the better one for X-Y & max(X,Y), get to something related to X and Y : if max(X,Y)<m, then both X and Y are < m.

Originally Posted by statmajor
If X and Y are indepenent, then Cov(X,Y) = 0
Note that this is only useful if you want to prove that there's no indendence.
Indeed, the contrapositive of this statement is : if cov(X,Y)≠0, then X and Y are not independent.
But it's not useful if one wants to prove there's independence.

4. Originally Posted by Moo
Note that this is only useful if you want to prove that there's no indendence.
Indeed, the contrapositive of this statement is : if cov(X,Y)≠0, then X and Y are not independent.
But it's not useful if one wants to prove there's independence.
Forgot about that, thank you for correcting me.