lec5v7_1up

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

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

Stat 104: Quantitative Methods for Economists Class 5: Correlation and Covariance, Portfolios 1

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

View Full Document
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.
20 10 nbeer Example Is the number of beers you can 3 200 150 100 0 weight drink related to your weight?

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

View Full Document
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.
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.

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

View Full Document
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
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 ?

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

View Full Document
( )( ) 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
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)

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

View Full Document
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 ?
Calculating Covariance in Stata 11 This is called a covariance matrix

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

View Full Document
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
s Covariance depends on the units! 13

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

View Full Document
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
Ask a homework question - tutors are online