You are on page 1of 18

Chapter 10

Two-Sample Tests
David Chow
Nov 2014

Learning Objectives
In this chapter, you learn how to use hypothesis testing to
compare the:
a.

1 = 2? Means of two independent populations

b.

1 = 2? Proportions of two independent populations,

c.

Variances of two independent populations (F-test)

Only part (c), F-test of two variances, is covered in


the exam

Any Difference Between 1 & 2?


Comparing Means: Want to know if 1 = 2
The question can also be posed in the form of a one-

tailed test such as 1 > 2


Eg: TOFEL scores from HK and Singapore students

Comparing Proportions: Test if 1 = 2


Eg: Proportion of students in a relationship (yr1 vs yr4)
Eg: Passing proportion in math (local vs int schools )
Eg: Proportion of contact-lens users (male vs female)

Some Funny Findings


DSME 2010, Fall 2011

Sleeping duration
related to societal activities, living in campus

not related to gender, part-time, dating

No. of FB friends
not related to gender, majors

related to no. of siblings

More phone conversations


related to smartphone users, gender

Skipping classes
1:58 PM
4

Two-Sample Tests
Independent Populations
Assumptions:

Independent
Population Means

1 and 2 known

1 and 2 unknown

population distributions are normal


Or sample size 30 for each sample
Samples are randomly and independently drawn
Independence: sample selected from one
population has no effect on the sample
selected from the other population

Use a Z test statistic


Use S to estimate unknown ,
use a t test statistic
5

F-Test of Population
Variances

Testing Population Variances


Purpose: To determine if two independent

populations have the same variability.


H0: 12 = 22
H1: 12 22

H0: 12 22
H1: 12 < 22

H0: 12 22
H1: 12 > 22

Two-tail test

Lower-tail test

Upper-tail test

Testing Population Variances


Assume each population distributions
is normally distributed, then the ratio
of the two sample variances follows
the F distribution.

The test statistic is:

S12
F 2
S2

S12 = Variance of Sample 1 (usu the larger one)


n1 - 1 = numerator degrees of freedom

S 22 = Variance of Sample 2
n2 - 1 = denominator degrees of freedom
8

Testing Population Variances


The critical F-value is found from the F table.
There are two appropriate degrees of freedom:
numerator degrees of freedom (column),
denominator degrees of freedom (row).

Testing Population Variances


Lower-tail test

Upper-tail test

H0: 12 22
H1: 12 < 22

H0: 12 22
H1: 12 > 22

0
Reject
H0

FL

Do not
reject H0
Reject H0 if F < FL

Do not
reject H0

FU

Reject H0

Reject H0 if F > FU

10

Testing Population Variances


Two-tail test

H0: 12 = 22
H1: 12 22

Rejection region for


a two-tail test is:

/2

S12
F 2 FU
S2

/2
0

FL

Do not
reject H0

FU

Reject H0

S12
F 2 FL
S2
11

Testing Population Variances


To find the critical F values, FU and FL:
1. Find FU from the F table for n1 1 numerator
and n2 1 denominator degrees of freedom

1
F

2. Find FL using the formula: L F


U*

Check FU
only if

Where FU* is from the F table with n2 1 numerator and n1 1


denominator degrees of freedom (i.e., switch the d.f. from FU)
12

Eg: Dividend Yield


Is there a difference in the variances between the

NYSE & NASDAQ return rates at the = 0.05 level?


NYSE
21

NASDAQ
25

Mean

3.27

2.53

Std dev

1.30

1.16

Number

13

Example
Form the hypothesis test:
H0: 21 22 = 0

(there is no difference between variances)

H1: 21 22 0

(there is a difference between variances)

FU:

FL:

Numerator:
n1 1 = 21 1 = 20 d.f.
Denominator:

Numerator:
n2 1 = 25 1 = 24 d.f.
Denominator:

n2 1 = 25 1 = 24 d.f.

n1 1 = 21 1 = 20 d.f.

FU = F.025, 20, 24 = 2.33

FL = 1/F.025, 24, 20 = 0.41


14

15

Testing Population Variances


The test statistic is:

S12 1.30 2
F 2
1.256
2
S 2 1.16

/2 = .025

/2 = .025

0
Reject H0

Do not
reject H0

FL=0.41
F = 1.256 is not in the

rejection region, so we do
not reject H0

Reject H0

FU=2.33

Conclusion: There is insufficient

evidence of a difference in
variances at = .05
16

Review Questions
10.36 Find the upper critical F-value for a two-tailed test if
a. = 0.01, n1=16, n2=21
b. = 0.05, n1=16, n2=21
c. = 0.10, n1=16, n2=21

17

Review Questions
10.46 At the = 0.05 level, is there a difference in the
variances between the male & female anxiety level? The
scale runs from 20 (no anxiety) to 100 (highest level of
anxiety).
Male
FEMALE
Number
100
72
Mean
40.26
36.85
Std dev
13.35
9.42

18

You might also like