Download presentation
Presentation is loading. Please wait.
1
Econometrics Economics 360
4/29/2019 Frank Westhoff 313 Converse Hall EViews Computer Assistance Sunday and Tuesday – 7:00-9:00 PM Economics Computer Lab – Converse 311 Help Sessions Sunday and Tuesday – 7:00-9:00 PM Converse 308
2
Lecture 1 Preview: Descriptive Statistics
Describing a Single Data Variable Introduction to Distributions Measure of the Distribution’s Center. Mean (Average) Measures of the Distribution’s Spread. Variance and Standard Deviation Histogram. Visual Illustration of a Data Variable’s Distribution Describing the Relationship between Two Data Variables Scatter Diagram: Visual Illustration of How Two Data Variables Are Related Correlation and Independence of Two Variables Measures of Correlation: Covariance and the Correlation Coefficient Correlation and Causation Arithmetic of Means, Variances, and Covariances
3
Descriptive Statistics: Describing a Single Variable
“June is the wettest month of the summer,” “April is the wettest month of the year,” “The summer of 2012 was the hottest summer on record,” etc. How can we assess statements like this? Amherst Monthly Precipitation Data: 1901 to 2000 Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec In the 20th century, which summer month was the wettest? There is just too much information to digest. The table includes to much detail; it overwhelms us. We need a way to summarize the information.
4
Measure of the Distribution Center: Mean (Average)
Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Mean for June = 3.78 More generally, where T = Total Number of Observations x1 = Value of the first observation (June 1901) = .75 x2 = Value of the second observation (June 1902) = 4.54 x3 = Value of the second observation (June 1903) = 7.79 xT = Value of the last (Nth) observation (June 2000) = 7.99
5
EViews Monthly Mean Precipitation for Summer Months Jun Jul Aug Mean
Based on the mean, August is the wettest month of the summer in the 20th century. Measures of the Distribution Spread: Variance and Standard Deviation: Question: Why are we interested in the spread of a distribution? Growing Season Precipitation: 1951 and 1998 Year Apr May Jun Jul Aug Mean 3.47 3.68 Which growing season was better? Arguably, 1951 was a better growing season because precipitation was more consistent; there was less spread in 1951. Question: How can we measure the spread of a distribution? 5
6
Calculating the Variance for 1998
Growing Season Precipitation: 1951 and 1998 Year Apr May Jun Jul Aug Mean Distribution Variance: A Measure of the Distribution’s Spread. Steps in calculating the variance: For each month, calculate the amount by which that month’s precipitation deviates from the mean. For each month, square the deviation. Calculate the average of the squared deviations; that is, sum the squared deviations and divide by the number of months, 5 in this case. Calculating the Variance for 1998 Month Precipitation Mean Apr May Jun Jul Aug Deviation From Mean Squared Deviation 2.79 – 3.68 = 0.89 0.7921 3.50 – 3.68 = 0.18 0.0324 8.60 – 3.68 = 2.06 – 3.68 = 1.62 2.6244 1.45 – 3.68 = 2.23 4.9729 Sum of Squared Deviations = = = 2.55
7
Calculating the Variance for 1951
Summary: In 1951, Variance = and Standard deviation = 0.43 In 1998, Variance = and Standard deviation = 2.55 Small spread Large spread All deviations are small Some deviations are large All squared deviations are small Some squared deviations are large Variance small Variance large
8
Equations for the Variance and Standard Deviation
Steps in calculating the variance: For each month, calculate the amount by which that month’s precipitation deviates from the mean. For each month, square the deviation. Calculate the average of the squared deviations; that is, sum the squared deviations and divide by the number of months. Var[x] where T = Total Number of Observations Why do we take the trouble of calculating the standard deviation? The units of the variance are inches squared. The units of the standard deviation are inches. Consequently, the units of the standard deviation are the same as the units of original data.
9
Histogram: Visual Illustration of a Variable’s the Distribution of Values
Each bar of the histogram reports on the number of months in which precipitation fell within the specified range. In 3 years, there was less than 1 inch of rain during September. In 18 years, there was between 1 and 2 inches of rain during September. In 26 years, there was between 2 and 3 inches of rain during September. In 19 years, there was between 3 and 4 inches of rain during September.
10
Descriptive Statistics: The Relationship between Two Variables
Scatter Diagram: Visual Illustration of How Two Variables Are Related Monthly Percentage Growth Rate of Dow Jones Industrial Average Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Monthly Percentage Growth Rate of NASDAQ Composite Average Year Jan Feb Mar Apr May Each point on the scatter diagram represents the growth rate of the Dow and the growth rate of the Nasdaq for one specific month.
11
Independence and Correlation
What can we say about the growth rates of the Dow Jones and Nasdaq? In most months, when the Dow Jones growth rate is positive, the Nasdaq growth rate is positive also. In most months, when the Dow Jones growth rate is negative, the Nasdaq growth rate is negative also. Knowing one growth rate helps us predict the other. Intuition of Independence and Correlation Two variables are not independent, that is, two variables are correlated, Two variables are independent, that is two variables are uncorrelated, The value of one variable helps us predict the value of the other. The value of one variable does not help us predict the value of the other. The Dow Jones growth rate and the Nasdaq growth rate are not independent, they are correlated. Question: How can we make the notion of independence and correlation more rigorous? Answer: The covariance and the correlation coefficient.
12
Covariance Steps to Calculate Covariance
For each observation, calculate the amount by which variable x deviates from its mean and the amount by which variable y deviates from its mean. For each observation, multiply x’s deviation by y’s deviation. Calculate the average of these products; that is, sum the products of the deviations and divide by the number of observations. Summarize these Steps with an Equation
13
Covariance and Scatter Diagrams
Scatter diagram of the deviation of x from its mean and the deviation of y from its mean. Focus of the covariance term for one observation, observation t. For the observations in the 1st Quadrant: the x deviation is positive and the y deviation is positive. Quadrant II Quadrant I The covariance term will be positive. 2nd Quadrant: the x deviation is negative and the y deviation is positive. The covariance term will be negative. Quadrant III Quadrant IV 3rd Quadrant: the x deviation is negative and the y deviation is negative. The covariance term will be positive. 4th Quadrant: the x deviation is positive and the y deviation is negative. Summary: The scatter diagram of the deviations from the means allows us to determine the sign of the covariance terms. The covariance term will be negative. Covariance term positive in I and III. Covariance term negative in II and IV.
14
Scatter Diagram: The deviation of Dow Jones growth from its mean versus the deviation of Nasdaq growth from its mean: Quadrant II Quadrant I Covariance term positive in I and III. Quadrant III Quadrant IV Covariance term negative in II and IV. What is the sign of the covariance? More than half the observations are either in quadrant I or III; hence, more than half of the covariance terms are positive. Question: Does the Dow Jones growth rate help you predict the Nasdaq growth rate? Less than half the covariance terms are either in quadrant II or IV; hence, less than half of the covariance terms are negative. Answer: Yes. The two variables are not independent, they are correlated. EViews Summary: When two variables are not independent, when they are correlated, their covariance is not 0. The covariance should be positive. The covariance equals
15
Scatter Diagram: The deviation of Precipitation from its mean and the deviation of Nasdaq growth from its mean: Quadrant II Quadrant I Covariance term positive in I and III. Quadrant III Quadrant IV Covariance term negative in II and IV. What is the sign of the covariance? About half the observations are either in quadrant I or III; hence, about half of the covariance terms are positive. Question: Does precipitation in Amherst help you predict the Nasdaq growth rate? About half the covariance terms are either in quadrant II or IV; hence, about half of the covariance terms are negative. Answer: No. The two variables are independent. Summary: When two variables are independent or uncorrelated their covariance is 0. EViews The covariance should be about 0. The covariance equals .91 0.
16
The “Downside” of Covariance: The covariance has no natural range.
Not independent: (Positively) Correlated Independent: Uncorrelated Cov = 0 Cov = .91 0 In general, how can we decide when the covariance is small and when it is large? The “Downside” of Covariance: The covariance has no natural range. The covariance has no natural range; its magnitude depends on the units used. Question: What if we were to measure precipitation, the “x variable,” in centimeters rather than inches? Answer: xi’s up by by a factor of up by a factor of ’s up by a factor of 2.54. Cov[x, y] up by a factor of 2.54 What should we do?
17
Correlation Coefficient
Numerator: Up by a factor of 2.54 Denominator: Up by a factor of 2.54 The denominator is positive. How are the covariance and correlation coefficient similar? The sign of covariance and the sign of the correlation coefficient are the same. How do the covariance and correlation coefficient differ? Two important ways: Correlation Coefficient Is Unaffected by the Choice of Units Question: Again, what if we were to measure precipitation, the “x variable,” in centimeters rather than inches? What happens to Var[x]? What happens to Cov[x, y]? Cov[x, y],up by a factor of 2.54. Both the numerator and denominator of CorrCoef[x, y] increase by a factor of 2.54 CorrCoef[x, y] remains constant.
18
How do the covariance and correlation coefficient differ – continued?
Correlation Coefficient Has a Limited Range: –1 to +1. Consequently, the correlation coefficient reflects the magnitude of the correlation. To illustrate that the correlation coefficient has a limited range, we shall consider the two polar cases: Perfect positive correlation. Perfect negative correlation. 18
19
What does Cov[x, y] equal?
To show that the correlation coefficient lies between –1 and +1, we consider two polar cases. An Example of Perfect Positive Correlation: The two variables have identical values: What does Var[y] equal? What does Cov[x, y] equal? Var[y] = Var[x] Cov[x, y] = Var[x]
20
What does Cov[x, y] equal?
An Example of Perfect Negative Correlation: One variable is the negative of the other: What does Cov[x, y] equal? What does Var[y] equal? Cov[x, y] = Var[x] Var[y] = Var[x]
21
Uncorrelated: Knowing one variable does not help us predict the other.
Summary Scatter Diagrams, of Deviations From Means, Covariance, and Correlation Coefficient Independent. Not independent. Uncorrelated: Knowing one variable does not help us predict the other. Positively correlated: Knowing one variable helps us predict the other. Cov = .91 0 Cov = 19.61 CorrCoef = .07 0 CorrCoef = .67 EViews
22
Arithmetic of Means, Variances, and Covariances
Mean of the sum of a constant and a variable: Mean[c + x] = c + Mean[x] Mean of the product of a constant and a variable: Mean[cx] = cMean[x] Mean of the sum of two variables: Mean[x + y] = Mean[x] + Mean[y] Variance of the sum of a constant and a variable: Var[c + x] = Var[x] Variance of the product of a constant and a variable: Var[cx] = c2Var[x] Variance of the sum of two variables: Var[x + y] = Var[x] + 2Cov[x, y] + Var[y] Variance of the sum of two independent variables: Var[x + y] = Var[x] + Var[y] Covariance of the sum of a constant and a variable: Cov[c + x, y] = Cov[x, y] Covariance of the product of a constant and a variable: Cov[cx, y] = c Cov[x, y]
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.