lec5v7_1up - Stat 104: Quantitative Methods for Economists...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
Stat 104: Quantitative Methods for Economists Class 5: Correlation and Covariance, Portfolios 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The mean and sd help us summarize a bunch of numbers which are measurements of just one thing. A fundamental and totally different question is how one thing relates to another. Covariance and correlation 2 Previously, we used a scatterplot to look at two things: the mean and sd of different assets. In this section of the notes we look at scatterplots and how correlation can be used to summarize them.
Background image of page 2
20 10 nbeer Example Is the number of beers you can 3 200 150 100 0 weight drink related to your weight?
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
In general we have observations ( , ) x y i i Our data looks like: x y i 12.0 192 1 the ith observation is a pair of numbers 4 12.0 160 2 5.0 155 3 5.0 120 4 7.0 150 5 13.0 175 6 4.0 100 7 12.0 165 8 ....... The plot enables us to see the relationship between x and y.
Background image of page 4
In the beer example, it does look like there is a relationship. Even more, the relationship looks linear in that it looks like we could draw a line through the plot to capture the pattern. Covariance and correlation summarize how strong a linear relationship there is between two variables. 5 In the example weight and nbeers were the two variables. In general we think of them as x and y.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Covariance Consider two variables, X and Y. The concept of covariance asks: Is Y larger (or smaller) when X is larger ? 6 We measure this using something called covariance Covariance > 0 Larger X Larger Y Covariance < 0 Larger X Smaller Y xy s
Background image of page 6
The sample covariance between x and y is: n Here is the actual formula but you will never calculate covariance by hand……… 7 s n x x y y xy i i i = - - - = 1 1 1 ( )( ) What are the units of covariance ?
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
( )( ) i i x x y y - - ( )( ) i i x x y y - - ( )( ) i i x x y y - - ( )( ) i i x x y y - - x y s n x x y y xy i i i n = - - - = 1 1 1 ( )( ) Understanding covariance 8 ( )( ) i i x x y y - - ( )( ) i i x x y y - - ( )( ) i i x x y y - - ( )( ) i i x x y y - - x y ( )( ) i i x x y y - - ( )( ) i i x x y y - - ( )( ) i i x x y y - - ( )( ) i i x x y y - - x y
Background image of page 8
In this example, we look at the relationship between team payroll and team performance in Major League Baseball using data from the 2004 season (for a total of 30 teams). The variables of interest: ayroll am payroll (in millions of dollars) 9 Payroll team payroll (in millions of dollars) WinPct team winning percentage (e.g., 0.543 means 54.3% of games were won)
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The Data .3 .4 .5 .6 .7 winpct 0 50 100 150 200 payroll 10 Would you say the covariance is positive, negative or zero ?
Background image of page 10
Calculating Covariance in Stata 11 This is called a covariance matrix
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The Covariance Matrix s It turns out that Cov(X,X)=Var(X). Weird, I know. s So: Variance of WinPct 12 Variance of Payroll Covariance of WinPct and Payroll 32.82*32.82=1077.34
Background image of page 12
s Covariance depends on the units! 13
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/27/2012 for the course STATS 104 taught by Professor Michaelparzen during the Fall '11 term at Harvard.

Page1 / 51

lec5v7_1up - Stat 104: Quantitative Methods for Economists...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online