Hypothesis Testing II

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 27

BMS1024 MANAGERIAL STATISTICS

BMS1024
MANAGERIAL
STATISTICS
Hypothesis Testing II:
Two-Sample Tests
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests Overview
Two Sample Tests
Independent
Population
Means
Means,
Related
Populations
Independent
Population
Variances
Group 1 vs.
Group 2
Same group
before vs. after
treatment
Variance 1 vs.
Variance 2
Examples
Independent
Population
Proportions
Proportion 1 vs.
Proportion 2
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent
Population Means

1
and
2
known

1
and
2
unknown
Goal: Test hypothesis or form
a confidence interval for the
difference between two
population means,
1

2

The point estimate for the
difference between sample
means:
X
1
X
2
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
Independent
Population Means

1
and
2
known

1
and
2
unknown
Different data sources
Independent: Sample selected
from one population has no
effect on the sample selected
from the other population
Use the difference between 2
sample means
Use Z test, pooled variance t
test, or separate-variance t test
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
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
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
Independent
Population Means

1
and
2
known

1
and
2
unknown
Assumptions:

Samples are randomly and
independently drawn

population distributions are
normal

BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
Independent
Population Means

1
and
2
known

1
and
2
unknown
When
1
and
2
are known and both
populations are normal, the test
statistic is a Z-value and the
standard error of X
1
X
2
is
2
2
2
1
2
1
X X
n

2 1
+ =

BMS1024 MANAGERIAL STATISTICS


Two-Sample Tests
Independent Population Means
Independent
Population Means

1
and
2
known

1
and
2
unknown
( ) ( )
2
2
2
1
2
1
2 1
2 1
n

X X
Z
+

=
The test statistic is:
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
Lower-tail test:

H
0
:
1
>
2

H
1
:
1
<
2


i.e.,

H
0
:
1

2
> 0
H
1
:
1

2
< 0
Upper-tail test:

H
0
:
1

2
H
1
:
1
>
2
i.e.,

H
0
:
1

2
0
H
1
:
1

2
> 0
Two-tail test:

H
0
:
1
=
2
H
1
:
1

2
i.e.,

H
0
:
1

2
= 0
H
1
:
1

2
0
Two Independent Populations, Comparing Means
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
Two Independent Populations, Comparing Means
Lower-tail test:

H
0
:
1

2
> 0
H
1
:
1

2
< 0
Upper-tail test:

H
0
:
1

2
0
H
1
:
1

2
> 0
Two-tail test:

H
0
:
1

2
= 0
H
1
:
1

2
0
o o/2 o/2 o
-z
o
-z
o/2
z
o
z
o/2
Reject H
0
if Z < -Z
a
Reject H
0
if Z > Z
a
Reject H
0
if Z < -Z
a/2

or Z > Z
a/2

BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
Independent
Population Means

1
and
2
known

1
and
2
unknown
Assumptions:

Samples are randomly and
independently drawn

Populations are normally
distributed

Population variances are
unknown but assumed equal
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
Independent
Population Means

1
and
2
known

1
and
2
unknown
Forming interval estimates:

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

the test statistic is a t value
with (n
1
+ n
2
2) degrees
of freedom
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
Independent
Population Means

1
and
2
known

1
and
2
unknown
The pooled standard
deviation is:
( ) ( )
1) n ( ) 1 (n
S 1 n S 1 n
S
2 1
2
2 2
2
1 1
p
+
+
=
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
Where t has (n
1
+ n
2
2) d.f., and
( ) ( )
|
|
.
|

\
|
+

=
2 1
2
p
2 1
2 1
n
1
n
1
S
X X
t
The test statistic is:
( ) ( )
1) n ( ) 1 (n
S 1 n S 1 n
S
2 1
2
2 2
2
1 1
2
p
+
+
=
Independent
Population Means

1
and
2
known

1
and
2
unknown
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
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
Assuming both populations are approximately normal with equal
variances, is there a difference in average yield (o = 0.05)?
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
( ) ( ) ( ) ( )
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
=
+
+
=
+
+
=
( ) ( ) ( )
040 2
25
1
21
1
5021 1
0 53 2 27 3
1 1
2 1
2
2 1
2 1
.
.
. .
n n
S
X X
t
p
=
|
.
|

\
|
+

=
|
|
.
|

\
|
+

=
The test statistic is:
BMS1024 MANAGERIAL STATISTICS
Two-Sample Tests
Independent Population Means
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
0.05/2,44
~ t
0.05/2,40
~ 2.021
Test Statistic: 2.040
t
0
2.021 -2.021
.025
Reject H
0
Reject H
0
.025
Decision: Reject H
0
at = 0.05
2.040
Conclusion: There is evidence
of a difference in the mean
yields.
BMS1024 MANAGERIAL STATISTICS
Two Population Proportions
Goal: Test a hypothesis for the difference
between two independent population proportions,
p
1
p
2

Assumptions:
n
1
p
1
> 5 , n
1
(1-p
1
) > 5
n
2
p
2
> 5 , n
2
(1-p
2
) > 5
The point estimate for the difference is
2 1
. .
p p
BMS1024 MANAGERIAL STATISTICS
Two Population Proportions
Since you begin by assuming the null hypothesis is true,
you assume p
1
= p
2
and pool the two sample (p) estimates.
2 1
2 1
n n
X X
+
+
= p
The pooled estimate for
the overall proportion is:
where X
1
and X
2
are the number of
successes in samples 1 and 2
BMS1024 MANAGERIAL STATISTICS
Two Population Proportions
( )
|
|
.
|

\
|
+

|
.
|

\
|

=
. .
2 1
2 1 2 1
1 1
) 1 (
n n
p p
p p p p
Z
The test statistic for p
1
p
2
is a Z statistic:
2
2
2
1
1
1
2 1
2 1
n
X
,
n
X
,
n n
X X
= =
+
+
=
. .
p p p
where
BMS1024 MANAGERIAL STATISTICS
Two Population Proportions
Hypothesis for Population Proportions
Lower-tail test:

H
0
: p
1
> p
2

H
1
: p
1
< p
2


i.e.,

H
0
: p
1
p
2
> 0
H
1
: p
1
p
2
< 0
Upper-tail test:

H
0
: p
1
p
2
H
1
: p
1
> p
2
i.e.,

H
0
: p
1
p
2
0
H
1
: p
1
p
2
> 0
Two-tail test:

H
0
: p
1
= p
2
H
1
: p
1
p
2
i.e.,

H
0
: p
1
p
2
= 0
H
1
: p
1
p
2
0
BMS1024 MANAGERIAL STATISTICS
Two Population Proportions
Hypothesis for Population Proportions
Lower-tail test:

H
0
: p
1
p
2
> 0
H
1
: p
1
p
2
< 0
Upper-tail test:

H
0
: p
1
p
2
0
H
1
: p
1
p
2
> 0
Two-tail test:

H
0
: p
1
p
2
= 0
H
1
: p
1
p
2
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

BMS1024 MANAGERIAL STATISTICS
Two Population Proportions: Example
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 of 72 men, 36 indicated they
would vote Yes and, in a sample of 50 women, 31
indicated they would vote Yes

Test at the .05 level of significance
BMS1024 MANAGERIAL STATISTICS
Two Population Proportions: Example
H
0
: p
1
p
2
= 0 (the two proportions are equal)
H
1
: p
1
p
2
0 (there is a significant difference
between proportions)
The sample proportions are:
Men:
Women:
549
122
67
50 72
31 36
2 1
2 1
.
n n
X X
p = =
+
+
=
+
+
=
The pooled estimate for the overall proportion is:
50 . 0
72
36
1
= =
.
p
62 . 0
50
31
2
= =
.
p
BMS1024 MANAGERIAL STATISTICS
Two Population Proportions: Example
The test statistic for p
1
p
2
is:
( )
( ) ( )
31 1
50
1
72
1
549 1 549
0 62 50
1 1
1
2 1
2 1 2 1
.
) . ( .
. .
n n
p) ( p
p p p p
z
=
|
.
|

\
|
+

=
|
|
.
|

\
|
+

|
.
|

\
|

=
. .
Critical Values = 1.96
For o = .05
.025
-1.96

1.96

.025
-1.31

Decision: Do not reject H
0

Conclusion: There is no evidence of a
significant difference in proportions who
will vote yes between men and women.
Reject H
0
Reject H
0
BMS1024 MANAGERIAL STATISTICS
Topic Recap
( )
|
|
.
|

\
|
+

|
.
|

\
|

=
. .
2 1
2 1 2 1
1 1
) 1 (
n n
p p
p p p p
Z
( ) ( )
|
|
.
|

\
|
+

=
2 1
2
p
2 1
2 1
n
1
n
1
S
X X
t
Hypothesis Testing
(Two Sample Tests)
Mean Proportion

1

2
known
1

2
unknown
Apply the Z-test
statistic (mean)
Apply the t-test
statistic (mean)
Apply the Z-test
statistic (proportion)
( ) ( )
2
2
2
1
2
1
2 1
2 1
n

X X
Z
+

=
BMS1024 MANAGERIAL STATISTICS
At the end of this lesson, you should be
able to:
Compare two independent samples
Perform Z test for the differences in two
means (sigma known)
Perform pooled variance t test for the
differences in two means (sigma unknown)
Compare two population proportions
Perform Z-test for two population proportions

You might also like