You are on page 1of 48

Statistics for

Business and Economics


6th Edition

Chapter 11
Hypothesis Testing II

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 11-1

Chapter Goals
After completing this chapter, you should be able to:

Test hypotheses for the difference between two population means

Two means, matched pairs

Independent populations, population variances known

Independent populations, population variances unknown but


equal

Complete a hypothesis test for the difference between two


proportions (large samples)

Use the chi-square distribution for tests of the variance of a normal


distribution

Use the F table to find critical F values

Complete an F test for the equality of two variances

Two Sample Tests


Two Sample Tests

Population
Means,
Matched
Pairs

Population
Means,
Independent
Samples

Population
Proportions

Population
Variances

Examples:
Same group
before vs. after
treatment

Group 1 vs.
independent
Group 2

Proportion 1 vs.
Proportion 2

(Note similarities to Chapter 9)

Variance 1 vs.
Variance 2

Matched Pairs
Tests Means of 2 Related Populations
Matched
Pairs

Paired or matched samples


Repeated measures (before/after)
Use difference between paired values:

di = xi - yi

Assumptions:
Both Populations Are Normally Distributed

Test Statistic: Matched Pairs


Matched
Pairs

The test statistic for the mean


difference is a t value, with
n 1 degrees of freedom:

d D0
t
sd
n
Where
D0 = hypothesized mean difference
sd = sample standard dev. of differences
n = the sample size (number of pairs)

Decision Rules: Matched Pairs


Paired Samples
Lower-tail test:

Upper-tail test:

Two-tail test:

H0: x y 0
H1: x y < 0

H0: x y 0
H1: x y > 0

H0: x y = 0
H1: x y 0

-t

Reject H0 if t < -tn-1,


Where

Reject H0 if t > tn-1,


t

d D0
sd
n

has n - 1 d.f.

/2
-t/2

/2
t/2

Reject H0 if t < -tn-1 ,


or t > tn-1 ,

Matched Pairs Example


Assume you send your salespeople to a customer
service training workshop. Has the training made a
difference in the number of complaints? You collect
the following data:
di
d = n
Number of Complaints:
(2) - (1)

Salesperson
C.B.
T.F.
M.H.
R.K.
M.O.

Before (1)
6
20
3
0
4

After (2)
4
6
2
0
0

Difference, di
- 2
-14
- 1
0
- 4
-21

= - 4.2
Sd

2
(d

d
)
i

5.67

n 1

Matched Pairs: Solution


Has the training made a difference in the number of

complaints (at the = 0.01 level)?


H0: x y = 0
H1: x y 0
= .01

d = - 4.2

Critical Value = 4.604


d.f. = n - 1 = 4

Test Statistic:

d D0 4.2 0
t

1.66
sd / n 5.67/ 5

Reject

Reject

/2

/2

- 4.604

4.604

- 1.66

Decision: Do not reject H0


(t stat is not in the reject region)

Conclusion: There is not a


significant change in the
number of complaints.

Difference Between Two Means


Population means,
independent
samples

Goal: Form a confidence interval


for the difference between two
population means, x y

Different data sources


Unrelated
Independent

Sample selected from one population has no effect on the


sample selected from the other population

Difference Between Two Means


(continued)

Population means,
independent
samples
x2 and y2 known

Test statistic is a z value

x2 and y2 unknown
x2 and y2
assumed equal
x2 and y2
assumed unequal

Test statistic is a a value from the


Students t distribution

x2 and y2 Known
Population means,
independent
samples
x2 and y2 known
x2 and y2 unknown

Assumptions:

Samples are randomly and


independently drawn
both population distributions
are normal
Population variances are
known

x2 and y2 Known
(continued)

When x2 and y2 are known and


both populations are normal, the
variance of X Y is

Population means,
independent
samples

x2 and y2 known
x2 and y2 unknown

2X Y

2
y
x

nx
ny

and the random variable


Z

(x y) (X Y )
2
2x y

nX nY

has a standard normal distribution

Test Statistic,
x2 and y2 Known
Population means,
independent
samples
x2 and y2 known
x2 and y2 unknown

The test statistic for


x y is:

x y D0
z
2

y
x

nx
ny

Hypothesis Tests for


Two Population Means
Two Population Means, Independent Samples
Lower-tail test:

Upper-tail test:

Two-tail test:

H0: x y
H1: x < y

H0: x y
H1: x > y

H0: x = y
H1: x y

i.e.,

i.e.,

i.e.,

H0: x y 0
H1: x y < 0

H0: x y 0
H1: x y > 0

H0: x y = 0
H1: x y 0

Decision Rules
Two Population Means, Independent
Samples, Variances Known
Lower-tail test:

Upper-tail test:

Two-tail test:

H0: x y 0
H1: x y < 0

H0: x y 0
H1: x y > 0

H0: x y = 0
H1: x y 0

-z

Reject H0 if z < -z

z
Reject H0 if z > z

/2
-z/2

/2
z/2

Reject H0 if z < -z/2


or z > z/2

x2 and y2 Unknown,
Assumed Equal
Assumptions:

Population means,
independent
samples

Samples are randomly and


independently drawn

x2 and y2 known

Populations are normally


distributed

x2 and y2 unknown
x2 and y2
assumed equal
x2 and y2
assumed unequal

Population variances are


unknown but assumed equal

x2 and y2 Unknown,
Assumed Equal
(continued)

Forming interval
estimates:

Population means,
independent
samples

The population variances


are assumed equal, so use
the two sample standard
deviations and pool them to
estimate

x2 and y2 known
x2 and y2 unknown
x2 and y2
assumed equal
x2 and y2
assumed unequal

use a t value with


(nx + ny 2) degrees of
freedom

Test Statistic,
x2 and y2 Unknown, Equal
The test statistic for
x y is:

x2 and y2 unknown
x2 and y2
assumed equal
x2 and y2
assumed unequal

x y x y
1 1
S

n n
y
x
2
p

Where t has (n1 + n2 2) d.f.,


and

sp2

(n x 1)s2x (ny 1)s2y


nx ny 2

x2 and y2 Unknown,
Assumed Unequal
Assumptions:

Population means,
independent
samples

Samples are randomly and


independently drawn

x2 and y2 known

Populations are normally


distributed

x2 and y2 unknown

Population variances are


unknown and assumed
unequal

x2 and y2
assumed equal
x2 and y2
assumed unequal

x2 and y2 Unknown,
Assumed Unequal
(continued)

Forming interval estimates:

Population means,
independent
samples

The population variances are


assumed unequal, so a pooled
variance is not appropriate

x2 and y2 known

use a t value with degrees


of freedom, where

x2 and y2 unknown
x2 and y2
assumed equal
x2 and y2
assumed unequal

s 2x
s 2y
( ) ( )
n y
n x
2

s 2y

s
/(n y 1)

/(n x 1)

n
y
nx

2
x

Test Statistic,
x2 and y2 Unknown, Unequal
The test statistic for
x y is:

x2 and y2 unknown
x2 and y2
assumed equal
x2 and y2
assumed unequal

(x y) D0

Where t has degrees of freedom:

2
y

nX nY
2
x

s 2x
s 2y
( ) ( )
n y
n x
2

s2
s 2x

/(n x 1) y /(n y 1)
n
nx
y

Decision Rules
Two Population Means, Independent
Samples, Variances Unknown
Lower-tail test:

Upper-tail test:

Two-tail test:

H0: x y 0
H1: x y < 0

H0: x y 0
H1: x y > 0

H0: x y = 0
H1: x y 0

-t

Reject H0 if t < -tn-1,

t
Reject H0 if t > tn-1,
Where t has n - 1 d.f.

/2
-t/2

/2
t/2

Reject H0 if t < -tn-1 ,


or t > tn-1 ,

Pooled Variance t Test: Example


You are a financial analyst for a brokerage firm. Is there
a difference in dividend yield between stocks listed on the
NYSE & NASDAQ? You collect the following data:

NYSE
Number
21
Sample mean
3.27
Sample std dev 1.30

NASDAQ
25
2.53
1.16

Assuming both populations are


approximately normal with
equal variances, is
there a difference in average
yield ( = 0.05)?

Calculating the Test Statistic


The test statistic is:

X
t

X 2 1 2
1 1
S

n1 n2
2
p

3.27 2.53 0
1
1
1.5021

21 25

2
2
2
2

1
S

1
S
21

1
1.30

25

1
1.16
1
2
2
S2 1

(n1 1) (n2 1)

(21 - 1) (25 1)

2.040

1.5021

Solution
H0: 1 - 2 = 0 i.e. (1 = 2)

Reject H0

Reject H0

H1: 1 - 2 0 i.e. (1 2)
= 0.05
df = 21 + 25 - 2 = 44
Critical Values: t = 2.0154

.025

-2.0154

.025

0 2.0154

2.040

Decision:
Test Statistic:
3.27 2.53
t
2.040 Reject H0 at = 0.05
1
1
1.5021

Conclusion:

21 25

There is evidence of a
difference in means.

Two Population Proportions


Population
proportions

Goal: Test hypotheses for the


difference between two population
proportions, Px Py
Assumptions:
Both sample sizes are large,
nP(1 P) > 9

Two Population Proportions


(continued)

Population
proportions

The random variable


Z

(p x p y ) (p x p y )
p x (1 p x ) p y (1 p y )

nx
ny

is approximately normally distributed

Test Statistic for


Two Population Proportions
The test statistic for
H0: Px Py = 0

Population
proportions

is a z value:

p y

p 0 (1 p 0 ) p 0 (1 p 0 )

nx
ny
Where

p 0

n xp x n yp y
nx ny

Decision Rules: Proportions


Population proportions
Lower-tail test:

Upper-tail test:

Two-tail test:

H0: px py 0
H1: px py < 0

H0: px py 0
H1: px py > 0

H0: px py = 0
H1: px py 0

-z

Reject H0 if z < -z

z
Reject H0 if z > z

/2
-z/2

/2
z/2

Reject H0 if z < -z
or z > z

Example:
Two Population Proportions
Is there a significant difference between the
proportion of men and the proportion of
women who will vote Yes on Proposition A?

In a random sample, 36 of 72 men and 31 of


50 women indicated they would vote Yes

Test at the .05 level of significance

Example:
Two Population Proportions
(continued)

The hypothesis test is:

H0: PM PW = 0 (the two proportions are equal)


H1: PM PW 0 (there is a significant difference between
proportions)

The sample proportions are:

p M = .50
= 36/72

Men:

Women:

p W = 31/50 = .62

The estimate for the common overall proportion is:

p 0

n xp x n yp y
nx ny

72(36/72) 50(31/50) 67

.549
72 50
122

Example:
Two Population Proportions
(continued)

The test statistic for PM PW = 0 is:


z

p W
p 0 (1 p 0 ) p 0 (1 p 0 )

n1
n2

Reject H0

Reject H0

.025

.025

-1.96
-1.31

1.96

.50 .62
.549 (1 .549) .549 (1 .549)

72
50

1.31

Critical Values = 1.96


For = .05

Decision: Do not reject H0


Conclusion: There is not
significant evidence of a
difference between men
and women in proportions
who will vote yes.

Hypothesis Tests of
one Population Variance
Population
Variance

Goal: Test hypotheses about the


population variance, 2

If the population is normally distributed,

2
n 1

(n 1)s

follows a chi-square distribution with


(n 1) degrees of freedom

Confidence Intervals for the


Population Variance
(continued)

Population
Variance

The test statistic for


hypothesis tests about one
population variance is

2
n 1

(n 1)s

02

Decision Rules: Variance


Population variance
Lower-tail test:

Upper-tail test:

Two-tail test:

H0: 2 02
H1: 2 < 02

H0: 2 02
H1: 2 > 02

H0: 2 = 02
H1: 2 02

n21,1

n21,

Reject H0 if

2
n 1

2
n 1,1

Reject H0 if

n21 n21,

/2

/2

n21,1 / 2

n21, / 2

Reject H0 if

n21 n21, / 2

or

n21 n21,1 / 2

Hypothesis Tests for Two Variances


Tests for Two
Population
Variances
F test statistic

Goal: Test hypotheses about two


population variances
H0: x2 y2
H1: x2 < y2
H0: x2 y2
H1: x2 > y2
H0: x2 = y2
H1: x2 y2

Lower-tail test

Upper-tail test

Two-tail test

The two populations are assumed to be


independent and normally distributed

Hypothesis Tests for Two Variances


(continued)

Tests for Two


Population
Variances
F test statistic

The random variable


2
x
2
y

s /
F
s /

2
x
2
y

Has an F distribution with (nx 1)


numerator degrees of freedom and (ny
1) denominator degrees of freedom

Denote an F value with 1 numerator and 2


denominator degrees of freedom by

Test Statistic
Tests for Two
Population
Variances
F test statistic

The critical value for a hypothesis test


about two population variances is

s
F
s

2
x
2
y

where F has (nx 1) numerator


degrees of freedom and (ny 1)
denominator degrees of freedom

Decision Rules: Two Variances


Use sx2 to denote the larger variance.

H0: x2 = y2
H1: x2 y2

H0: x2 y2
H1: x2 > y2

/2

Do not
reject H0

Reject H0

Fn x 1,ny 1,

Reject H0 if F Fn x 1,ny 1,

Do not
reject H0

Reject H0

Fnx 1,ny 1, / 2

rejection region for a twotail test is:

Reject H0 if F Fnx 1,n y 1, / 2


where sx2 is the larger of the
two sample variances

Example: F Test
You are a financial analyst for a brokerage firm. You want
to compare dividend yields between stocks listed on the
NYSE & NASDAQ. You collect the following data :
NYSE
NASDAQ
Number
2125
Mean
3.272.53
Std dev
1.301.16
Is there a difference in the
variances between the
NYSE
& NASDAQ at the = 0.10 level?

F Test: Example Solution

Form the hypothesis test:


H0: x2 = y2 (there is no difference between variances)
H1: x2 y2 (there is a difference between variances)
Find the F critical values for = .10/2:

Degrees of Freedom:
Numerator
(NYSE has the larger
standard deviation):

nx 1 = 21 1 = 20 d.f.

Denominator:

ny 1 = 25 1 = 24 d.f.

Fn x 1, ny 1, / 2
F20 , 24 , 0.10/2 2.03

F Test: Example Solution


(continued)

The test statistic is:

H0: x2 = y2
H1: x2 y2

s2x 1.30 2
F 2
1.256
2
s y 1.16

F = 1.256 is not in the rejection


region, so we do not reject H0

/2 = .05
Do not
reject H0

Reject H0

F20 , 24 , 0.10/2 2.03

Conclusion: There is not sufficient evidence


of a difference in variances at = .10

Two-Sample Tests in EXCEL


For paired samples (t test):

Tools | data analysis | t-test: paired two sample for means

For independent samples:

Independent sample Z test with variances known:

Tools | data analysis | z-test: two sample for means

For variances

F test for two variances:

Tools | data analysis | F-test: two sample for variances

Two-Sample Tests in PHStat

Sample PHStat Output

Input

Output

Sample PHStat Output


(continued)

Input

Output

Chapter Summary

Compared two dependent samples (paired


samples)

Compared two independent samples

Performed paired sample t test for the mean


difference
Performed z test for the differences in two means
Performed pooled variance t test for the differences
in two means

Compared two population proportions

Performed z-test for two population proportions

Chapter Summary
(continued)

Used the chi-square test for a single population


variance

Performed F tests for the difference between


two population variances

Used the F table to find F critical values

You might also like