You are on page 1of 42

Chapter 11

Hypothesis Testing II
Statistics for
Business and Economics
6
th
Edition
Setelah menyelesaikan bab ini, anda akan mampu :
- Melakukan uji hipotesis untuk perbedaan dua rata-rata
populasi
- Data berpasangan
- Populasi Independen, variansi populasi diketahui
- Populasi Independen, variansi populasi tak diketahui
- Melakukan uji hipotesis dua proporsi (sampel besar )
- Use the F table to find critical F values
- Complete an F test for the equality of two variances
Chapter Goals
Two Sample Tests
Two Sample Tests
Population
Means,
Independent
Samples
Population
Means,
Matched
Pairs
Population
Variances
Group 1 vs.
independent
Group 2
Same group
before vs. after
treatment
Variance 1 vs.
Variance 2
Examples:
Population
Proportions
Proportion 1 vs.
Proportion 2
(Note similarities to Chapter 9)
Tests Means of 2 Related Populations
- Paired or matched samples
- Repeated measures (before/after)
- Use difference between paired values:



- Compute the average and standard dev of d
i

- Assumptions:
- Both Populations Are Normally Distributed
Matched Pairs
d
i
= x
i
- y
i
The test statistic for the mean
difference is a t value, with
n 1 degrees of freedom:
Test Statistic: Matched Pairs
n
s
D d
t
d
0

=
Where
D
0
= hypothesized mean difference
s
d
= sample standard dev. of differences
n = the sample size (number of pairs)

Decision Rules: Matched Pairs

Lower-tail test:

H
0
:
x

y
> 0
H
1
:
x

y
< 0
Upper-tail test:

H
0
:
x

y
0

H
1
:
x

y
> 0
Two-tail test:

H
0
:
x

y
= 0

H
1
:
x

y
0
Paired Samples
o o/2 o/2 o
-t
o
-t
o/2
t
o
t
o/2
Reject H
0
if t < -t
n-1, o
Reject H
0
if t > t
n-1, o
Reject H
0
if t < -t
n-1 , o/2


or t > t
n-1 , o/2


Where
n
s
D d
t
d
0

=
has n - 1 d.f.
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:

Matched Pairs Example
Complaints:
S.person Before (1) After (2) d
i


1 6 4 - 2
2 20 6 -14
3 3 2 - 1
4 0 0 0
5 4 0 - 4
-21
d =
E
d
i


n
5.67
1 n
) d (d
S
2
i
d
=

= - 4.2
Has the training made a difference
in the number of complaints?
- 4.2 d =
1.66
5 5.67/
0 4.2
n / s
D d
t
d
0
=

=

=
H
0
:
x

y
= 0
H
1
:
x

y
= 0
Test Statistic:
Critical Value = 4.604
d.f. = n - 1 = 4
Reject
o/2
- 4.604 4.604
Decision: Do not reject H
0
(t stat is not in the reject region)
Conclusion: There is not a
significant change in the
number of complaints.
Matched Pairs: Solution
Reject
o/2
- 1.66
o = .01
- Sumber data berbeda, pop 1 dan pop 2
- Tidak berhubungan atau berpasangan
- Independen
-Sampel yang diambil dari satu populasi
tidak berpengaruh terhadap sampel dari
populasi lain

Difference Between Two Means
Tujuan: Menguji perbedaan dua rata-rata
populasi independent,
x

y

Difference Between Two Means
Population means,
independent
samples
Test statistic is a z value

Test statistic is a a value from the
Students t distribution

x
2
and
y
2

assumed equal

x
2
and
y
2
known

x
2
and
y
2
unknown

x
2
and
y
2

assumed unequal

x
2
and
y
2
Known
Population means,
independent
samples
Assumptions:

Samples are randomly and
independently drawn

both population distributions
are normal

Population variances are
known
*

x
2
and
y
2
known

x
2
and
y
2
unknown

x
2
and
y
2
Known
Population means,
independent
samples
and the statistic





has a standard normal distribution
When
x
2
and
y
2
are known and
both populations are normal, the
variance of X Y is
y
2
y
x
2
x
2
Y X
n

+ =

*
Y
2
y
X
2
x
Y X
n

) ( ) y x (
Z
+

=

x
2
and
y
2
known

x
2
and
y
2
unknown
Hypothesis Tests for
Two Population Means
Lower-tail test:

H
0
:
x
>
y

H
1
:
x
<
y


i.e.,

H
0
:
x

y
> 0
H
1
:
x

y
< 0
Upper-tail test:

H
0
:
x

y
H
1
:
x
>
y
i.e.,

H
0
:
x

y
0
H
1
:
x

y
> 0
Two-tail test:

H
0
:
x
=
y
H
1
:
x

y
i.e.,

H
0
:
x

y
= 0
H
1
:
x

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

H
0
:
x

y
> 0
H
1
:
x

y
< 0
Upper-tail test:

H
0
:
x

y
0
H
1
:
x

y
> 0
Two-tail test:

H
0
:
x

y
= 0
H
1
:
x

y
0
o o/2 o/2 o
-z
o
-z
o/2
z
o
z
o/2
Reject H
0
if z < -z
o
Reject H
0
if z > z
o
Reject H
0
if z < -z
o/2

or z > z
o/2

x
2
and
y
2
Unknown,
Assumed Equal
Population means,
independent
samples
Assumptions:

Samples are randomly and
independently drawn

Populations are normally
distributed

Population variances are
unknown but assumed equal

*

x
2
and
y
2

assumed equal

x
2
and
y
2
known

x
2
and
y
2
unknown

x
2
and
y
2

assumed unequal

x
2 and
y
2
Unknown,
Assumed Equal
Population means,
independent
samples
Test Hypotheses:

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

use a t value with
(n
x
+ n
y
2) degrees of
freedom
*

x
2
and
y
2

assumed equal

x
2
and
y
2
known

x
2
and
y
2
unknown

x
2
and
y
2

assumed unequal
Test Statistic,

x
2
and
y
2
Unknown, Equal
*

x
2
and
y
2

assumed equal

x
2
and
y
2
unknown

x
2
and
y
2

assumed unequal
2 n n
1)s (n 1)s (n
s
y x
2
y y
2
x x 2
p
+
+
=
Where t has (n
1
+ n
2
2) d.f.,
and
( ) ( )
|
|
.
|

\
|
+

=
y x
2
p
y x
n
1
n
1
S

t
y x
The test statistic for

x

y
is:

x
2
and
y
2
Unknown,
Assumed Unequal
Population means,
independent
samples
Assumptions:

Samples are randomly and
independently drawn

Populations are normally
distributed

Population variances are
unknown and assumed
unequal

*

x
2
and
y
2

assumed equal

x
2
and
y
2
known

x
2
and
y
2
unknown

x
2
and
y
2

assumed unequal

x
2
and
y
2
Unknown,
Assumed Unequal
Population means,
independent
samples
Forming interval estimates:

The population variances are
assumed unequal, so a pooled
variance is not appropriate

use a t value with v degrees
of freedom, where

x
2
and
y
2
known

x
2
and
y
2
unknown
*

x
2
and
y
2

assumed equal

x
2
and
y
2

assumed unequal
1) /(n
n
s
1) /(n
n
s
)
n
s
( )
n
s
(
y
2
y
2
y
x
2
x
2
x
2
y
2
y
x
2
x

|
|
.
|

\
|
+
|
|
.
|

\
|
(
(

+
= v
Test Statistic,

x
2
and
y
2
Unknown, Unequal
*

x
2
and
y
2

assumed equal

x
2
and
y
2
unknown

x
2
and
y
2

assumed unequal
1) /(n
n
s
1) /(n
n
s
)
n
s
( )
n
s
(
y
2
y
2
y
x
2
x
2
x
2
y
2
y
x
2
x

|
|
.
|

\
|
+
|
|
.
|

\
|
(
(

+
= v
Where t has v degrees of freedom:
The test statistic for

x

y
is:
Y
2
y
X
2
x
0
n

D ) y x (
t
+

=
Decision Rules

Lower-tail test:

H
0
:
x

y
> 0
H
1
:
x

y
< 0
Upper-tail test:

H
0
:
x

y
0

H
1
:
x

y
> 0
Two-tail test:

H
0
:
x

y
= 0

H
1
:
x

y
0
o o/2 o/2 o
-t
o
-t
o/2
t
o
t
o/2
Reject H
0
if t < -t
n-1, o
Reject H
0
if t > t
n-1, o
Reject H
0
if t < -t
n-1 , o/2


or t > t
n-1 , o/2


Where t has n - 1 d.f.
Two Population Means, Independent
Samples, Variances Unknown
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 NASDAQ
Number 21 25
Sample mean 3.27 2.53
Sample std dev 1.30 1.16
Pooled Variance t Test: Example
Assuming both populations are
approximately normal with
equal variances, is
there a difference in average
yield (o = 0.05)?
Calculating the Test Statistic
( ) ( ) ( ) ( )
1.5021
1) 25 ( 1) - (21
1.16 1 25 1.30 1 21
1) n ( ) 1 (n
S 1 n S 1 n
S
2 2
2 1
2
2 2
2
1 1
2
p
=
+
+
=
+
+
=
( ) ( ) ( )
2.040
25
1
21
1
5021 . 1
0 2.53 3.27
n
1
n
1
S
X X
t
2 1
2
p
2 1
2 1
=
|
.
|

\
|
+

=
|
|
.
|

\
|
+

=
The test statistic is:
H
0
:
1
-
2
= 0 i.e. (
1
=
2
)
H
1
:
1
-
2
0 i.e. (
1

2
)
o = 0.05
df = 21 + 25 - 2 = 44
Critical Values: t = 2.0154

Test Statistic:
Solution
Decision:

Conclusion:

Reject H
0
at o = 0.05
There is evidence of a
difference in means.
t
0
2.0154 -2.0154
.025
Reject H
0
Reject H
0
.025
2.040
2.040
25
1
21
1
5021 . 1
2.53 3.27
t =
|
.
|

\
|
+

=
Two Population Proportions
Goal: Test hypotheses for the
difference between two population
proportions, P
x
P
y

Population
proportions
Assumptions:
Both sample sizes are large,
nP(1 P) > 9
- The random variable





is approximately normally distributed
Two Population Proportions
Population
proportions
y
y y
x
x x
y x y x
n
) p (1 p
n
) p (1 p
) p (p ) p p (
Z



=
Statistics for Business and Economics, 6e 2007 Pearson
Education, Inc.
Chap 11-27
Test Statistic for
Two Population Proportions
Population
proportions
The test statistic for
H
0
: P
x
P
y
= 0
is a z value:
( )
y
0 0
x
0 0
y x
n
) p (1 p
n
) p (1 p
p p
z

=
y x
y y x x
0
n n
p n p n
p
+
+
=

Where
Decision Rules: Proportions
Population proportions
Lower-tail test:

H
0
: p
x
p
y
> 0
H
1
: p
x
p
y
< 0
Upper-tail test:

H
0
: p
x
p
y
0
H
1
: p
x
p
y
> 0
Two-tail test:

H
0
: p
x
p
y
= 0
H
1
: p
x
p
y
0
o o/2 o/2 o
-z
o
-z
o/2
z
o
z
o/2
Reject H
0
if z < -z
o
Reject H
0
if z > z
o
Reject H
0
if z < -z
o/2

or z > z
o/2

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
- The hypothesis test is:
Statistics for Business and Economics, 6e 2007 Pearson
Education, Inc.
Chap 11-30

H
0
: P
M
P
W
= 0 (the two proportions are equal)
H
1
: P
M
P
W
0 (there is a significant difference between
proportions)
The sample proportions are:
Men: = 36/72 = .50
Women: = 31/50 = .62
.549
122
67
50 72
50(31/50) 72(36/72)
n n
p n p n
p
y x
y y x x
0
= =
+
+
=
+
+
=

The estimate for the common overall proportion is:


Example:
Two Population Proportions
(continued)
M
p

W
p

Example:
Two Population Proportions
The test statistic for P
M
P
W
= 0 is:
.025
-1.96

1.96

.025
-1.31

Decision: Do not reject H
0

Conclusion: There is not
significant evidence of a
difference between men
and women in proportions
who will vote yes.
( )
( )
1.31
50
.549) (1 .549
72
.549) (1 .549
.62 .50
n
) p (1 p
n
) p (1 p
p p
z
2
0 0
1
0 0
W M
=
|
.
|

\
|

=


Reject H
0
Reject H
0
Critical Values = 1.96
For o = .05
Hypothesis Tests for Two Variances
Tests for Two
Population
Variances
F test statistic
H
0
:
x
2
=
y
2

H
1
:
x
2

y
2

Two-tail test
Lower-tail test
Upper-tail test
H
0
:
x
2
>
y
2

H
1
:
x
2
<
y
2

H
0
:
x
2

y
2

H
1
:
x
2
>
y
2

Goal: Test hypotheses about two
population variances
The two populations are assumed to be
independent and normally distributed
Hypothesis Tests for Two Variances
Tests for Two
Population
Variances
F test statistic
2
y
2
y
2
x
2
x
/ s
/ s
F =
The random variable
Has an F distribution with (n
x
1)
numerator degrees of freedom and
(n
y
1) denominator degrees of
freedom
Denote an F value with v
1
numerator and v
2

denominator degrees of freedom by
Test Statistic
Tests for Two
Population
Variances
F test statistic
2
y
2
x
s
s
F =
The critical value for a hypothesis test
about two population variances is
where F has (n
x
1) numerator
degrees of freedom and (n
y
1)
denominator degrees of freedom
Decision Rules: Two Variances
rejection region for a two-
tail test is:
F
0
o

Reject H
0
Do not
reject H
0
F 0
o/2

Reject H
0
Do not
reject H
0
H
0
:
x
2
=
y
2

H
1
:
x
2

y
2

H
0
:
x
2

y
2

H
1
:
x
2
>
y
2

Use s
x
2
to denote the larger variance.

1, n 1, n
y x
F

2 / 1, n 1, n 0
y x
F F if H Reject

>
2 / 1, n 1, n
y x
F

where s
x
2
is the larger of
the two sample variances
1, n 1, n 0
y x
F F if H Reject

>
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 21 25
Mean 3.27 2.53
Std dev 1.30 1.16

Is there a difference in the
variances between the NYSE
& NASDAQ at the o = 0.10 level?
Example: F Test
- Form the hypothesis test:
H
0
:
x
2
=
y
2
(there is no difference between variances)
H
1
:
x
2

y
2
(there is a difference between variances)
F Test: Example Solution

Degrees of Freedom:
Numerator
(NYSE has the larger
standard deviation):
n
x
1 = 21 1 = 20 d.f.
Denominator:
n
y
1 = 25 1 = 24 d.f.
Find the F critical values for o = .10/2:

2.03 F
F
0.10/2 , 24 , 20
, 1 n , 1 n
y x
= =
2 /
- The test statistic is:
F Test: Example Solution
1.256
1.16
1.30
s
s
F
2
2
2
y
2
x
= = =
o/2 = .05

Reject H
0
Do not
reject H
0
H
0
:
x
2
=
y
2

H
1
:
x
2

y
2

F = 1.256 is not in the rejection
region, so we do not reject H
0

Conclusion: There is not sufficient evidence
of a difference in variances at o = .10

F
2.03 F
0.10/2 , 24 , 20
=
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 EXCEL
Two-Sample Tests in PHStat
Sample PHStat Output
Input
Output
Sample PHStat Output
Input
Output

You might also like