0% found this document useful (0 votes)
39 views

SB K49 Lecture9

This document provides an overview of two-sample hypothesis tests. It discusses tests comparing two independent samples when the population variances are known, unknown but assumed equal, and unknown but assumed unequal. It outlines the assumptions, test statistics, hypotheses and procedures for two-sample z-tests when variances are known and two-sample t-tests when variances are unknown in each case. Examples are provided to illustrate how to perform the tests and interpret the results. The key information covered includes the test statistics, degrees of freedom, critical values and decisions for both equal and unequal variance cases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

SB K49 Lecture9

This document provides an overview of two-sample hypothesis tests. It discusses tests comparing two independent samples when the population variances are known, unknown but assumed equal, and unknown but assumed unequal. It outlines the assumptions, test statistics, hypotheses and procedures for two-sample z-tests when variances are known and two-sample t-tests when variances are unknown in each case. Examples are provided to illustrate how to perform the tests and interpret the results. The key information covered includes the test statistics, degrees of freedom, critical values and decisions for both equal and unequal variance cases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Session 9: Two-Sample

Hypothesis Tests
Statistics for Business
Dr. Le Anh Tuan

3
Contents
►Two-sample tests

►Two independent samples

►σ12 and σ22 Known

►σ12 and σ22 Unknown and Assumed


Equal

►σ12 and σ22 Unknown and Assumed


Unequal

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.

Two Sample Tests

Population Means, Population Means,


Population
Dependent Independent
Proportions
Samples Samples

Same group Group 1 vs. Proportion 1 vs.


before vs. after independent Proportion 2
treatment Group 2

5
Dependent vs Independent

►Two samples are independent if the sample


values from one population are not related to or
somehow naturally paired or matched with the
sample values from the other population.

►Two samples are dependent (or consist of


matched pairs) if the sample values are
somehow matched where the matching is based
on some inherent relationship.

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).

►For the population 1, we let:


►!1 = $%$&'()*%+ ,-(+
► /̅ 1 = 0(,$'- 1 ,-(+
►12 = $%$&'()*%+ 1 34
►02 = 0(,$'- 1 34
►+2 = 0*5- %6 0(,$'- 1

►The corresponding notations !2, /̅ 2 , 18 , 08 , +8 , apply to


population 2.
9
Hypothesis

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

Two Population Means, Independent


Samples, Variances Known
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

-za za -za/2 za/2


Reject H0 if z < -za Reject H0 if z > za Reject H0 if z < -za/2
or z > za/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

► At α = 0.05, critical value z=1.645


► P(z>a)=0.05=> P(z<a)=0.95 => C2: z=1.645

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

►Three conditions are necessary to use a t-test for small


independent samples.
►Samples are randomly and independently drawn
► Populations are normally distributed
► Population variances/SDs are unknown but
assumed equal.

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

-ta ta -ta/2 ta/2


Reject H0 if Reject H0 if Reject H0 if
t < -t (n1+n2 – 2), a t > t (n1+n2 – 2), a t < -t (n1+n2 – 2), a/2 or
t > t (n1+n2 – 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

► Because sample is small and population SD is unknown, we use


Student’s distribution.
► At α = 0.05, and degree of freedom n1+n2-2=21 + 25 − 2 = 44
=> critical t-value (5%)= ± 2.015
► At α = 0.01, and degree of freedom =44
=> critical value at 1%=2.692
► t=2.040 < critical value 1% => fail to reject H0 => μ1 = μ2 => no
difference in dividends ratios between A and B.

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

►Three conditions are necessary to use a t-test for small


independent samples.
►Samples are randomly and independently drawn
► Populations are normally distributed
► Population variances/ SDs are unknown but
assumed unequal

24
σ12 and σ22 Unknown, Assumed Unequal
►Test statistic and degree of freedom are:

►A conservative quick rule for degrees of freedom is to


use
Minimum of n1 – 1 or n2 – 1
►Samples (n1=21, n2=25)
►df=min(21-1, 25-1)=min(20,24)=20 + significance level => t
critical value.
25
σ12 and σ22 Unknown, Assumed Unequal

Minimum of
n1 – 1 or n2 – 1

26
σ12 and σ22 Unknown, Assumed Unequal

27
28

You might also like