Problem Set #3 Answer Key 1 Averages Economics 435: Quantitative Methods

advertisement
Problem Set #3 Answer Key
Economics 435: Quantitative Methods
Fall 2011
1
Averages
a) The condition is a1 + a2 + · · · + an = 1.
b) The answer is:
var(Wn ) = (a21 + a22 + · · · + a2n )σ 2
c) If Wn is an unbiased estimator then
12
1
(a1 + a2 + · · · + an )2
=
= ≤ a21 + a22 + · · · + a2n
n
n
n
Multiply both sides of the above by σ 2 and we get:
var(Wn ) = (a21 + a22 + · · · + a2n )σ 2 ≥
2
σ2
= var(X̄n )
n
Consistency and unbiasedness
a) Yes it is:
n
E(x̄)
1X
xi
n i=1
=
E
=
1X
E (xi )
n i=1
=
E(x) = p
!
n
b) Yes it is. By the Law of Large Numbers plim x̄ = E(x) = p.
c) No it is not. For a given n:
Pr(x̄ = 0) = (1 − p)n > 0
Since ln 0 does not exist, E(ln x̄) also does not exist. Therefore E(ln x̄) cannot equal p.
d) Yes, it is. We have already established that plim x̄ = p. Since p > 0, the function ln(.) is continuous at
p. Therefore Slutsky’s theorem implies:
plim ln x̄ = ln plim x̄ = ln p
1
ECON 435, Fall 2011
3
2
Estimating the covariance
a) The analog principle says that if you have an expression that defines your parameter of interest in terms of
expected values, you can consistently estimating that parameter if you replace all unknown expected values
with their corresponding sample average. This suggests two estimators for cov(x, y):
!
!
n
n
n
1X
1X
1X
cov(x,
ˆ
y) =
xi −
xi
yi
yi −
n i=1
n i=1
n i=1
!
!
!
n
n
n
1X
1X
1X
=
xi yi −
xi
yi
n i=1
n i=1
n i=1
A little algebra will reveal that these two estimators are actually identical.
b) I’ll prove this for the bottom definition. By the law of large numbers:
n
1X
xi yi
n i=1
→p
E(xy)
→p
E(x)
→p
E(y)
n
1X
xi
n i=1
n
1X
yi
n i=1
Since the function f (a, b, c) = a − bc is continuous in all arguments, Slutsky’s theorem implies:
!
!
!
n
n
n
1X
1X
1X
cov(x,
ˆ
y) =
xi yi −
xi
yi
n i=1
n i=1
n i=1
→p
=
E(xy) − E(x)E(y)
cov(x, y)
c)
"
E [cov(x,
ˆ
y)]
= E
n
1X
xi yi
n i=1
!
n
−
1X
xi
n i=1
!
n
1X
yi
n i=1
!#
=
n
n
n
1X
1 XX
E(xi yi ) − 2
E(xi yj )
n i=1
n i=1 j=1
=
n
n
n
1X
1 XX
E(xy) − 2
E(xi yj )
n i=1
n i=1 j=1
=
n
n
1X
1 X
E(xy) − 2
E(xy) + (n − 1)E(x)E(y)
n i=1
n i=1
1
1
nE(xy) − 2 n (E(xy) + (n − 1)E(x)E(y))
n
n
1
n−1
= E(xy) − E(xy) −
E(x)E(y)
n
n
n−1
=
(E(xy) − E(x)E(y))
n
n−1
=
cov(x, y)
n
=
ECON 435, Fall 2011
3
It is biased. Note that the bias goes away as n goes to infinity, so it is still consistent.
d) Yes, just multiply this estimator by
variances and covariances.
4
Basic statistics in R
This code will work:
x <- rbern(1000,100,0.75)
m1000 <- apply(x,2,mean)
m25 <- apply(x[1:25,],2,mean)
m5 <- apply(x[1:5,],2,mean)
m1 <- x[1,]
par(mfrow=c(2,2))
hist(m1)
hist(m5)
hist(m25)
hist(m1000)
n
n−1 .
This bias correction is standard practice when estimating
Download