Upload
donald-yum
View
232
Download
0
Embed Size (px)
DESCRIPTION
lecture notes
Citation preview
1
Chapter 10
Two-Sample Tests
David Chow
Nov 2014
2
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
3
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)
4
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
5
Two-Sample Tests
Independent Populations
Independent
Population Means
1 and 2 known
1 and 2 unknown
Use a Z test statistic
Use S to estimate unknown ,
use a t test statistic
Assumptions:
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
6
F-Test of Population
Variances
7
Testing Population Variances
Purpose: To determine if two independent
populations have the same variability.
H0: 12 = 2
2
H1: 12 2
2
H0: 12 2
2
H1: 12 < 2
2
H0: 12 2
2
H1: 12 > 2
2
Two-tail test Lower-tail test Upper-tail test
8
Testing Population Variances
2
2
2
1
S
SF
The test statistic is:
= Variance of Sample 1 (usu the larger one)
n1 - 1 = numerator degrees of freedom
n2 - 1 = denominator degrees of freedom
= Variance of Sample 2
2
1S
2
2S
Assume each population distributions is normally distributed, then the ratio
of the two sample variances follows
the F distribution.
9
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).
10
Testing Population Variances
0
FL Reject H0 Do not reject H0
H0: 12 2
2
H1: 12 < 2
2
Reject H0 if F < FL
0
FU Reject H0 Do not
reject H0
H0: 12 2
2
H1: 12 > 2
2
Reject H0 if F > FU
Lower-tail test Upper-tail test
11
Testing Population Variances
L2
2
2
1
U2
2
2
1
FS
SF
FS
SF
Rejection region for a two-tail test is:
F 0 /2
Reject H0 Do not reject H0 FU
H0: 12 = 2
2
H1: 12 2
2
FL
/2
Two-tail test
12
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
*U
LF
1F 2. Find FL using the formula:
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)
Check FU
only if
13
Eg: Dividend Yield
Is there a difference in the variances between the
NYSE & NASDAQ return rates at the = 0.05 level?
NYSE NASDAQ
Number 21 25
Mean 3.27 2.53
Std dev 1.30 1.16
14
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)
Numerator:
n1 1 = 21 1 = 20 d.f.
Denominator:
n2 1 = 25 1 = 24 d.f.
FU = F.025, 20, 24 = 2.33
Numerator:
n2 1 = 25 1 = 24 d.f.
Denominator:
n1 1 = 21 1 = 20 d.f.
FL = 1/F.025, 24, 20 = 0.41
FU: FL:
15
16
Testing Population Variances
The test statistic is:
256.116.1
30.12
2
2
2
2
1 S
SF
0
/2 = .025
FU=2.33 Reject H0 Do not
reject H0
FL=0.41
/2 = .025
Reject H0 F
F = 1.256 is not in the
rejection region, so we do
not reject H0
Conclusion: There is insufficient
evidence of a difference in
variances at = .05
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