Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 :...

64
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing University Sep. 18th, 2017 Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 1 / 56

Transcript of Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 :...

Page 1: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Introduction to EconometricsLecture 2 : Causal Inference and Random Control Trails(RCT)

Zhaopeng Qu

Business School,Nanjing University

Sep. 18th, 2017

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 1 / 56

Page 2: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Outlines

1 Random Experiment as the Research Design:Program EvaluationEconometrics

2 Review of StatisticsPopulation, Parameters and Random SamplingLarge-Sample Approximations to Sampling DistributionsStatistical Inference: Estimation, Confident Intervals and TestingInterval Estimation and Confidence IntervalsHypothesis TestingComparing Means from Different Populations

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 2 / 56

Page 3: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Outlines

1 Random Experiment as the Research Design:Program EvaluationEconometrics

2 Review of StatisticsPopulation, Parameters and Random SamplingLarge-Sample Approximations to Sampling DistributionsStatistical Inference: Estimation, Confident Intervals and TestingInterval Estimation and Confidence IntervalsHypothesis TestingComparing Means from Different Populations

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 2 / 56

Page 4: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Random Experiment as the Research Design:Program Evaluation Econometrics

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 3 / 56

Page 5: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Random Assignment Solves the Selection Problem

Think of causal effects in terms of comparing counterfactuals orpotential outcomes. However, we can never observe bothcounterfactuals —fundamental problem of causal inference.To construct the counterfactuals, we could use two broadcategories of empirical strategies.

Random Controlled Trials/Experiments:it can eliminates selection bias which is the mostimportant bias arises in empirical research. If we couldobserve the counterfactual directly, then there is noevaluation problem, just simply difference.

The various approaches using naturally-occurring dataprovide alternative methods of constructing the propercounterfactual.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 4 / 56

Page 6: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Randomized Controlled Trials(RCT)

First recorded RCT was done in 1747 by James Lind,who was aScottish physician in the Royal Navy.Scurvy is a terrible disease caused by Vitamin C deficiency.Serious issue during long sea voyages.Lind took 12 sailors with scurvy and split them into six groups oftwo.Groups were assigned:

(1) 1 qt cider(苹果酒) (2) 25 drops of vitriol(硫酸)(3) 6spoonfuls of vinegar, (4) 1/2 pt of sea water, (5) garlic,mustard(芥末)and barley water(大麦汤), (6) 2 orangesand 1 lemon

Only Group 6 (citrus fruit) showed substantial improvement.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 5 / 56

Page 7: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Types of RCT

Lab Experimentseg: computer game for gamble in Lab

Field Experimentseg: the role of women in household’s decision or fakeresumes in job application

Quasi-Experiment or Natural Experiments: some unexpectedinstitutional change or natural shock

eg: Germany reunion, Great Famine in China and U.SBombing in Vietnam.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 6 / 56

Page 8: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Experiments and Publications

Figure:

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 7 / 56

Page 9: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

RCT are far from perfect!

High Costs, Long DurationPotential Ethical Problems: “Parachutes reduce the risk of injuryafter gravitational challenge, but their effectiveness has not beenproved with randomized controlled trials.”

Milgram ExperimentStanford Prison ExperimentMonkey Experiment

Limited generalizabilityRCTs allow us to gain knowledge about causal effects withoutknowing the mechanism.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 8 / 56

Page 10: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Potential Problems in Practice

Small sample: Student EffectHawthorne effect:The subjects are in an experiment can changetheir behavior.Attrition(样本流失):It refers to subjects dropping out of thestudy after being randomly assigned to the treatment or controlgroup.Failure to randomize or failure to follow treatment protocol:People don’t always do what they are told.

Wearing glasses program in Western Rural China.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 9 / 56

Page 11: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Program Evaluation Econometrics(项目评估计量经济学)

Question: How to do empirical research scientifically when we cannot do experiments? It means that we always have selection biasin our data, or in term of “endogeneity”.Answer: Build a reasonable counterfactual world by naturallyoccurring data to find a proper control group is the core ofeconometrical methods.Here you Furious Seven Weapons in Applied Econometrics(七种盖世武器)

1 Random Trials and OLS(随机实验)2 Decomposition(分解)3 Instrumental Variable(工具变量)4 Differences in Differences(双差分)5 Matching and Propensity Score(匹配)6 Regression Discontinuity(断点回归)7 Synthetic Control (合成控制法)

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 10 / 56

Page 12: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Program Evaluation Econometrics(项目评估计量经济学)

These Furious Seven are the most basic and popular methods inapplied econometrics and so powerful that

even if you just master one, you may finish your empiricalpaper and get a good score.if you master several ones, you could have opportunity topublish your paper.If you master all of them, you might to teach appliedeconometrics class just as what I am doing now.

We will introduce the essentials of these methods in the class asmany as possible. Let’s start our journey together.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 11 / 56

Page 13: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

微信签到 (实验),请扫码!

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 12 / 56

Page 14: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Review of Statistics

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 13 / 56

Page 15: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Population, Sample and i.i.d

A population is a collection of people, items, or events aboutwhich you want to make inferences.

Population always have a probability distribution.

A sample is a subset of population, which draw from populationin a certain way.To represent the population well, a sample should be randomlycollected and adequately large.

Infinite populationFinite population

With replacementWithout replacement: when the population size N is very large,compared with the sample size n, then we could say that they are nearlyindependent.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 14 / 56

Page 16: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Random Sample and i.i.dDefinitionThe r.v.s are called a random sample of size n from the populationf(x) if X1, ...,Xn are mutually independent and have the samep.d.f/p.m.f f(x). Alternatively, X1, ...,Xn are called independent,and identically distributed random variable with p.d.f/p.m.f ,commonly abbreviated to i.i.d. r.v.s.

eg. Random sample of n respondents on a survey question.Xi ⊥ Xj for all i = jfXi(x) is the same for all i.And the joint p.d.f/p.m.f of X1, ...,Xn is given by

f(x1, ..., xn) = f(x1)...f(xn) =n∏

i=1

f(xi)

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 15 / 56

Page 17: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Statistic and Sampling Distribution

DefinitionX1, ...,Xn is a random sample of size n from the population f(x). Astatistic is a real-valued or vector-valued function fully depended onX1, ...,Xn, thus

T = T(X1, ...,Xn)

and the probability distribution of a statistic T is called the samplingdistribution of T.

A statistic is only a function of the sample.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 16 / 56

Page 18: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Sample Mean and Sample VarianceDefinitionThe sample average or sample mean, X, of the n observation X1, ...,Xnis

X =1

n(X1 + X2 + ...+ Xn) =1

n

n∑i=1

Xi

The sample variance is the statistic defined by

S2 =1

n − 1

n∑i=1

(Xi − X)2

if Xi is a r.v., then∑

Xi is also a r.v.the sample mean and the sample variance are also a function of sums,so they are a r.v. too.

we could assume that the sample mean has some certain probabilityfunctions to describe its distributions.what is the expectation, variance or p.d.f./c.d.f. of this distribution?

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 17 / 56

Page 19: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

A simple case of sample mean

Let {X1,Xn} ∈ [1, 100] , assume n = 2, thus only X1and X2

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 18 / 56

Page 20: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Sampling Distributions

There are two approaches to characterizing sampling distributions:exact/finite sample distribution: The sampling distribution that exactlydescribes the distribution of X for any n is called the exact/finitesample distribution of X.approximate/asymptotic distribution: when the sample size n is large,the sample distribution approximates to a certain distribution function.

Two key tools used to approximate sampling distributions when thesample size is large, assume that n → ∞

The Law of Large Numbers(L.L.N.): when the sample size is large, Xwill be close to µY , the population mean with very high probability.The Central Limit Theorem(C.L.T.): when the sample size is large,the sampling distribution of the standardized sample average,(Y−µY)/σY

, is approximately normal.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 19 / 56

Page 21: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Convergence in probability

DefinitionLet X1, ...,Xn be an random variables or sequence, is said to converge inprobability to a value b if for every ε > 0,

P(| Xn − b |> ε) → 0

as n → ∞. We write this Xnp−→ b or plim(Xn) = b.

it is similar to the concept of a limitation in a probability way.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 20 / 56

Page 22: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

the Law of Large Numbers

TheoremLet X1, ...,Xn be an i.i.d draws from a distribution with mean µ and finitevariance σ2(a population) and X = 1

n∑n

i=1 Xi is the sample mean,then

X p−→ µ

Intuition: the distribution of Xn “collapses” on µ.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 21 / 56

Page 23: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

A simple case

ExampleSuppose X has a Bernoulli distribution if it have a binary valuesX ∈ {0, 1} and its probability mass function is

P(X = x) ={0.78 if x = 1

0.22 if x = 0

then E(X) = p = 0.78 and Var(X) = p(1− p) = 0.1716.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 22 / 56

Page 24: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .

Page 25: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 24 / 56

Page 26: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Convergence in DistributionDefinitionLet X1,X2,... be a sequence of r.v.s, and for n = 1, 2, ...let Fn(x) bethe c.d.f of Xn. Then it is said that X1,X2, ...converges in distributionto r.v. W with c.d.f, FW if

limn�∞

Fn(x) = FW(x)

which we write as Xnd−→ W.

Basically: when n is big, the distribution of Xn is very similar to thedistribution of w.Common to standardize a r.v. by subtracting its expectation anddividing by its standard deviation

Z =X − E[X]√

Var[X]

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 24 / 56

Page 27: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

The Central Limit Theorem

TheoremLet X1, ...,Xn be an i.i.d draws from a distribution with sample size nwithmean µ and 0 < σ2 < ∞, then

Xn − µσ/√n

d−→ N(0, 1)

Because we don’t have to make specific assumption about thedistribution of Xi, so whatever the distribution of Xi, when n is big,

the standardized Xn ∼ N(0, 1)

Xn ∼ N(µ, σ2

n )

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 25 / 56

Page 28: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .

Page 29: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 27 / 56

Page 30: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

How large is “large enough” ?

How large is large enough ?how large must n be for the distribution of Y to be approximatelynormal?

The answer: it depends.if Yi are themselves normally distributed, then Y is exactly normallydistributed for all n.if Yi themselves have a distribution that is far from normal, then thisapproximation can require n = 30 or even more.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 27 / 56

Page 31: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

How large is “large enough” ?

How large is large enough ?how large must n be for the distribution of Y to be approximatelynormal?

The answer: it depends.if Yi are themselves normally distributed, then Y is exactly normallydistributed for all n.if Yi themselves have a distribution that is far from normal, then thisapproximation can require n = 30 or even more.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 27 / 56

Page 32: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

How large is “large enough” ?

How large is large enough ?how large must n be for the distribution of Y to be approximatelynormal?

The answer: it depends.if Yi are themselves normally distributed, then Y is exactly normallydistributed for all n.if Yi themselves have a distribution that is far from normal, then thisapproximation can require n = 30 or even more.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 27 / 56

Page 33: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

How large is “large enough” ?

How large is large enough ?how large must n be for the distribution of Y to be approximatelynormal?

The answer: it depends.if Yi are themselves normally distributed, then Y is exactly normallydistributed for all n.if Yi themselves have a distribution that is far from normal, then thisapproximation can require n = 30 or even more.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 27 / 56

Page 34: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

How large is “large enough” ?

How large is large enough ?how large must n be for the distribution of Y to be approximatelynormal?

The answer: it depends.if Yi are themselves normally distributed, then Y is exactly normallydistributed for all n.if Yi themselves have a distribution that is far from normal, then thisapproximation can require n = 30 or even more.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 27 / 56

Page 35: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .

Page 36: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 29 / 56

Page 37: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Statistical Inference

InferenceWhat is our best guess about some quantity of interest?What are a set of plausible values of the quantity of interest?

Compare estimators, such as in an experimentwe use simple difference in sample means?or the post-stratification estimator, where we estimate the estimate thedifference among two subsets of the data (male and female, forinstance) and then take the weighted average of the two variablewhich is better? how could we know?

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 29 / 56

Page 38: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Inference: from Samples to Population

Our focus: {Y1,Y2, ...,Yn} are i.i.d. draws from f(y) or F(Y), thuspopulation distribution.Statistical inference or learning is using samples to infer f(y).two ways

ParametricNon-parametric

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 30 / 56

Page 39: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Point estimation

Point estimation: providing a single “best guess”as to the value ofsome fixed, unknown quantity of interest, θ, which is is a feature ofthe population distribution, f(y).Examples

µ = E[Y]σ2 = Var[Y]µy − µx = E[Y]− E[X]

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 31 / 56

Page 40: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Estimator and EstimateDefinitionGiven a random sample{Y1,Y2, ...,Yn} drawn from a populationdistribution that depends on an unknown parameter θ, and an estimator θis a function of the sample: thus θn = h(Y1,Y2, ...,Yn)

An estimator is a r.v. because it is a function of r.v.s.{θ1, θ2, ..., θn} is a sequence of r.v.s, so it has convergence inprobability/distribution.

Question: what is the difference between an estimator and anstatistic?

DefinitionAn estimate is the numerical value of the estimator when it is actuallycomputed using data from a specific sample. Thus if we have the actualdata {y1, y2, ..., yn},then θ = h(y1, y2, ..., yn)

ExampleTrue or False and Why? “My estimate was the sample mean and myestimator was 0.5”?Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 32 / 56

Page 41: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Three Characteristics of an Estimator

let Y denote some estimator of µY and E(µY) is the mean of thesampling distribution of µY,

1 Unbiasedness: the estimator of µY is unbiased if

E(µY) = µY

2 Consistency:the estimator of µY is consistent if

µYp−→ µY

3 Efficiency:Let µY be another estimator of µY and suppose that bothµY and µY are unbiased.Then µY is said to be more efficient than µY

var(µY) < var(µY)

Comparing variances is difficult if we do not restrict our attention tounbiased estimators because we could always use a trivial estimatorwith variance zero that is biased.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 33 / 56

Page 42: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Properties of the sample mean

1 Let µY and σ2Y denote the mean and variance of Yi, then

E(Y) =1

n

n∑i=1

E(Yi) = µY

so Y is an unbiased estimator of µY.2 Based on the L.L.N., Y p−→ µY, so Y is also consistent.3 the variance of sample mean

Var(Y) = var(1

n

n∑i=1

Yi

)=

1

n2

n∑i=1

Var(Yi) =σ2

Yn

4 the standard deviation of the sample mean is σY = σY√n

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 34 / 56

Page 43: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Properties of the sample mean

Because efficiency entails a comparison of estimators, we need tospecify the estimator or estimators to which Y is to be compared.

Let Y = 1n(12Y1 +

32Y2 +

12Y3 +

32Y4 + ...+ 1

2Yn−1 +32Yn

)Var(Y) = 1.25

σ2Y

n >σ2

Yn = Var(Y)

Thus Y is more efficient than Y

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 35 / 56

Page 44: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Properties of the Sample Variance

Let µY and σ2Y denote the mean and variance of Yi , then the sample

variance:S2Y = 1

n−1

∑ni=1(Yi − Y)2

1 E(S2Y) = σ2

Y, thus S2 is an unbiased estimator of σ2Y. It is also the

reason why the average uses the divisor n − 1 instead of n.2 S2

YP−→ σ2

Y, thus the sample variance is a consistent estimator of thepopulation variance.

Because σY = σY√n , so the statement above justifies using SY√

n as anestimator of the standard deviation of the sample mean, σY.It is called the standard error of the sample mean and it dented SE[Y]or σY.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 36 / 56

Page 45: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Interval Estimation

A point estimate provides no information about how close theestimate is “likely” to be to the population parameter.We cannot know how close an estimate for a particular sample is tothe population parameter because the population is unknown.A different (complementary) approach to estimation is to produce arange of values that will contain the truth with some fixedprobability.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 37 / 56

Page 46: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

What is a Confidence Interval?

DefinitionA 100(1− α)% confidence interval for a population parameter θ is aninterval Cn = (a, b) , where a = a(Y1, ...,Yn) and b = b(Y1, ...,Yn) arefunctions of the data such that

P(a < θ < b) = 1− α

In general, this confidence level is 1− α ; where α is calledsignificance level.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 38 / 56

Page 47: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Interval Estimation and Condence Intervals

Suppose the population has a normal distribution N(µ, σ2) and letY1,Y2, ...,Yn be a random sample from the population.

Then the sample mean has a normal distribution: Y ∼ N(µ, σ2

n )

The standardized sample mean Z is given by: Z = Y−µσ/

√n ∼ N(0, 1)

Then θ = Z, then P(a < θ < b) = 1− α turns into

a <Y − µσ/

√n

< b

then it follows that

P(Y − aσ/√n < µ < Y + bσ/√n) = 1− α

The random interval contains the population mean with a probability1− α.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 39 / 56

Page 48: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Interval Estimation and Condence Intervals

Two cases: σ is known and unknownWhen σ is known, for example,σ = 1, thus Y ∼ N(µ, 1),then Y ∼ N(µ, σ

2

n = 1n)

From this, we can standardize Y, and, because the standardizedversion of Y has a standard normal distribution, and we let α = 0.05,then we have

P(−1.96 <Y − µ1/√

n< 1.96) = 1− 0.05

The event in parentheses is identical to the eventY − 1.96/

√n ≤ µ ≤ Y + 1.96/

√n, so

P(Y − 1.96/√

n ≤ µ ≤ Y + 1.96/√

n) = 0.95

The interval estimate of µ may be written as[Y − 1.96/

√n,Y + 1.96/

√n]

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 40 / 56

Page 49: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Interval Estimation and Condence Intervals

When σ is unknown, we must use an estimate S , denote the samplestandard deviation, replacing unknown σ

P(Y − 1.96S/√

n ≤ µ ≤ Y + 1.96S/√

n) = 0.95

This could not work because S is not a constant but a r.v.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 41 / 56

Page 50: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Interval Estimation and Condence Intervals

DefinitionThe t-statistic or t-ratio:

Y − µ

SE(Y)∼ tn−1

To construct a 95% confidence interval, let c denote the 97.5th

percentile in the tn−1 distribution.

P(−c < t ≤ c) = 0.95

where cα/2 is the critical value of the t distribution.The condence interval may be written as [Y ± cα/2

S/√

n]

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 42 / 56

Page 51: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Interval Estimation and Condence Intervals

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 43 / 56

Page 52: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

A simple rule of thumb for a 95% confidence interval

Caution! An often recited, but incorrect interpretation of a confidenceinterval is the following:

“I calculated a 95% confidence interval of [0.05,0.13], which means thatthere is a 95% chance that the true means is in that interval.”This is WRONG. actually µ either is or is not in the interval.

The probabilistic interpretation comes from the fact that for 95% ofall random samples, the constructed confidence interval will contain µ.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 44 / 56

Page 53: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Interpreting the confidence interval

Caution! An often recited, but incorrect interpretation of a confidenceinterval is the following:

“I calculated a 95% confidence interval of [0.05,0.13], which means thatthere is a 95% chance that the true means is in that interval.”This is WRONG. actually µ either is or is not in the interval.

The probabilistic interpretation comes from the fact that for 95% ofall random samples, the constructed confidence interval will contain µ.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 45 / 56

Page 54: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Hypothesis Testing

DefinitionA hypothesis is a statement about a population parameter, thus θ.Formally, we want to test whether is significantly different from a certainvalue µ0

H0 : θ = µ0

which is called null hypothesis. The alternative hypothesis is

H1 : θ = µ0

If the value µ0 does not lie within the calculated condence interval,then we reject the null hypothesis.If the value µ0 lie within the calculated condence interval, then we failto reject the null hypothesis.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 46 / 56

Page 55: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

General framework

A hypothesis test chooses whether or not to reject the null hypothesisbased on the data we observe.Rejection based on a test statistic

Tn = T(Y1, ...,Yn)

The null/reference distribution is the distribution of T under the null.We’ll write its probabilities as P0(Tn ≤ t)

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 47 / 56

Page 56: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Two Type Errors

In both cases, there is a certain risk that our conclusion is wrong

Type I ErrorA Type I error is when we reject the null hypothesis when it is in facttrue.(“left-wing”)

We say that the Lady is discerning when she is just guessing(nullhypo: she is just guessing)

Type II ErrorA Type II error is when we fail to reject the null hypothesis when it isfalse.(“right-wing”)

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 48 / 56

Page 57: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

General framework

A hypothesis test chooses whether or not to reject the null hypothesisbased on the data we observe.Rejection based on a test statistic

Tn = T(Y1, ...,Yn)

The null/reference distribution is the distribution of T under the null.We’ll write its probabilities as P0(Tn ≤ t)

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 49 / 56

Page 58: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

P-Value

To provide additional information, we could ask the question: What isthe largest significance level at which we could carry out the test andstill fail to reject the null hypothesis?We can consider the p-value of a test

1 Calculate the t-statistic t2 The largest significance level at which we would fail to reject H0 is the

significance level associated with using t as our critical value

p − value = 1− Φ(t)

where denotes the standard normal c.d.f.(we assume that n is largeenough)

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 50 / 56

Page 59: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

P-Value

Suppose that t = 1.52, then we can find the largest significance levelat which we would fail to reject H0

p − value = P(T > 1.52 | H0) = 1− Φ(1.52) = 0.065

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 51 / 56

Page 60: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

An Example: Comparing Means from Different Populations

Do recent male and female college graduates earn the same amounton average? This question involves comparing the means of twodifferent population distributions.In an RCT, we would like to estimate the average causal effects overthe population

ATE = ATT = E{Yi(1)− Yi(0)}

We only have random samples and random assignment to treatment,then what we can estimate instead

difference in mean = Ytreated − Ycontrol

Under randomization, difference-in-means is a good estimate for theATE.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 52 / 56

Page 61: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Hypothesis Tests for the Difference Between Two Means

To illustrate a test for the difference between two means, let mw bethe mean hourly earning in the population of women recentlygraduated from college and let mm be the population mean forrecently graduated men.Then the null hypothesis and the two-sided alternativehypothesis are

H0 : µm = µw

H1 : µm = µw

Consider the null hypothesis that mean earnings for these twopopulations differ by a certain amount, say d0. The null hypothesisthat men and women in these populations have the same meanearnings corresponds to H0 : H0 : d0 = µm − µw = 0

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 53 / 56

Page 62: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

The Difference Between Two Means

Suppose we have samples of nm men and nw women drawn at randomfrom their populations. Let the sample average annual earnings be Ymfor men and Yw for women. Then an estimator of µm − µw isYm − Yw .Let us discuss the distribution of Ym − Yw .

∼ N(µm − µw,σ2

mnm

+σ2

wnw

)

if σ2mand σ2

w are known, then the this approximate normal distributioncan be used to compute p-values for the test of the null hypothesis. Inpractice, however, these population variances are typically unknown sothey must be estimated.Thus the standard error of Ym − Yw is

SE(Ym − Yw) =

√s2mnm

+s2wnw

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 54 / 56

Page 63: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

The Difference Between Two Means

The t-statistic for testing the null hypothesis is constructedanalogously to the t-statistic for testing a hypothesis about a singlepopulation mean, thus t-statistic for comparing two means is

t = Ym − Yw − d0SE(Ym − Yw)

If both nmand nm are large, then this t-statistic has a standard normaldistribution when the null hypothesis is true.

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 55 / 56

Page 64: Introduction to Econometrics - Zhaopeng(Frank)QU … · Introduction to Econometrics Lecture 2 : Causal Inference and Random Control Trails(RCT) Zhaopeng Qu Business School,Nanjing

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Confidence Intervals for the Difference Between TwoPopulation Means

the 95% two-sided confidence interval for d consists of those values ofd within ±1.96 standard errors of Ym − Yw , thus d = µm − µw is

(Ym − Yw)± 1.96SE(Ym − Yw)

Zhaopeng Qu (Nanjing University) Introduction to Econometrics Sep. 18th, 2017 56 / 56