SB K49 Lecture9
SB K49 Lecture9
Hypothesis Tests
Statistics for Business
Dr. Le Anh Tuan
3
Contents
►Two-sample tests
4
Two-sample tests
► What Is a Two-Sample Test?
► A two-sample test compares two sample estimates with
each other
► Mean, median, variance, proportion.
5
Dependent vs Independent
6
Two independent samples
7
Two independent samples
Population means,
independent
samples
!" # $%& !# #
σx2 and σy2 known Test statistic is a z value
$'( )%*+%
! # $%& !# #
σx2 and" σy2 unknown
$'( ,%)%*+%
! # $%& ! #
σ"x2 and σy 2 #
$--,.(&
assumed (/,$0
equal Test statistic is a a value from the
2#and # Student’s t distribution
σ!x" $%&
σy !#
2
assumed unequal
$--,.(& ,%(/,$0
8
σ12 and σ22 Known
►Assumptions:
►Samples are randomly and independently drawn
►Both population distributions are normal
►Population variances/SD are known or each sample
size must be at least 30 (CLT).
10
σ12 and σ22 Known
►When σ12 and σ22 are known and both populations are
normal, the standard deviation of sample (1) – (2) is
►And z-statistic:
11
σ12 and σ22 Known
a a a/2 a/2
|z|>!"/$
12
Example
► A high school teacher claims that students in class A will score
higher on the score of class B in math. The mean math score for
49 students in class A is 22.1 and the population standard
deviation is 4.8. The mean math score for 44 students of class B
is 19.8 and the population standard deviation is 5.4. At α = 0.05,
can the teacher’s claim be supported?
Solutions
► Hypothesis:
H0: μ1 – μ2 ≤0 (μ1 – μ2 =0)
H1: μ1 – μ2 >0
13
Example
► Z=2.16
► Because z>critical value z0.05, we reject H0, thus μ1 – μ2 > 0
► There is enough evidence at the 5% level to support the teacher’s
claim that the score of class A is better on the score of class B.
14
σ12 and σ22 Unknown,
Assumed Equal
15
σ12 and σ22 Unknown, Assumed Equal
►If samples of size less than 30 are taken from normally-
distributed populations, a t-test (Student’s distribution)
may be used to test the difference between the
population means µ1 and µ2
16
σ12 and σ22 Unknown, Assumed Equal
17
σ12 and σ22 Unknown, Assumed Equal
Two Population Means, Independent
Samples, Variances Unknown
Lower-tail test: Upper-tail test: Two-tail test:
H0: μ1 – μ2 ³ 0 H0: μ1 – μ2 ≤ 0 H0: μ1 – μ2 = 0
H1: μ1 – μ2 < 0 H1: μ1 – μ2 > 0 H1: μ1 – μ2 ≠ 0
a a a/2 a/2
|t|>!"/$
18
Example
►You are a financial analyst for a brokerage firm. Is there a
difference in dividend yield between industries A and B?
You collect the following data:
A (1) B (2)
Num of obs (firms) 21 25
Sample mean 3.27 2.53
Sample std dev 1.30 1.16
a. Assuming both populations are approximately
normal with equal variances, is there a difference in
average yield (a = 0.05)?
b. Significance level =1%???
19
Example
►Hypothesis:
H0: μ1 – μ2 = 0
H1: μ1 – μ2 ≠ 0
20
Example
►Hypothesis:
H0: μ1 – μ2 = 0
H1: μ1 – μ2 ≠ 0
► Because sample is small and population SD is unknown, we use
Student distribution. At α = 0.05, and degree of freedom n1+n2-
2=21 + 25 − 2 = 44 => critical t-value= ± 2.015
► Test statistic
Theis:
test statistic is:
t=
(X 1 )
- X 2 - (μ1 - μ2 )
=
(3.27 - 2.53 ) - 0 = 2.040
æ1 1ö æ 1 1 ö
S çç + ÷÷
2
p
1.5021ç + ÷
è n1 n2 ø è 21 25 ø
Sp2 =
(n1 - 1)S12 + (n2 - 1)S2 2 = (21 - 1)1.30 2 + (25 - 1)1.16 2 = 1.5021
(n1 - 1) + (n2 - 1) (21 - 1) + (25 - 1)
21
Example
►Because |t|>critical value t, we reject H0 at 5%
significance level , thus μ1 – μ2 ≠ 0
►There is evidence of a difference in means.
Reject H0 Reject H0
.025 .025
-2.015 0 2.015
2.040
22
σ12 and σ22 Unknown,
Assumed Unequal
23
σ12 and σ22 Unknown, Assumed Unequal
►If samples of size less than 30 are taken from normally-
distributed populations, a t-test (Student’s distribution)
may be used to test the difference between the
population means µ1 and µ2
24
σ12 and σ22 Unknown, Assumed Unequal
►Test statistic and degree of freedom are:
Minimum of
n1 – 1 or n2 – 1
26
σ12 and σ22 Unknown, Assumed Unequal
27
28