Presentation is loading. Please wait.

Presentation is loading. Please wait.

Econ 488 Lecture 2 Cameron Kaplan. Hypothesis Testing Suppose you want to test whether the average person receives a B or higher (3.0) in econometrics.

Similar presentations


Presentation on theme: "Econ 488 Lecture 2 Cameron Kaplan. Hypothesis Testing Suppose you want to test whether the average person receives a B or higher (3.0) in econometrics."— Presentation transcript:

1 Econ 488 Lecture 2 Cameron Kaplan

2 Hypothesis Testing Suppose you want to test whether the average person receives a B or higher (3.0) in econometrics. The Null Hypothesis (H 0 ): Usually trying to reject this:  H 0 : µ =3.0

3 Hypothesis Testing Alternative Hypothesis (H A or H 1 ): The null hypothesis is not true  H A : µ ≠3.0 (two-sided)  Or H A : µ >3.0 (one-sided) Usually we pick the two sided test unless we can rule out the possibility that µ >3.0

4 Hypothesis Testing Suppose we conduct a sample of 20 former econometrics students we found:  Sample Mean = 3.30  Standard Deviation = 0.25 How likely is it that a sample of 20 would give a sample average of 3.30 if the population average was really 3.0?

5 Hypothesis Testing When we estimate x-bar using an estimated standard error we need to use the t- distribution

6 Hypothesis Testing Test Statistic: Significance Level - Most common is 5% or 1%.

7 5 % significance level If  really was 3.0, what values of t would give us a test that would reject the null when it’s correct only 5% of the time? If  really was 3.0, what values of t would give us a test that would reject the null when it’s correct only 5% of the time?

8 Hypothesis Testing We have a sample size of 20 Thus we have N-1 = 20-1 = 19 degrees of freedom. Look in t-table t* = 2.093 So if our value of t is greater than 2.093 OR less than -2.093, we should reject the null hypothesis

9 Hypothesis testing So, we should reject the null

10 P-value Suppose we want to know: if the average student really got a 3.0, how likely would it be for us to observe a value at least as far from 3.0 as we did in our sample? In other words, if  = 3.0, how likely is it that when we draw a sample of 20 that we would get a sample mean of 3.3 or greater (or 2.7 or less)?

11 P-value We want to know the probability that t>5.366 Can’t look up in most tables, but most stats software gives it to you. In this case, p=0.000035 In other words if the null were true, we would only get a value that extreme 0.0035% of the time (1 out of 29,000 times) This is strong evidence that we should reject the null.

12 P-value If p-value is smaller than the significance level, reject null. P-value is nice, because if you are given p-value, you don’t have to look anything else up in a table. Smaller p-values mean null hypothesis is less likely to be true.

13

14 Bias A biased sample is a sample that differs significantly from the population.

15 Common Types of Bias Selection Bias Sample systematically excludes or underrepresents certain groups. e.g. calculating the average height of US men using data from medicare records We are systematically excluding the young, who may be different for many reasons.

16 Common Types of Bias Self-Selection Bias/Non-Response Bias Bias that occurs when people choose to give certain information. e.g. ads to participate in medical studies e.g. calculating average CSUCI GPA by asking students to volunteer to let us look at their transcripts.

17 Common Types of Bias Survivor Bias Suppose we are looking at the historical average performance of companies on the NYSE, and wanted to know how that was related to CEO pay. One problem that we might have is that we might only look at companies that are still around. We are excluding companies that went out of business.

18 Review of Regression Regression - Attempt to explain movement in one variable as a function of a set of other variables Example: Are higher campaign expenditures related to more votes in an election?

19 Review of Regression Dependent Variable - Variable that is observed to change in response to the independent variable e.g. share of votes in the election Independent Variable(s) (AKA explanatory variable) - variables that are used to explain variation in dependent variable. e.g. campaign expenditures.

20 Review of Regression Example: Demand Quantity is dependent variable Price, Income, Price of compliments, Price of Substitutes are all independent variables.

21 Simple Regression Y =  0 +  1 X Y: Dependent Variable X: Independent Variable  0 : Intercept (or Constant)  1 : Slope Coefficient

22 Simple Regression Y X 00 11

23  1 is the response of Y to a one unit increase in X  1 =  Y/  X When we look at real data, the points aren’t all on the line

24 Simple Regression Y X

25 How do we deal with this? By adding a stochastic error term to the equation. Y =  0 +  1 X +  Deterministic Component Stochastic Component

26 Simple Regression Y X  0 +  1 X 

27 Why do we need  ? 1.Omitted Variables 2.Measurement Error 3.The underlying relationship may have a different functional form 4.Human behavior is random

28 Notation There are really N equations because there are N observations. Y i =  0 +  1 X i +  i (i=1,2,…,N) E.g. Y 1 =  0 +  1 X 1 +  1 Y 2 =  0 +  1 X 2 +  2 … Y N =  0 +  1 X N +  N

29 Multiple Regression We can have more than one independent variable Y i =  0 +  1 X 1i +  2 X 2i +  3 X 3i +  I What does  1 mean? It is the impact of a one unit increase in X 1 on the dependent variable (Y), holding X 2 and X 3 constant.

30 Steps in Empirical Economic Analysis 1.Specify an economic model. 2.Specify an econometric model. 3.Gather data. 4.Analyze data according to econometric model. 5.Draw conclusions about your economic model.

31 Step 1: Specify an Economic Model Example: An Economic Model of Crime Gary Becker Crimes have clear economic rewards (think of a thief), but most criminal behavior has economic costs. The opportunity cost of crime prevents the criminal from participating in other activities such as legal employment, In addition, there are costs associated with the possibility of being caught, and then, if convicted, there are costs associated with being incarcerated.

32 Economic Model of Crime y=f(x 1, x 2, x 3, x 4, x 5, x 6, x 7 ) y=hours spent in criminal activity x 1 =“wage” for an hour spent in criminal activity x 2 =hourly wage in legal employment x 3 =income from sources other than crime/employment x 4 =probability of getting caught x 5 =probability of being convicted if caught x 6 =expected sentence if convicted x 7 =age

33 Economic Model of Education What is the effect of education on wages? wage=f(educ,exper,tenure) educ=years of education exper=years of workforce experience tenure=years at current job

34 Step 2: Specify an econometric model In the crime example, we can’t reasonably observe all of the variables e.g. the “wage” someone gets as a criminal, or even the probability of being arrested We need to specify an econometric model based on observable factors.

35 Econometric Model of Crime crime i =  0 +  1 wage i +  2 othinc i +  3 freqarr i +  4 freqconv i +  5 avgsen i +  6 age i +  I crime = some measure of frequency of criminal activity wage = wage earned in legal employment othinc = income earned from other sources freqarr = freq. of arrests for prior infractions

36 Econometric Model of Crime crime i =  0 +  1 wage i +  2 othinc i +  3 freqarr i +  4 freqconv i +  5 avgsen i +  6 age i +  I freqconv = frequency of convictions avgsen = average length of sentence age= age in years  = stochastic error term

37 Econometric Model of Crime The stochastic error term contains all of the unobserved factors, e.g. wage for criminal activity, prob of arrest, etc. We could add variables for family background, parental education, etc, but we will never get rid of 

38 Wage and Education wage i =  0 +  1 educ i +  2 exper +  3 tenure i +  I What are the signs of the betas? Run Regression in Gretl! (wage1.gdt)

39 Step 3: Gathering Data Types of Data: Cross-Sectional Data Time Series Data Pooled Cross Sections Panel/Longitudinal Data

40 Cross-Sectional Data A sample of individuals, households, firms, cities, states, or other units, taken at a given point in time Random Sampling Mostly used in applied microeconomics Examples  General Social Survey  US Census  Most other surveys

41 Cross-Sectional Data Obswageeducexperfemalemarried 13.1011210 23.24122211 36.0011301 ……………… 5253.5016400 5264.2514510

42 Time Series Data Observations on a variable or several variables over time E.g. stock prices, money supply, CPI, GDP, annual homicide rates, etc. Because past events can influence future events, and lags in behavior are common in economics, time is an important dimension of time-series

43 Time Series Data More difficult to analyze than cross- sectional data Observations across time are not independent May also have to control for seasonality

44 Time Series Data Obsyearavgminavgcovunempgnp 119500.2020.115.4878.7 219510.2120.716.0925.0 319520.2322.614.81015.9 ……………… 3719863.3558.118.94281.6 3819873.3558.216.84496.7

45 Pooled Cross-Sections Both time series and cross-sectional features Suppose we collect data on households in 1985 and 1990 We can combine both of these into one data set by creating a pooled cross-section Good if there is a policy change between years Need to control for time in analysis

46 Pooled Cross-Sections Obsyearhpriceproptax 1199385,50042 2199367,30036 ………… 2501993134,00041 251199565,00016 2521995182,40020 ………… 520199557,20016

47 Panel/Longitudinal Data A panel data set consists of a time series for each cross-sectional member E.g. select a random sample of 500 people, and follow each for 10 years.

48 Panel Data obspersonidyearwagedinout 1119905.502 2119926.504 3119946.754 42199010.506 52199210.505 62199411.252 7319907.755 …………… 900300199415.002

49 Causality & Ceteris Paribus What we really want to know is: does the independent variable have a causal effect on the dependent variable But: Correlation does not imply causation Suppose we want to know if higher education leads to higher worker productivity

50 Causality and Ceteris Paribus If we find a relationship between education and wages, we don’t know much Why? What if highly educated people have higher IQs, and it’s really high IQ that leads to higher wages? If you give a random person more education, will they get higher wages?

51 Causality and Ceteris Paribus What we want to know is… Does higher education lead to higher wages ceteris paribus… holding all else constant We have to control for IQ, experience, gender, job training, etc. But we can’t control for everything!


Download ppt "Econ 488 Lecture 2 Cameron Kaplan. Hypothesis Testing Suppose you want to test whether the average person receives a B or higher (3.0) in econometrics."

Similar presentations


Ads by Google