covariance and correlation Flashcards
name two measures of association
covariance and correlation
when looking for a single number to describe the relationship between two variables, you would presume that the joint probability would be enough but, if you need a deeper look you need covar and corr.
how do you examine covariance for variables X and Y ?
you look at this
COV(X,Y) =
(X-meanx) . (Y-meany)
if its positive then they are both either + / -
if its negative one is + and one is -
how do you calculate sample covariance ?
Sx,y = sum of ( (xi-smean) . (yi-smean) / n-1 )
list some properties of covariance
can be altered by multiplication of a constant
COV(aX + c , bY + d)= abCOV(X,Y)
although it does reduce the usefulness as cov relies on scale
bounded by the product of the two variables standard deviations
if X and Y are independent what is the covariance ?
COV = 0
how do you calculate the correlation coefficient for
a. population
b. sample
a. CORR(X,Y) = cov/stdev1 .stdev2
b. samplecovar/ sx.sy
list some properties of CORR?
invariant to units always same sign as COV bounded by -1 and 1 when corr=0, un correlated corr=1 perfectly positively corr=-1 perfectly negatively
how do you use joint probability to test for independence ?
only independent when the joint probability = the product of the marginal probabilities
if X and Y are independent
E(XY) = E(X) . E(Y) and COV =0