The Correlatio of Two Rado Variables Page Preliiary: The Cauchy-Schwarz-Buyakovsky Iequality For ay two sequeces of real ubers { a } ad = { b } =, the followig iequality is always true. Furtherore, equality holds if ad oly if there eists soe costat c such that for every, a = cb. If A a, a,, a a b ab a b = = = = = = ad B = b, b,, b, this is the stateet that for two vectors, A B Ai B A B, with equality if ad oly if the vectors are parallel. Proof: Suppose all of the b = 0. The every epressio i the iequality is zero, a 0( b = ad the stated result is true. Now suppose that at least oe of the b 0, the b > 0 = f ( λ = ( a λab + λ b = a + λ b λ ab = = = =. For real λ, defie the oegative quadratic fuctio f ( λ = ( a λb o λ. =.. Now, coplete the square ( ab = = = b = ab ab ab = = = a b b λ λ = = = b b b = = = ab ab = = a b λ = = b b = = f λ = a + b λ λ = + + = + Al Lehe Madiso Area Techical College 0/5/04
The Correlatio of Two Rado Variables Page 0 = = = ab a b ab = = = = f ( λ0 = a = 0 = b b = = a b ab 0 or ab a b = = = = = = Now, λ ab b roots a b ab a b = = = = = is the absolute iiu of the oegative fuctio f ( λ.. Hece. Equality requires that (, so that upo takig square squares or real ubers is zero if ad oly if each ter is zero. Therefore 0 = 0 = 0 = 0 = f λ a λ b a λ b with the costat c beig λ 0. ( ( Covariace ad Correlatio: f λ =, but a su of 0 0 Let ad y be two discrete rado variables: takes o the values through, while y takes o the values y through y. The probability of the itersectio of the evets = i ad y = y is give by the value of the oit probability desity fuctio,,, 0 f, y = f, y =. f ( i y. It ust be true that f ( i y ad ( i ( i The probability of the evet probability of the evet y i= = = i= = i is give by f ( i f ( i, y = y f y f i, y i= = is give by ( ( = ad siilarly the =. The eas ad variaces of the two rado variables are coputed as follows: μ = = f, y = f, y = f μ ( ( ( i i i i i i i= = i= = i= y = y = y f i, y = y f i, y = y f y i= = = i= i= ( ( ( Al Lehe Madiso Area Techical College 0/5/04
The Correlatio of Two Rado Variables Page 3 = = i i = i i i= = i= = = ( i μ f ( i = i= y = y y = y y f i, y = y y f i, y i= = = i= = ( y μy f ( y = y y = ( ( f (, y ( f (, y σ μ μ μ ( ( ( ( ( σ μ μ μ The covariace of the two rado variables easures how deviatios i oe variable accopay the deviatios of the secod variable. If the covariace of ad y is positive it eas that o the average positive deviatios of fro its ea are associated with positive deviatios of y fro its ea ad egative deviatios of fro its ea are associated with egative deviatios of y fro its ea. If the covariace of ad y is egative it eas that o the average positive deviatios of fro its ea are associated with egative deviatios of y fro its ea ad egative deviatios of fro its ea are associated with positive deviatios of y fro its ea. The covariace is calculated as follows: cov ( y, = ( μ( y μy = ( i μ( y μy f( i, y i= = = ( y i μy μyi + μμy f( i, y i= = = + i= = i= = i= = i= = = y μ y μy + μμy = y μμy = y y iy f ( i, y μy f ( i, y μyi f ( i, y μμy f ( i, y To ivestigate the rage of values of the covariace, defie the followig oe to oe oto ap fro { k} k= to {} { } i i= : = k = od ( k, + ad i = +. Usig this ap we ca defie the followig two diesioal vectors. V = f i y i μ (, ( ad Vy = f ( i, y( y μy. This yields real vectors sice the probability desity ust be positive. A ore eplicit represetatio is give below. Al Lehe Madiso Area Techical College 0/5/04
The Correlatio of Two Rado Variables Page 4 (, ( μ f y f (, y( μ f (, y ( μ f (, y( μ V f (, y( μ = f (, y ( μ f (, y ( μ f (, y ( μ (, ( μy (, ( μy f y y f y y f (, y ( y μ y f (, y( y μ y V f (, y( y y y = μ f (, y ( y μ y f (, y( y μy f (, y ( y μy For eaple, if = 6 ad =, k rus fro to 66. The uique (, i pair associated 39 3 with k = 39 would be = od ( 38, 6 + = + = 3 ad i = + = 7. Thus, the thirtyith etry i the sity-sith diesioal vector correspods to the third etry i the 6 seveth group of 6, i.e., the first rado variable takes o the value 7 ad the secod rado variable takes o the value y 3. Thus, ( V = f ( 7, y3( 7 μ ad ( Vy f ( 7, y3( y3 μy Now, 39 Siilarly, =. V ivy = V Vy = f i y i f i y y y k= i= = = f ( i, y( i μ( y μy = cov(, y i= = 39 V iv = V V = f i y i f i y i k= i= = = f ( i, y( i μ = σ i= = Al Lehe Madiso Area Techical College 0/5/04
The Correlatio of Two Rado Variables Page 5 VyiVy = Vy Vy = f i y y y f i y y y k= i= = = f ( i, y( y μy = σy i= = Hece, = = = V V i V σ σ ad y = yi y = y = y V V V σ σ. Fially, fro the Cauchy-Schwarz- Buyakovsky iequality, σσy cov( y, σσy. This leads to defiig a diesioless easure of coordiatio betwee two rado variables called cov(, y the correlatio coefficiet ad desigated by ρ ( y, =. So it is always true that σσy the correlatio coefficiet is betwee - ad. If the two rado variables are idepedet, the f ( i, y f( i f ( y = ad y = iy f ( i, y = iy f( i f ( y = i f( i y f ( y = y i= = i= = i= = Hece, cov ( y, = y y = 0 ad so ( y ρ, = 0.Thus, idepedet rado variables are always ucorrelated! However, the coverse does ot follow. It is possible for depedet variables to be ucorrelated. Thus, zero correlatio is a ecessary but ot sufficiet coditio for idepedece. Al Lehe Madiso Area Techical College 0/5/04