DOC PREVIEW
UCLA STAT 100A - Covariance and Correlation

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

University of California, Los AngelesDepartment of StatisticsStatistics 100A Instructor: Nicolas ChristouCovariance and correlationLet random variables X, Y with means µX, µYrespectively. The covariance, denoted withcov(X, Y ), is a measure of the association between X and Y .Definition:σXY= cov(X, Y ) = E(X − µX)(Y − µY)Note: If X, Y are independent then E(XY ) = (EX)E(Y ) Therefore cov(X, Y ) = 0.Let W, X, Y, Z be random variables, and a, b, c, d be constants,• Find cov(a + X, Y )1• Find cov(aX, bY )• Find cov(X, Y + Z)• Find cov(aW + bX, cY + dZ)• Important:var(X + Y ) = var(X) + var(Y ) + 2cov(X, Y )Proof:2• Find var(aX + bY )• In general: Let X1, X2, · · · , Xnbe random variables, and a1, a2, · · · , anbe constants.Find the variance of the linear combination Y = a1X1+ a2X2+ · · · + anXn.• Example: Let X1, X2, X3be random variables with EX1= 1, EX2= 2, EX3=−1, var(X1) = 1, var(X2) = 3, var(X3) = 5, cov(X1, X2) = −0.4, cov(X1, X3) =0.5, cov(X2, X3) = 2. Let U = X1− 2X2+ X3. Find (a) E(U), and (b) var(U).3However, the covariance depends on the scale of measurement and so it is not easy to saywhether a particular covariance is small or large. The problem is solved by standardize thevalue of covariance (divide it by σXσY), to get the so called coefficient of correlation ρXY.ρ =cov(X, Y )σXσY, Always, −1 ≤ ρ ≤ 1, (see proof below).cov(X, Y ) = ρσXσYIf X, Y are independent then · · ·Show that −1 ≤ ρ ≤ 1:Let X, Y be random variables with variances σ2X, σ2Yrespectively. Examine the followingrandom expressions:XσX+YσYXσX−YσY4Example:X and Y are random variables with joint probability density functionfXY(x, y) = x + y, 0 ≤ x ≤ 1, 0 ≤ y ≤ 1. Find µX, µY, σ2X, σ2Y, cov(X, Y ), ρXY.5Example:Let X1, X2, · · · , Xnbe independent and identically distributed random variables having vari-ance σ2. Show that cov(Xi−¯X,¯X) = 0.6Portfolio risk and returnAn investor has a certain amount of dollars to invest into two stocks (I BM and T EXACO). A portion of the available funds will be invested intoIBM (denote this portion of the funds with a) and the remaining funds into TEXACO (denote it with b) - so a + b = 1. The resulting portfoliowill be aX + bY where X is the monthly return of IBM and Y is the monthly return of T EXACO. The goal here is to find the most efficientportfolios given a certain amount of risk. Using market data from January 1980 to February 2001 we compute that E(X) = 0.010, E(Y ) = 0.013,V ar(X) = 0.0061, V ar(Y ) = 0.0046, and Cov(X, Y ) = 0.00062.We first want to minimize the variance of the portfolio. This will be:Minimize Var(aX + bY )subject to a + b = 1OrMinimize a2V ar(X) + b2V ar(Y ) + 2abCov(X, Y )subject to a + b = 1Therefore our goal is to find a and b, the percentage of the available funds that will be invested in each stock. Substituting b = 1 − a into theequation 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 to a, set it equal to zero and solve for a. The result is:a =V ar(Y ) − Cov(X, Y )V ar(X) + V ar(Y ) − 2Cov(X, Y )and thereforeb =V ar(X) − Cov(X, Y )V ar(X) + V ar(Y ) − 2Cov(X, Y )The values of a and b are:a =0.0046 − 0.00620.0061 + 0.0046 − 2(0.00062)⇒ a = 0.42.and b = 1 − a = 1 − 0.42 ⇒ b = 0.58. Therefore if the investor invests 42% of the available funds into IBM and the remaining 58% into T EXACOthe variance of the portfolio will be minimum and equal to:V ar(0.42X + 0.58Y ) = 0.422(0.0061) + 0.582(0.0046) + 2(0.42)(0.58)(0.00062) = 0.002926.The corresponding expected return of this porfolio will be:E(0.42X + 0.58Y ) = 0.42(0.010) + 0.58(0.013) = 0.01174.We can try many other combinations of a and b (but always a + b = 1) and compute the risk and return for each resulting portfolio. This is shownin the table below and the graph of return against risk on the next page.a b Risk Return1.00 0.00 0.006100 0.010000.95 0.05 0.005576 0.010150.90 0.10 0.005099 0.010300.85 0.15 0.004669 0.010450.80 0.20 0.004286 0.010600.75 0.25 0.003951 0.010750.70 0.30 0.003663 0.010900.65 0.35 0.003423 0.011050.60 0.40 0.003230 0.011200.55 0.45 0.003084 0.011350.50 0.50 0.002985 0.011500.42 0.58 0.002926 0.011740.40 0.60 0.002930 0.011800.35 0.65 0.002973 0.011950.30 0.70 0.003063 0.012100.25 0.75 0.003201 0.012250.20 0.80 0.003386 0.012400.15 0.85 0.003619 0.012550.10 0.90 0.003899 0.012700.05 0.95 0.004226 0.012850.00 1.00 0.004600 0.013007●●●●●●●●●●●●●●●●●●●●●0.055 0.060 0.065 0.070 0.0750.0100 0.0105 0.0110 0.0115 0.0120 0.0125 0.0130Portfolio possibilities curveRisk (portfolio standard deviation)Expected return8Efficient frontier with three stocks> summary(returns)ribm rxom rboeingMin. :-0.2264526 Min. :-0.5219233 Min. :-0.345701st Qu.:-0.0515524 1st Qu.:-0.0172273 1st Qu.:-0.04308Median :-0.0089916 Median : 0.0007013 Median : 0.01843Mean : 0.0003073 Mean :-0.0011666 Mean : 0.010793rd Qu.: 0.0462550 3rd Qu.: 0.0337488 3rd Qu.: 0.07357Max. : 0.3537987 Max. : 0.2269380 Max. : 0.17483> cov(returns)ribm rxom rboeingribm 9.930174e-03 0.001798962 3.020685e-05rxom 1.798962e-03 0.006743820 1.781462e-03rboeing 3.020685e-05 0.001781462 8.282167e-03Portfolio possibilities curve with 3


View Full Document

UCLA STAT 100A - Covariance and Correlation

Download Covariance and Correlation
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Covariance and Correlation and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Covariance and Correlation 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?