Advanced Econometrics (I)
Chapter 9 - Hypothesis Testing Home Page
Fall 2012 Title Page
JJ II
J I
Wei Zhong
WISE & SOE Page 1 of 33
Go Back
December 28, 2012 Full Screen
Close
Quit
Review: T Test
Steps for Hypothesis Testing (T-Test)
(1) Parameter of interest and the associated hypothesis testing.
H0 : µ = µ0 , vs H1 : µ 6= µ0
Home Page
(2) Test statistic and its distribution under H0 is true. Title Page
JJ II
X̄n − µ0
T = √ ∼ tn−1, under H0 is true J I
Sn/ n Page 2 of 33
Go Back
x̄n −µ
(3) Compute the observed test statistic T = √0
sn / n Full Screen
(4) Apply Method 1 to construct critical region for a fixed sig- Close
nificance level α; or apply Method 2 to compute p-value. Quit
(5) Draw a conclusion (at the significance level α).
Hypothesis Testing on Two Popula-
tion Means
We will investigate the hypothesis testing on two normal pop-
ulation means in the following 4 cases:
• Case 1. Two Independent Samples with Known Home Page
Population Variances. Title Page
• Case 2. Two Independent Samples with Un- JJ II
known but Equal Population Variance. J I
• Case 3. Two Independent Samples with Un- Page 3 of 33
known Unequal Population Variances. Go Back
• Case 4. Two Dependent Paired Samples with Full Screen
Unknown Variance. Close
Quit
Case 1. Two Independent Samples
with Known Population Variances.
• Example:
– The alkalinity, in milligrams per liter, of water in the
upper reaches of rivers in a particular region is known Home Page
to be normally distributed with a standard deviation Title Page
of 10 mg/l. Alkalinity readings in the lower reaches of
JJ II
rivers in the same region are also known to be normally
distributed, but with a standard deviation of 25 mg/l. J I
– Ten alkalinity readings are made in the lower reaches of Page 4 of 33
a river in the region with the mean x̄1 = 99.0 and fifteen Go Back
in the upper reaches of the same river x̄2 = 80.5. Full Screen
– Investigate, at the 1% level of significance, the claim that Close
the true mean alkalinity of water in the lower reaches of Quit
this river is greater than that in the upper reaches.
Case 1. Two Independent Samples
with Known Population Variances.
• Solution: Let X1 and X2 denote the alkalinity readings
in the lower reaches and upper reaches, respectively. Then,
we have Home Page
X1 ∼ N (µ1, σ12), X2 ∼ N (µ2, σ22), Title Page
JJ II
where σ12 = 252, σ22 = 102.
J I
(1) Parameters of interest are µ1 and µ2 and the associated Page 5 of 33
hypothesis testing.
Go Back
H0 : µ1 = µ2 , vs H1 : µ1 > µ2 Full Screen
Close
Quit
Case 1. Two Independent Samples
with Known Population Variances.
• Solution:
(2) Test statistic and its distribution under H0 is true.
Since X1 ∼ N (µ1, σ12), X2 ∼ N (µ2, σ22), we have Home Page
Title Page
X̄1 ∼ N (µ1, σ12/n1), X̄2 ∼ N (µ2, σ22/n2),
JJ II
and we know X̄1 and X̄2 are independent, thus, J I
σ12 σ22
Page 6 of 33
X̄1 − X̄2 ∼ N µ1 − µ2, + , Go Back
n1 n2
Full Screen
(X̄1 − X̄2) − (µ1 − µ2)
⇒ q ∼ N (0, 1) Close
σ12 σ22
n1
+ n2 Quit
Case 1. Two Independent Samples
with Known Population Variances.
• Solution:
(2) We propose the test statistic:
Home Page
X̄1 − X̄2 Title Page
Z=q 2 ∼ N (0, 1) , under H0 is true.
σ1 σ22
n1
+ n2 JJ II
J I
Intuitively, if Z is large enough, we will reject the null H0.
Page 7 of 33
(3) Compute the observed test statistic Go Back
99.0 − 80.5 Full Screen
z0 = Z = q 2 = 2.57.
25 102
15
+ 10 Close
Quit
Case 1. Two Independent Samples
with Known Population Variances.
• Solution:
(4) Critical region {z > zα = 2.326}. Note this is one-sided
critical region for the one-tailed alternative hypothesis.
Home Page
Title Page
JJ II
J I
Page 8 of 33
Go Back
Full Screen
Close
Quit
The observed test statistic value z0 does lie in the critical
region so H0 is rejected.
Case 1. Two Independent Samples
with Known Population Variances.
• Solution:
(4) Or we may compute the p-value
Home Page
p-value = P (Z > z0) = P (Z > 2.57) Title Page
= 0.0051 < α = 0.01, JJ II
then we reject H0, at the 1% level of significance. J I
(5) Conclusion: At the 1% level of significance, we reject H0. Page 9 of 33
Thus, there is evidence, at the 1% level of significance, to Go Back
suggest that the true mean alkalinity of water in the lower Full Screen
reaches of the river is greater than that in the upper reaches. Close
Quit
Case 2. Two Independent Samples
with Unknown but Equal Popula-
tion Variance.
• Example:
– Mr. Brown is the owner of a small bakery in a large
town. He believes that the smell of fresh baking will Home Page
encourage customers to purchase goods from his bakery. Title Page
To investigate this belief, he records the daily sales for JJ II
10 days when all the bakery’s windows are open, and
J I
the daily sales for another 10 days when all windows are
closed. Page 10 of 33
– From the records, he get x̄1 = 202.18 and σ̂12 = 115.728, Go Back
x̄2 = 188.47 and σ̂22 = 156.653, where 1=open and Full Screen
2=closed. Close
– Assuming that these data may be deemed to be ran- Quit
dom samples from normal populations with the same
variance, investigate the baker’s belief.
Case 2. Two Independent Samples
with Unknown but Equal Popula-
tion Variance.
• Solution: Let X1 and X2 denote the daily sales when all
the windows are open and closed, respectively. Then, we Home Page
have Title Page
X1 ∼ N (µ1, σ 2), X2 ∼ N (µ2, σ 2), JJ II
where the same variance σ 2 is unknown. J I
(1) Parameters of interest are µ1 and µ2 and the associated Page 11 of 33
hypothesis testing. Go Back
Full Screen
H0 : µ1 = µ2 , vs H1 : µ1 > µ2
Close
Quit
Case 2. Two Independent Samples
with Unknown but Equal Popula-
tion Variance.
• Solution:
(2) Test statistic and its distribution under H0 is true. Home Page
Since X1 ∼ N (µ1, σ 2), X2 ∼ N (µ2, σ 2), we have Title Page
X̄1 ∼ N (µ1, σ 2/n1), X̄2 ∼ N (µ2, σ 2/n2), JJ II
J I
and we know X̄1 and X̄2 are independent, thus, Page 12 of 33
σ2 σ 2
Go Back
X̄1 − X̄2 ∼ N µ1 − µ2, + ,
n1 n2 Full Screen
Close
(X̄1 − X̄2) − (µ1 − µ2)
⇒ q ∼ N (0, 1) Quit
1 1
σ n1
+ n2
Case 2. Two Independent Samples
with Unknown but Equal Popula-
tion Variance.
(2) However, the same variance σ 2 is unknown, we use the sam-
ple variance to replace it. Note that two independent sam-
ples have the same variance, we can use the both samples Home Page
to obtain a pooled estimate of variance defined by Title Page
JJ II
(n1 − 1)σ̂12 + (n2 − 1)σ̂22
σ̂p2 = . J I
n1 + n2 − 2
Page 13 of 33
Then, we propose the test statistic: Go Back
X̄1 − X̄2 Full Screen
T = q ∼ tn1+n2−2, under H0 is true. Close
1 1
σ̂p n1
+ n2
Quit
Intuitively, if T is large enough, we will reject H0.
Case 2. Two Independent Samples
with Unknown but Equal Popula-
tion Variance.
• Solution:
Home Page
(3) Compute the observed test statistic
Title Page
202.18 − 188.47 JJ II
t0 = q = 2.63.
1
11.67 10
+ 101 J I
Page 14 of 33
(4) Critical region {t > tα,n1+n2−2 = 1.734}. Note this is one- Go Back
sided critical region for the one-tailed alternative hypothe- Full Screen
sis. The observed test statistic value t0 = 2.63 does lie in
Close
the critical region so H0 is rejected.
Quit
Case 2. Two Independent Samples
with Unknown but Equal Popula-
tion Variance.
• Solution:
Home Page
Title Page
JJ II
J I
Page 15 of 33
Go Back
Full Screen
Close
Quit
Case 2. Two Independent Samples
with Unknown but Equal Popula-
tion Variance.
• Solution:
Home Page
(4) Or we may compute the p-value
Title Page
p-value = P (t18 > t0) = P (t18 > 2.63) JJ II
= 0.0085 < α = 0.05, J I
Page 16 of 33
then we reject H0, at the 5% level of significance.
Go Back
(5) Conclusion: At the 5% level of significance, we reject
Full Screen
H0. Thus, there is evidence, at the 5% level of significance,
to suggest that the smell of fresh baking will encourage Close
customers to purchase goods from Mr Brown’s Bakery. Quit
Case 3. Two Independent Samples
with Unknown Unequal Population
Variances.
• Example:
– A random sample of 10 hot drinks from Dispenser A had Home Page
a mean volume of 203 ml and a standard deviation of 6
Title Page
ml. A random sample of 15 hot drinks from Dispenser
B gave corresponding values of 206 ml and 3 ml. The JJ II
amount dispensed by each machine may be assumed to J I
be normally distributed. Page 17 of 33
1. Test, at the 5% significance level, the hypothesis that Go Back
there is no difference in the variability of the volume Full Screen
dispensed by the two machines.
Close
2. Test, at the 5% significance level, the hypothesis that
there is no difference in the mean volume dispensed Quit
by the two machines.
Case 3. Two Independent Samples
with Unknown Unequal Population
Variances.
• Solution: Let X1 and X2 denote the volume dispensed by
machine A and B, respectively. Then, we have
Home Page
X1 ∼ N (µ1, σ12), X2 ∼ N (µ2, σ22), Title Page
JJ II
where variances σ12 and σ22 is unknown. Let n = 10 and
J I
m = 15 denote two sample sizes.
Page 18 of 33
1. First, we use the F-Test (Chapter 6) to test the equality of
two normal population variances. Go Back
Full Screen
(1) Parameters of interest are σ12, σ22 and the associated hy-
pothesis testing. Close
Quit
H0 : σ12 = σ22, vs H1 : σ12 = σ22.
Case 3. Two Independent Samples
with Unknown Unequal Population
Variances.
• Solution (Cont’d):
Home Page
(2) Test statistic and its distribution under H0 is true.
Title Page
A F test statistic is based on the sample variance ratio
JJ II
S12 J I
F = .
S22 Page 19 of 33
Intuitively, if H0 : σ12 = σ22 is true, the F test statistic Go Back
p p
should be close to 1, because S12 → σ12 and S22 → σ22 as Full Screen
n → ∞. On the other hand, if the F test statistic is far Close
different from 1, then we may reject H0. Quit
Case 3. Two Independent Samples
with Unknown Unequal Population
Variances.
• Solution (Cont’d):
(2) Test statistic and its distribution under H0 is true. Home Page
Under H0 : σ12 = σ22, we have Title Page
S12 S12/σ12 JJ II
F = 2 = 2 2 J I
S2 S2 /σ2
(n−1)S12 /σ12 Page 20 of 33
n−1 χ2n−1/(n − 1)
= (m−1)S22 /σ22
∼ 2 ∼ Fn−1,m−1. Go Back
χm−1/(m − 1)
m−1 Full Screen
(3) Compute the observed test statistic Close
Quit
F0 = s21/s22 2 2
= 6 /3 = 4.
Case 3. Two Independent Samples
with Unknown Unequal Population
Variances.
• Solution (Cont’d):
(4-1) Construct critical region for a fixed significance level α: Home Page
Reject the hypothesis H0 : σ12 = σ22 at the significance
level α = 0.05 if Title Page
JJ II
F >C Fn−1,m−1 , α2 , or F < C Fn−1,m−1 ,1− α2 J I
where CFn−1,m−1, α2 is the upper-tailed critical value of the Page 21 of 33
F distribution at level α2 , determined by P (Fn−1,m−1 > Go Back
CFn−1,m−1, α2 ) = α2 . Full Screen
Here, CF9,14,0.025 = 3.21 and CF9,14,0.975 = 0.26. There- Close
fore, the critical region is {F0 > 3.21 or F0 < 0.26}.
Quit
Because F0 = 4 does lie in the critical region, we reject
H0.
Case 3. Two Independent Samples
with Unknown Unequal Population
Variances.
• Solution (Cont’d):
Home Page
(4-2) Compute p-value.
Title Page
p-value = 2P (F9,14 > F0) = 2P (F9,14 > 4) = 0.0206. JJ II
J I
Since the p-value < α = 0.05, we reject H0.
Page 22 of 33
(5) Conclusion: At the 5% significance level, we may re-
ject H0. That is, there is evidence, at the 5% significance Go Back
level, of a difference in the variability of the volume dis- Full Screen
pensed by the two machines. Close
Quit
Case 3. Two Independent Samples
with Unknown Unequal Population
Variances.
• Solution:
Home Page
2. Next, we will test the hypothesis of the equality of two
Title Page
normal means with unknown unequal variances. Here, we
denote n1 = 10 and n2 = 15. JJ II
J I
(1) Parameters of interest are µ1 and µ2 and the associated
hypothesis testing. Page 23 of 33
Go Back
H0 : µ1 = µ2 , vs H1 : µ1 6= µ2
Full Screen
Close
Quit
Case 3. Two Independent Samples
with Unknown Unequal Population
Variances.
(2) Test statistic and its distribution under H0 is true.
Since X1 ∼ N (µ1, σ12), X2 ∼ N (µ2, σ22), we have Home Page
Title Page
X̄1 ∼ N (µ1, σ12/n1), X̄2 ∼ N (µ2, σ22/n2), JJ II
and we know X̄1 and X̄2 are independent, thus, J I
Page 24 of 33
σ12 σ22
X̄1 − X̄2 ∼ N µ1 − µ2, + , Go Back
n1 n2
Full Screen
(X̄1 − X̄2) − (µ1 − µ2)
⇒ q ∼ N (0, 1) Close
σ12 σ22
n1
+ n2 Quit
Case 3. Two Independent Samples
with Unknown Unequal Population
Variances.
(2) Since both variances are unknown and unequal, naturally,
we may use their sample variances to replace the corre-
Home Page
sponding variances. Then, we can propose the test statistic:
Title Page
X̄1 − X̄2
T =q 2 ∼ tν , under H0 is true, JJ II
S1 S22
n1
+ n2 J I
Page 25 of 33
where ν is the estimated degree of freedom defined by
Go Back
(S12/n1 + S22/n2)2 Full Screen
ν= 2 .
(S1 /n1)2/(n1 − 1) + (S22/n2)2/(n2 − 1) Close
Intuitively, if T is large enough, we will reject H0. This Quit
T-test is also called the Satterthwaite’s T-Test.
Case 3. Two Independent Samples
with Unknown Unequal Population
Variances.
(3) Compute the observed test statistic
Home Page
203 − 206
t0 = q 2 = −1.464. Title Page
6 32
10
+ 15 JJ II
J I
(4) To construct the critical region or compute the p-value, we Page 26 of 33
need compute the estimated d.f.
Go Back
(s21/n1 + s22/n2)2 Full Screen
ν= 2 = 12.
(s1/n1)2/(n1 − 1) + (s22/n2)2/(n2 − 1) Close
Quit
Case 3. Two Independent Samples
with Unknown Unequal Population
Variances.
(4) Critical region {|t| > tα/2,ν = t0.025,12 = 2.18}. Note this is
two-sided critical region for the two-tailed alternative hy-
pothesis. The observed test statistic value t0 = −1.464
doesn’t lie in the critical region so H0 can not be rejected. Home Page
Title Page
JJ II
J I
Page 27 of 33
Go Back
Full Screen
Close
Quit
Case 3. Two Independent Samples
with Unknown Unequal Population
Variances.
• Solution:
Home Page
(4) Or we may compute the p-value (two-sided)
Title Page
p-value = 2P (t12 > |t0|) = 2P (t12 > 1.464) JJ II
= 2 × 0.084 = 0.168 > α = 0.05, J I
Page 28 of 33
then we can not reject H0, at the 5% level of significance.
Go Back
(5) Conclusion: At the 5% level of significance, we can not
Full Screen
reject H0. Thus, there is no evidence, at the 5% level of
significance, to suggest that there is some difference in the Close
mean volume dispensed by the two machines. Quit
Case 4. Two Dependent Paired
Samples with Unknown Variance.
• Example: A convenience food, known as ‘QuicKnosh’,
was introduced into the British market in January 1992.
After a poor year for sales the manufacturers initiated an
intensive advertising campaign during January 1993. The Home Page
table below records the sales, in thousands of pounds, for a Title Page
one-month period before and a one-month period after the
JJ II
advertising campaign, for each of eleven regions.
J I
Page 29 of 33
Go Back
Full Screen
Close
Quit
Case 4. Two Dependent Paired
Samples with Unknown Variance.
• Example: Determine, at the 5% significance level,
whether an increase in mean sales has occurred by using
the T-Test for paired values.
• Solution: Two samples are dependent, but they are Home Page
paired. Therefore, we consider the difference of each sub-
Title Page
ject before and after the campaign. Denote X1 and X2
JJ II
be the the monthly sales before and after the advertising
campaign. Then, we know X1 and X2 are dependent and J I
paired. Next, we denote Page 30 of 33
D = X1 − X2 , Go Back
Full Screen
and assume that the difference is normally distributed with Close
mean µd = µ1 − µ2 and variance σd2. That is,
Quit
D ∼ N (µd, σd2).
Case 4. Two Dependent Paired
Samples with Unknown Variance.
(1) Parameters of interest are µ1 and µ2 and the associated
hypothesis testing.
H0 : µ1 = µ2 , vs H1 : µ1 > µ2 , Home Page
which is equivalent to Title Page
JJ II
H0 : D = 0, vs H1 : D > 0.
J I
Then, the problem is simplified to one-sample T-Test. Page 31 of 33
(2) Test statistic and its distribution under H0 is true. Go Back
Full Screen
D̄n
T = √ ∼ tn−1, under H0 is true. Close
σ̂d/ n
Quit
Intuitively, if T is large enough, we will reject the null H0.
Case 4. Two Dependent Paired
Samples with Unknown Variance.
(3) Compute the observed test statistic
D̄n 0.855
t0 = √ = √ = 3.13. Home Page
σ̂d/ n 0.907/ 11
Title Page
(4) Critical region {t > tα,11−1 = 1.81}. Note this is one-sided JJ II
critical region for the one-tailed alternative hypothesis. The J I
observed test statistic value t0 = 3.13 does lie in the critical Page 32 of 33
region so H0 is rejected. Go Back
Full Screen
Close
Quit
Case 4. Two Dependent Paired
Samples with Unknown Variance.
(4) Or we may compute the p-value
p-value = P (t11−1 > t0) = P (t10 > 3.13)
Home Page
= 0.0053 < α = 0.05,
Title Page
then we reject H0, at the 5% level of significance. JJ II
(5) Conclusion: At the 5% level of significance, we reject H0. J I
Thus, there is evidence, at the 5% level of significance, to Page 33 of 33
suggest that an increase in mean sales has occurred after Go Back
the advertising campaign.
Full Screen
Close
Quit