Lecture2 2
Lecture2 2
Chen Tong
4. Hypothesis Testing
w = h (y1 , y2 , . . . , yn )
▶ An estimator W of θ is unbiased if
E (W ) = θ
E S 2 = σ2
▶ There are usually more than one unbiased estimator. They could
have a different sampling distribution
P (|Wn − θ| > ε) → 0 as n → ∞
Ȳ − µ
Z̄ = √ , with Z̄ ∼ N(0, 1)
(σ/ n)
it follows that
√ √
P Ȳ − dα/2 σ/ n < µ < Ȳ + dα/2 σ/ n = 1 − α
√ √
▶ The random interval Ȳ − dα/2 σ/ n, Ȳ + dα/2 σ/ n contains the
population mean µ with a probability 1 − α
Ȳ − µ
√ ∼ tn−1
S/ n
Example:
▶ Changes in worker productivity on "scrap rates" for a sample of
Michigan manufacturing firms
▶ Was there a significant change in the scrap rate between 1987 and
1988?
▶ n = 20 ⇒ The critical value for a 95% confidence interval for
n − 1 = 19 degrees of freedom is 2.093, which is the 97.5th
percentile in a t19 distribution (see Wooldridge, page 825)
√
▶ ȳ = −1.15, se(ȳ ) = s/ n = .54
▶ The confidence interval for the mean change in scrap rates µ is
[ȳ ± 2.093 se(ȳ )]
⇒ The 95% confidence interval is [−2.28, −.02]
⇒ The average change in scrap rates is statistically significant (i.e.
significantly different from zero) at a significance level of 5%
H1 : θ ̸= µ0
▶ Null hypothesis:
H0 : µ = µ0
▶ Alternative hypotheses:
A. H1 : µ > µ0 (one-sided hypothesis)
B. H1 : µ < µ0 (one-sided hypothesis)
C. H1 : µ ̸= µ0 (two-sided hypothesis)
p-value = 1 − Φ(t),
where Φ(·) denotes the standard normal cdf (we assume that n is
large enough to treat the test statistic as having a standard normal
distribution)
Two-tailed test:
p-value = 2(1 − Φ(|t|))
1. State H0 (µ = µ0 )
2. State H1 (µ < µ0 , µ > µ0 or µ ̸= µ0 )
3. If necessary, calculate ȳ , s and se(ȳ )
ȳ −µ0
4. Calculate the t-statistic: t = se(ȳ )
5. Find the critical value which depends on (i) the significance level,
(ii) the alternative hypothesis (i.e. one-tailed or two-tailed test) and
(iii) the degrees of freedom (n − 1)
6. Compare t with c for a given significance level α Reject or fail to
reject the null hypothesis. The interpretation depends on H1 :
µ > µ0 (one-tailed test): reject H0 if t > c µ < µ0 (one-tailed test):
reject H0 if t < −c µ ̸= µ0 (two-tailed test): reject H0 if |t| > c
7. (If
requested:) Calculate the p-value
1 − Φ(t) if one-tailed test
=
2(1 − Φ(|t|)) if two-tailed test
1. H0 : µ = 0
2. H1 : µ ̸= 0
3. ȳ = −1.15, se(ȳ ) = .54
ȳ −0 −1.15
4. t = se(ȳ ) = 0.54 ≈ −2.13
5. critical value:
(i) significance level: 5%
(ii) two-tailed test
(iii) degrees of freedom: n − 1 = 20 − 1 = 19
⇒ c = 2.093
6. Reject H0 if |t| > c : 2.13 > 2.093 ⇒ We reject H0 at a significance
level of 5%
7. The smallest significance level at which we would reject H0 ?
⇒ p-value = 2[1 − Φ(|t|)] = 2[1 − Φ(|2.13|)] ≈ .033
⇒ We would still reject H0 at a significance level of 3.3%
σ2
P{|X − µ| ≥ ε} ≤
ε2
|X − µ|2
Z Z
P{|X − µ| ≥ ε} = f (x)dx ≤ f (x)dx
|X −µ|≥ε |X −µ|≥ε ε2
Z
1
≤ |X − µ|2 f (x)dx
ε2
σ2
=
ε2
Var(X̄ ) σ2
P{|X̄ − µ| ≥ ε} ≤ =
ε2 nε2
that means
lim P{|x̄ − µ| ≥ ε} = 0
n→∞
▶ Define Yn as
n n
√ X̄ − µ n(X̄ − µ) X (Xi − µ) X ηi
Yn = n = √ = √ = √
σ nσ nσ nσ
i=1 i=1
▶ The CF of Yn is
n
t
φ(t) = E e itYn = ϕ
√
σ n
therefore,
2
2
2 !!(− 2n
t2
)× − t2
t it t2
φ(t) = 1− +o √ = e − 2 , n → +∞
2n σ n
t2
and e − 2 is the CF of N(0, 1).
y2
1
f (yt ; θ) = √ exp − t 2
2πσ 2 2σ
where
xt is an explanatory variable that is independent of zt and
θ = β, σ 2 . The distribution of y conditional on xt is still normal
with mean βxt and variance σ 2
" #
2
1 (yt − βxt )
f (yt | xt ; θ) = √ exp −
2πσ 2 2σ 2
yt = ρyt−1 + ut , ut ∼ iidN 0, σ 2
f (y1 , y2 , . . . yT ; ψ)
T
Y
f (y1 , y2 , . . . yT ; θ) = f (yt ; θ)
t=1
▶ Dependent Case
T
Y
f (y1 , y2 , . . . yT ; θ) = f (y1 ; θ) f (yt | yt−1 , yt−2 . . . , y1 ) .
t=2
we have
f (yt | yt−1 , yt−2 . . . , y1 ) = f (yt | Ft−1 )
θ = argmin f (y1 , y2 , . . . yT ; θ)
▶ Log-likelihood function:
∂ ln ℓt (θ)
where gt (θ) = ∂θ , and ℓt (θ) = log f (yt |Ft−1 )
∂ ln LT (θ)
GT (θ̂) = =0
∂θ θ=θ̂
▶ Normal Distribution
" # " #
∂ ln LT (θ) 1
PT
(y − µ)
GT (θ) = ∂µ
∂ ln LT (θ) = T
σ2
1
PT t
t=1
2
∂σ 2
− 2σ 2 + 2σ 4 t=1 (yt − µ)
Thus we have
T
1 X
µ̂ = yt = ȳ
T t=1
T
1 X 2
σ̂ 2 = (yt − ȳ )
T t=1
plim θ̂ = θ0