Transcription of Covariance and correlation - Main Concepts
1 Covariance and correlationLet random variablesX,Ywith means X, Yrespectively. The Covariance , denoted withcov(X,Y), is ameasure of the association :cov(X,Y) =E(X X)(Y Y)This can be simplified as follows:cov(X,Y) =E(X X)(Y Y) =E(XY) YE(X) XE(Y) + X YTherefore,cov(X,Y) =E(XY) (EX)(EY)Note: IfX,Yare independent thenE(XY) = (EX)E(Y) Thereforecov(X,Y) = ,X,Y,Zrandom variables, anda,b,c,dconstants: Findcov(a+X,Y)cov(a+X,Y) =E(a+X a+X)(Y Y) =E(a+X X a)(Y Y)Therefore,cov(a+X,Y) =cov(X,Y). Findcov(aX,bY)cov(aX,bY) =E(aX aX)(bY bY) =E(aX a X)(bY b Y)Therefore,cov(aX,bY) =abE(X X)(Y Y) =ab cov(X,Y) Findcov(X,Y+Z)cov(X,Y+Z) =E(X X)(Y Y+Z) =E(X X)(Y+Z Y Z)Orcov(X,Y+Z) =E(X X)(Y Y+Z Z) =E(X X)(Y Y) +E(X X)(Z Z)Therefore,cov(X,Y+Z) =cov(X,Y) +cov(X,Z) Using the results above we can findcov(aW+bX,cY+dZ).cov(aW+bX,cY+dZ) =ab cov(W,Y) +ad cov(W,Z) +bc cov(X,Y) +bd cov(X,Z) correlation :However, the Covariance depends on the scale of measurement and so it is not easy to say whether aparticular Covariance is small or large.
2 The problem is solved by standardize the value of Covariance (divide it by X Y), to get the so called coefficient of correlation XY. =cov(X,Y) X Y,Always, 1 1cov(X,Y) = X YIfX,Yare independent then XY= 01 Important:var(X+Y) =var(X) +var(Y) + 2cov(X,Y)Proof: Findvar(aX+bY) In general: LetX1,X2, ,Xnbe random variables, anda1,a2, ,anbe constants. Find the varianceof the linear combinationY=a1X1+a2X2+ + risk and returnAn investor has a certain amount of dollars to invest into two stocks (IBMandT EXACO). A portion of the available fundswill be invested into IBM (denote this portion of the funds witha) and the remaining funds into TEXACO (denote it withb)- soa+b= 1. The resulting portfolio will beaX+bY, whereXis the monthly return ofIBMandYis the monthly returnofT EXACO. The goal here is to find the most efficient portfolios given a certain amount of risk. Using market data fromJanuary 1980 until February 2001 we compute thatE(X) = ,E(Y) = ,V ar(X) = ,V ar(Y) = , andCov(X, Y) = first want to minimize the variance of the portfolio.
3 This will be:Minimize Var(aX+bY)subject toa+b= 1 OrMinimizea2V ar(X) +b2V ar(Y) + 2abCov(X, Y)subject toa+b= 1 Therefore our goal is to findaandb, the percentage of the available funds that will be invested in each stock. Substitutingb= 1 ainto the equation of the variance we geta2V ar(X) + (1 a)2V ar(Y) + 2a(1 a)Cov(X, Y)To minimize the above exression we take the derivative with respect toa, set it equal to zero and solve fora. The result is:a=V ar(Y) Cov(X, Y)V ar(X) +V ar(Y) 2 Cov(X, Y)and thereforeb=V ar(X) Cov(X, Y)V ar(X) +V ar(Y) 2 Cov(X, Y)The values ofaandbare:a= + 2( ) a= 1 a= 1 b= Therefore if the investor invests 42% of the available funds intoIBMand the remaining58% intoT EXACOthe variance of the portfolio will be minimum and equal to:V ar( + ) = ( ) + ( ) + 2( )( )( ) = corresponding expected return of this porfolio will be:E( + ) = ( ) + ( ) = can try many other combinations ofaandb(but alwaysa+b= 1) and compute the risk and return for each resultingportfolio.
4 This is shown in the table below and the graph of return against risk on the other possibilities curveRisk (portfolio standard deviation)Expected return4 Efficient frontier with three stocks> summary(returns)ribm rxom rboeingMin. Min. Min. Qu. 1st Qu. 1st Qu. Median : Median : : Mean Mean : Qu.: 3rd Qu.: 3rd Qu.: : Max. : Max. : > cov(returns)ribm rxom rboeingribm possibilities curve with 3 (standard deviation)Expected return5