AES Lecture5 Testing
AES Lecture5 Testing
1 / 58
Outline
2 / 58
Introduction to Hypothesis Testing1
1
Lind et al., Chapters 10 & 11
3 / 58
What is Hypothesis Testing
4 / 58
What is Hypothesis Testing
5 / 58
What is Hypothesis Testing
One-sample
Sample
one sample against population
Population
Two-sample – Paired
Sample 1 Sample 2
two samples from same population
Population
Two-sample – Unpaired
Sample 1 Sample 2
two samples from diff. populations
Population 1 Population 2
6 / 58
One-sample Hypothesis Testing2
2
Lind et al., Chapters 10 & 11
7 / 58
Preparation for the Test
Testing requirements:
1. random sampling is employed
2. level of measurement is at least interval
3. sampling distribution is normal (Central Limit Theorem)
8 / 58
Procedure of the Test
9 / 58
1. Formulate the Statistical Hypotheses
10 / 58
1. Formulate the Statistical Hypotheses
11 / 58
1. Formulate the Statistical Hypotheses
12 / 58
1. Formulate the Statistical Hypotheses
13 / 58
2. Select the Level of Significance
14 / 58
3. Calculate the Test Statistic
x̄ − µ0
Z∗ = √
σ/ n
15 / 58
3. Calculate the Test Statistic
x̄ − µ0
Z∗ = √
s/ n
x̄ − µ0
t∗ = √
s/ n
16 / 58
4. Find the Critical Value
17 / 58
4. Find the Critical Value
I under two-tailed test: the critical value is the score that puts
α/2 on either tail of the distribution and (1 − α) in the middle
Z(0.5−α/2) t(α/2,n−1)
.95
-1.96 1.96
Critical value 0 Critical value
18 / 58
4. Find the Critical Value
under right-tailed test: the critical value is the score that puts α
on right tail of the distribution and (1 − α) to the left
Z(0.5−α) t(α,n−1)
Rejection region
Do not .05
reject H0
Probability = .95
1.65
0 Critical value
19 / 58
4. Find the Critical Value
under left-tailed test: the critical value is the score that puts α on
left tail of the distribution and (1 − α) to the right
−Z(0.5−α) −t(α,n−1)
-1.65
Critical value 0
20 / 58
5. Take the Decision
21 / 58
Numerical Example
Information gathered:
I the mean and std. dev. of the student grades in BBS
22 / 58
Numerical Example
23 / 58
Numerical Example
X
-1.96 0 1.96 Z*=4.5
Critical value Critical value
24 / 58
Numerical Example
|Z ∗ | > Z
25 / 58
Two-sample Hypothesis Testing – Paired3
3
Lind et al., Chapters 10 & 11
26 / 58
Preparation for the Test
27 / 58
Preparation for the Test
28 / 58
Procedure of Paired Test
the most commonly used levels are: 0.01, 0.05, and 0.1
29 / 58
Procedure of Paired Test
30 / 58
Procedure of Paired Test
under two-tailed test: the critical value puts α/2 on either tail
of the distribution
t(α/2,n−1)
t(α,n−1)
31 / 58
Procedure of Paired Test
µ1 - µ2
Critical region Critical region
(rejection region) (rejection region)
32 / 58
Numerical Example
33 / 58
Numerical Example
H 0 : µ1 ≤ µ2 vs. H1 : µ1 > µ2
34 / 58
Numerical Example
Home Firm 1 Firm 2 di (di − d̄) (di − d̄)2
1 235 228 7 2.4 5.76
2 210 205 5 0.4 0.16
3 231 219 12 7.4 54.76
4 242 240 2 -2.6 6.76
5 205 198 7 2.4 5.76
6 230 223 7 2.4 5.76
7 231 227 4 -0.6 0.36
8 210 215 -5 -9.6 92.16
9 225 222 3 -1.6 2.56
10 249 245 4 -0.6 0.36
46 0 174.4
r
174.4
d¯ = 46/10 = 4.6 sd = = 4.402
10 − 1
35 / 58
Numerical Example
d¯ 4.6
t∗ = √ = √ = 3.305
sd / n 4.402/ 10
36 / 58
Numerical Example
37 / 58
Two-sample Hypothesis Testing - Unpaired4
4
Lind et al., Chapters 10-11
38 / 58
Preparation for the Test
39 / 58
Procedure of the Test
the most commonly used levels are: 0.01, 0.05, and 0.1
40 / 58
Procedure of the Test
41 / 58
Procedure of the Test
42 / 58
Procedure of the Test
43 / 58
Procedure of the Test
x̄1 − x̄2
t∗ = s
sp2 sp2
+
n1 n2
44 / 58
Procedure of the Test
x̄1 − x̄2
t∗ = s
s12 s2
+ 2
n1 n2
[(s12 /n1 ) + (s22 /n2)]2
d.f =
(s12 /n1 )2 (s 2 /n2 )2
+ 2
n1 − 1 n2 − 1
45 / 58
Procedure of the Test
under two-tailed test: the critical value puts α/2 on either tail
of the distribution
46 / 58
Procedure of the Test
µ1 - µ2
Critical region Critical region
(rejection region) (rejection region)
47 / 58
Numerical Example 1
48 / 58
Numerical Example 1
49 / 58
Numerical Example 1
50 / 58
Numerical Example 2
Method 1 (minutes) 2 4 9 3 2
Method 2 (minutes) 3 7 5 8 4 3
51 / 58
Numerical Example 2
H 0 : µ1 = µ2 vs. H1 : µ1 6= µ2
52 / 58
Numerical Example 2
x1 x2 x12 x22
2 3 4 9
4 7 16 49
9 5 81 25
3 8 9 64
2 4 4 16
3 9
20 30 114 172
20 30
x̄1 = =4 x̄2 = =5
5 6
114 − 5(4)2 172 − 6(5)2
s12 = = 8.5 s22 = = 4.4
4 5
53 / 58
Numerical Example 2
54 / 58
Numerical Example 2
|t ∗ | < t ⇒ do no reject H0
Do not
Rejection region Rejection region
reject H0
.05 .05
X
-1.833 -0.662 0 1.833
Critical value Critical value
55 / 58
Numerical Example 3
Brand A Brand B
sample size 9 12
56 / 58
Numerical Example 3
57 / 58
Numerical Example 3
58 / 58