Professional Documents
Culture Documents
ECON4150 - Introductory Econometrics Lecture 2: Review of Statistics
ECON4150 - Introductory Econometrics Lecture 2: Review of Statistics
Monique de Haan
(moniqued@econ.uio.no)
Lecture outline
Simple random sampling means that n objects are drawn randomly from a
population and each object is equally likely to be drawn
Let Y1 , Y2 , ..., Yn denote the 1st to the nth randomly drawn object.
When Y1 , ..., Yn are drawn from the same population and are independently
distributed, they are said to be i.i.d random variables
4
Suppose Y1 , ..., Yn are i.i.d and the mean & variance of the population
distribution of Y are respectively µY & σY2
• The mean of Y is
n
! n
1X 1X 1
E Ȳ = E Yi = E (Yi ) = nE(Y ) = µY
n n n
i=1 i=1
• The variance of Y is
Pn
1
Var Y = Var n i=1 Yi
1
Pn Pn Pn
= n2 i=1 Var (Yi ) + 2 n12 i=1 j=1,j6=i Cov (Yi , Yj )
1
= n2
nVar (Y ) + 0
1 2
= σ
n Y
6
E (G) = µG = p = 0.5
• A special case is when Y1 , Y2 , ..., Yn are i.i.d draws from the N µY , σY2 ,
.4
probability
.3
.2
.1
0
0 .2 .4 .5 .6 .8 1
sample average
.
9
.4 .2
probability
probability
.3 .15
.2 .1
.1 .05
0 0
0 .2 .4 .5 .6 .8 1 0 .2 .4 .5 .6 .8 1
sample average sample average
.08
probability
probability
.04
.06
.04
.02
.02
0 0
0 .2 .4 .5 .6 .8 1 0 .2 .4 .5 .6 .8 1
sample average sample average
12
σ2
Y ∼ N µY , Y
n
probability
.3 .15
.2 .1
.1 .05
0 0
-4 -2 0 2 4 -4 -2 0 2 4
sample average sample average
Finite sample distr. standardized sample average Finite sample distr. standardized sample average
Standard normal probability densitiy Standard normal probability densitiy
probability
.04
.06
.04
.02
.02
0 0
-4 -2 0 2 4 -4 -2 0 2 4
sample average sample average
Finite sample distr. standardized sample average Finite sample distr. standardized sample average
Standard normal probability densitiy Standard normal probability densitiy
.
14
1
Pn
• The sample average Y = n i=1 Yi
E (µ̂Y ) = µY
Example
Unbiasedness
• As shown on slide 5: E Y = µY
•
1 1
+ 23 Y2 + ... + 12 Yn−1 + 32 Yn
E Y
e = E n
Y
2 1
1 1
+ 32 E(Y2 ) + ... + 21 E(Yn−1 ) + 32 E(Yn )
= n 2
E(Y1 )
1
n 1
· 2 E (Yi ) + n2 · 32 E (Yi )
= n 2
E (Yi ) = µY
21
Consistency
Example: mean wages of individuals with a master degree with µw = 60 000
Sample average as estimator of population mean Sample average as estimator of population mean
999 samples of n=10 999 samples of n=100
.04 .03
.03
probability
probability
.02
.02
.01
.01
0 0
10 0
20 00
30 00
40 00
50 00
60 00
70 00
80 00
90 00
10 000
11 000
12 000
00
10 0
20 00
30 00
40 00
50 00
60 00
70 00
80 00
90 00
10 000
11 000
12 000
00
0
0
0
0
0
0
0
0
00
0
0
0
0
0
0
0
0
00
0
0
0
0
sample average sample average
22
Consistency
Example: mean wages of individuals with a master degree with µw = 60 000
f = 1 1 W1 + 3 W2 + ... + 1 Wn−1 + 3 Wn is also consistent
W n 2 2 2 2
Weighted average as estimator of population mean Weighted average as estimator of population mean
999 samples of n=10 999 samples of n=100
.03 .04
probability
probability
.03
.02
.02
.01
.01
0 0
10 0
20 00
30 00
40 00
50 00
60 00
70 00
80 00
90 00
10 000
11 000
12 000
00
10 0
20 00
30 00
40 00
50 00
60 00
70 00
80 00
90 00
10 000
11 000
12 000
00
0
0
0
0
0
0
0
0
00
0
0
0
0
0
0
0
0
00
0
0
0
0
weighted average weighted average
.03 .03
probability
probability
.02 .02
.01 .01
0 0
10 0
20 00
30 00
40 00
50 00
60 00
70 00
80 00
90 00
00 0
0 0
00 0
00
10 0
20 00
30 00
40 00
50 00
60 00
70 00
80 00
90 00
10 000
11 00
12 000
00
10 00
11 0
12 00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
00
00
0
first observation W1 first observation W1
.
23
Efficiency
• The variance of Y
e equals
e = 1.25 1 σY2
Var Y
n
H0 : E (Y ) = µY ,0
H1 : E (Y ) 6= µY ,0
27
h act
i
p − value = PrH0 |Y − µY ,0 | > |Y − µY ,0 |
σ2
Y ∼ N µY , Y
n
Y − µY ,0
q
2
∼ N (0, 1)
σY
n
29
Y act −µY ,0
• For large n, p-value = the probability that Z falls outside r 2
σ
Y
n
30
n
1 X 2
sY2 = Yi − Y
n−1
i=1
q
The sample standard deviation sY = sY2 is the estimator of σY
31
Computing the p-value using SE Y = σ
bY
sY
SE Y = √
n
• This implies that when σY2 is unknown and Y1 , ..., Yn are i.i.d. the p-value
is computed as
act
Y − µY ,0
p − value = 2Φ −
SE Y
32
act
• The standardized sample average Y − µY ,0 /SE Y plays a
central role in testing statistical hypothesis
95%
2.5% 2.5%
-1.96 0 1.96
t
34
H0 : E (Y ) = µY ,0 H1 : E (Y ) 6= µY ,0
Y − µY ,0
t act =
SE Y
H0 : E (W ) = 60000 H1 : E (W ) 6= 60000
sW
Step 2: SE W = √ n
= 1334.19
W −µW ,0
Step 3: t act = SE (W )
= 61977.12−60000
1334.19
= 1.48
Step 4: Since we use a 5% significance level, we do not reject H0
because |t act | = 1.48 < 1.96
This is howJanuary
Thursday to do the test in Stata:
12 12:17:46 2017 Page 1
1 . ttest wage=60000
One-sample t test
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
Ha: mean < 60000 Ha: mean != 60000 Ha: mean > 60000
Pr(T < t) = 0.9302 Pr(|T| > |t|) = 0.1396 Pr(T > t) = 0.0698
38
H0 : E (Y ) = µY ,0 H1 : E (Y ) > µY ,0
• In this case the p-value is the area under N (0, 1) to the right of the
t-statistic
p − value = PrH0 t > t act = 1 − Φ t act
1 . ttest wage=60000
One-sample t test
Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
Ha: mean < 60000 Ha: mean != 60000 Ha: mean > 60000
Pr(T < t) = 0.9302 Pr(|T| > |t|) = 0.1396 Pr(T > t) = 0.0698
40
• On the basis of this we can construct a set of values which are not
rejected at a 5% significance level