1
and
2
known
1
and
2
unknown
but assumed equal
1
and
2
unknown,
not assumed equal
Goal: Form a confidence
interval for the difference
between two population
means,
1
2
The point estimate for the
difference is
x
1
x
2
*
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 104
1
and
2
known
Assumptions:
Samples are randomly and
independently drawn
population distributions are
normal or both sample sizes
are > 30
Population standard
deviations are known
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 105
When
1
and
2
are known and both populations are normal or
both sample sizes are at least 30, the test statistic is a z
valueand the standard error of x
1
x
2
is
2
2
2
1
2
1
x x
n
2 1
+ =
(continued)
1
and
2
known
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 106
Confidence Interval:
1
and
2
known
The confidence interval for
1
2
is:
( )
2
2
2
1
2
1
/2
2 1
n
x x +
o
z
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 107
General Steps
1. Define the population parameter of interest
and select independent samples from each
population
2. Specify the confidence interval
3. Compute the point estimate
4. Determine the standard error
5. Determine the critical value
6. Develop the confidence interval estimate
Example 1 with std dev known
RS Royal Jemursari mengadakan survey untuk
mengetahui berapa lama pasien
dikonsultasikan dengan dokter. Ratarata untuk
100 pria adalah 35 menit dengan std dev 11
menit dan 100 wanita 42 menit dengan std dev
16 menit.
Cari 95% Confidence Interval
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 108
Example 2 with std dev known
Perbandingan on time attendance di kelas
bisnis statistik antara kelas reguler dan IBM
telah disurvey. Ratarata 150 kelas reguler
adalah 45 menit dengan std dev 15 menit dan
100 siswa IBM 30 menit dng std dev 10 menit.
Cari 90 Confidence Interval
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 109
Example 3 Std Dev known
Cari 95% Confidence interval estimate utuk
kedua populasi yg disediakan.
Populasi 1
Mean1 : 345
Std Dev1 : 34
N1 : 50
Populasi 2
Mean1 : 320
Std Dev1 : 40
N1 : 80
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1010
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1011
Population means,
independent
samples
1
and
2
known
1
and
2
unknown,
large samples
Assumptions:
Samples are randomly and
independently drawn
Populations follow the normal
distribution
The two standard deviations
are equal
*
1
and
2
unknown
but assumed equal
1
and
2
unknown,
not assumed equal
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1012
1
and
2
unknown,
large samples
(continued)
Forming interval estimates:
The population standard deviations are
assumed equal, so use the two sample standard
deviations and pool them to estimate (called
pooled standard deviation)
the test statistic is a t value with (n
1
+ n
2
2)
degrees of freedom
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1013
1
and
2
unknown,
large samples
(continued)
The pooled standard deviation is:
( ) ( )
2 n n
s 1 n s 1 n
s
2 1
2
2 2
2
1 1
p
+
+
=
The confidence interval for
1
2
is:
( )
2 1
p /2
2 1
n
1
n
1
s t x x +
o
Contoh 1, std dev unknown
Kalbe mengadakan penelitian utk obat terbaru
berapa lama obat itu akan larut dalam darah.
Rata rata dari 6 orang yang berumur diatas
50th adalah 13.6 menit, S1: 3.1 menit dan 8
orang yang berumur lebih dari 50th adalah 11.2
menit, S2: 5 menit.
Cari 95% Confidence Interval
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1014
Contoh 2, std dev unknown
Cari 90% Confidence Interval dari
Sample 1
N1: 15
X1: 50
S1: 5
Sample 2
N1: 13
X1: 53
S1: 6
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1015
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1016
Population means,
independent
samples
1
and
2
known
1
and
2
unknown,
small samples
Assumptions:
populations are normally
distributed
there is a reason to believe
that the populations do not
have equal variances
samples are independent
*
1
and
2
unknown
but assumed equal
1
and
2
unknown,
not assumed equal
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1017
1
and
2
unknown,
small samples
Forming interval estimates:
The population variances
are not assumed equal, so
we do not pool them
the test statistic is a t value
with degrees of freedom
given by:
(continued)
( ) ( )


.

\

+
=
1 n
/n s
1 n
/n s
) /n s /n (s
df
2
2
2
2
2
1
2
1
2
1
2
2
2
2 1
2
1
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1018
( )
2
2
2
1
2
1
/2
2 1
n
s
n
s
t x x +
The confidence interval for
1
2
is:
1
and
2
unknown,
small samples
(continued)
Where t
o/2
has d.f. given by
( ) ( )


.

\

+
=
1 n
/n s
1 n
/n s
) /n s /n (s
df
2
2
2
2
2
1
2
1
2
1
2
2
2
2 1
2
1
Example 1
Visa
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1019
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1020
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1021
Hypothesis Tests for the
Difference Between Two Means
Testing Hypotheses about
1
2
Use the same situations discussed already:
Standard deviations known
Standard deviations unknown
Assumed equal
Assumed not equal (small samples)
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1022
Hypothesis Tests for
Two Population Means
Lower tail test:
H
0
:
1
>
2
H
A
:
1
<
2
i.e.,
H
0
:
1
2
> 0
H
A
:
1
2
< 0
Upper tail test:
H
0
:
1
2
H
A
:
1
>
2
i.e.,
H
0
:
1
2
0
H
A
:
1
2
> 0
Twotailed test:
H
0
:
1
=
2
H
A
:
1
2
i.e.,
H
0
:
1
2
= 0
H
A
:
1
2
0
Two Population Means, Independent Samples
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1023
Hypothesis tests for
1
2
Population means, independent samples
1
and
2
known
Use a z test statistic
Use s
p
to estimate unknown
, use a t test statistic with
n
1
+ n
2
2 d.f.
Use s
1
and s
2
to estimate
unknown
1
and
2
, use a t
test statistic and calculate the
required degrees of freedom
1
and
2
unknown
but assumed equal
1
and
2
unknown,
not assumed equal
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1024
( ) ( )
2
2
2
1
2
1
2 1
2 1
n
x x
z
+
=
The test statistic for
1
2
is:
1
and
2
known
Example 1
Pengeboran pertamina mempunyai 2 mesin
bor. Mesin Alpha mempunyai diameter 0.025
inch dan mesin Beta mempunyai 0.034 inch.
Apakah mesin Beta mempunyai rata2 yg lebih
besar drpd rata2 mesin Alpha. Jika 100 sample
dari kedua mesin diambil dan rata2 mesin aplha
0.501 inch dan mesin beta 0.509 inch
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1025
Contoh 2
Page 444 no 1021
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1026
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1027
Steps: Hypothesis Test for Two
Population Means
1. Specify parameter of interest
2. Formulate hypotheses
3. Specify the significance level (o)
4. Construct the rejection region and develop the
decision rule
5. Compute the test statistics and/or the pvalue
6. Reach a decision
7. Draw a conclusion
See Chapter 9
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1028
1
and
2
unknown,
large samples
Where t has (n
1
+ n
2
2) d.f.,
and
( ) ( )
2 n n
s 1 n s 1 n
s
2 1
2
2 2
2
1 1
p
+
+
=
( ) ( )
2 1
p
2 1
2 1
n
1
n
1
s
x x
t
+
=
The test statistic for
1
2
is:
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1029
1
and
2
unknown,
small samples
The test statistic for
1
2
is:
( ) ( )
2
2
2
1
2
1
2 1
2 1
n
s
n
s
x x
t
+
=
Where t has d.f. given by
( ) ( )


.

\

+
=
1 n
/n s
1 n
/n s
) /n s /n (s
df
2
2
2
2
2
1
2
1
2
1
2
2
2
2 1
2
1
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1030
Two Population Means, Independent Samples
Lower tail test:
H
0
:
1
2
> 0
H
A
:
1
2
< 0
Upper tail test:
H
0
:
1
2
0
H
A
:
1
2
> 0
Twotailed test:
H
0
:
1
2
= 0
H
A
:
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
o
Reject H
0
if z > z
o
Reject H
0
if z < z
o/2
or z > z
o/2
Hypothesis tests for
1
2
Example:
1
and
2
known:
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1031
Example
1
and
2
unknown, assumed equal
Youre 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 equal variances, is
there a difference in average
yield (o = 0.05)?
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1032
Calculating the Test Statistic
( ) ( ) ( ) ( )
1.2256
2 25 21
1.16 1 25 1.30 1 21
2 n n
s 1 n s 1 n
s
2 2
2 1
2
2 2
2
1 1
p
=
+
+
=
+
+
=
( ) ( ) ( )
2.040
25
1
21
1
1.2256
0 2.53 3.27
n
1
n
1
s
x x
t
2 1
p
2 1
2 1
=
+
=
+
=
The test statistic is:
Where:
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1033
Solution
H
0
:
1

2
= 0 i.e. (
1
=
2
)
H
A
:
1

2
0 i.e. (
1
2
)
o = 0.05
df = 21 + 25  2 = 44
Critical Values: t = 2.0154
Test Statistic:
Decision:
Conclusion:
Reject H
0
at o = 0.05
There is evidence that
the means are different.
t
0
2.0154 2.0154
0.025
Reject H
0
Reject H
0
0.025
2.040
2.040
25
1
21
1
1.2256
2.53 3.27
t =
+
=
10.3 Paired Sample
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1034
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1035
Paired Samples
Tests Means of 2 Related Populations
Paired or matched samples
e.g., two different value appraisals on the same home
Repeated measures (before/after)
e.g., weight before and after a diet program
Use difference between paired values:
Eliminates Variation Among Subjects
Assumptions:
Both Populations Are Normally Distributed
Or, if Not Normal, use large samples
d = x
1
 x
2
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1036
Paired Differences
The i
th
paired difference is d
i
, where
d
i
= x
1i
 x
2i
The point estimate for
the population mean
paired difference is d :
1 n
) d (d
s
n
1 i
2
i
d
=
n
d
d
n
1 i
i
=
=
The sample standard
deviation is
n is the number of pairs in the paired sample
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1037
Paired Differences
The confidence interval for d is
1 n
) d (d
s
n
1 i
2
i
d
=
n
s
t d
d
=
n
s
d
t
d
d
=
Where t has n  1 d.f.
and s
d
is:
n is the
number
of pairs
in the
paired
sample
Hypothesis Testing for
Paired Samples
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1039
Lower tail test:
H
0
:
d
> 0
H
A
:
d
< 0
Upper tail test:
H
0
:
d
0
H
A
:
d
> 0
Twotailed test:
H
0
:
d
= 0
H
A
:
d
0
Paired Samples
Hypothesis Testing for
Paired Samples
o o/2 o/2 o
t
o
t
o/2
t
o
t
o/2
Reject H
0
if t < t
o
Reject H
0
if t > t
o
Reject H
0
if t < t
o/2
or t > t
o/2
Where t has n  1 d.f.
(continued)
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1040
Assume you send your salespeople to a customer
service training workshop. Is the training effective?
You collect the following data:
Paired Sample Example
Number of Complaints: (2)  (1)
Salesperson Before (1) After (2) Difference, d
i
C.B. 6 4  2
T.F. 20 6 14
M.H. 3 2  1
R.K. 0 0 0
M.O. 4 0  4
21
d =
E
d
i
n
5.67
1 n
) d (d
s
2
i
d
=
= 4.2
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1041
Has the training made a difference in the number of complaints
(at the 0.05 level)?
 4.2 d =
1.66
5 5.67/
0 4.2
n / s
d
t
d
d
=
=
=
H
0
:
d
= 0
H
A
:
d
= 0
Test Statistic:
Critical Value = 2.7765
d.f. = n  1 = 4
Reject
o/2
 2.7765 2.7765
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.
Paired Sample: Solution
Reject
o/2
 1.66
o = 0.05
10.4 Proportion
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1042
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1043
Two Population Proportions
Goal: Form a confidence interval for
or test a hypothesis about the
difference between two population
proportions,
1
2
The point estimate for
the difference is
p
1
p
2
Assumptions:
n
1
1
> 5 , n
1
(1
1
) > 5
n
2
2
> 5 , n
2
(1
2
) > 5
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1044
Confidence Interval for
Two Population Proportions
( )
2
2 2
1
1 1
2 1
n
) p (1 p
n
) p (1 p
z p p
The confidence interval for
1
2
is:
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1045
Hypothesis Tests for
Two Population Proportions
Population proportions
Lower tail test:
H
0
:
1
>
2
H
A
:
1
<
2
i.e.,
H
0
:
1
2
> 0
H
A
:
1
2
< 0
Upper tail test:
H
0
:
1
2
H
A
:
1
>
2
i.e.,
H
0
:
1
2
0
H
A
:
1
2
> 0
Twotailed test:
H
0
:
1
=
2
H
A
:
1
2
i.e.,
H
0
:
1
2
= 0
H
A
:
1
2
0
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1046
Two Population Proportions
2 1
2 1
2 1
2 2 1 1
n n
x x
n n
p n p n
p
+
+
=
+
+
=
The pooled estimate for the
overall proportion is:
Where x
1
and x
2
are the numbers from
samples 1 and 2 with the characteristic of interest
Since we begin by assuming the null
hypothesis is true, we assume
1
=
2
and pool the two p estimates
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1047
Two Population Proportions
( ) ( )


.

\

+
=
2 1
2 1 2 1
n
1
n
1
) p (1 p
p p
z
The test statistic for
1
2
is:
(continued)
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1048
Hypothesis Tests for
Two Population Proportions
Population proportions
Lower tail test:
H
0
:
1
2
> 0
H
A
:
1
2
< 0
Upper tail test:
H
0
:
1
2
0
H
A
:
1
2
> 0
Twotailed test:
H
0
:
1
2
= 0
H
A
:
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
o
Reject H
0
if z > z
o
Reject H
0
if z < z
o/2
or z > z
o/2
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1049
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 0.05 level of significance
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1050
The hypothesis test is:
H
0
:
1
2
= 0 (the two proportions are equal)
H
A
:
1
2
0 (there is a significant difference between proportions)
The sample proportions are:
Men: p
1
= 36/72 = 0.50
Women: p
2
= 31/50 = 0.62
.549 0
122
67
50 72
31 36
n n
x x
p
2 1
2 1
= =
+
+
=
+
+
=
The pooled estimate for the overall proportion is:
Example:
Two population Proportions
(continued)
Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall 1051
The test statistic for
1
2
is:
Example:
Two population Proportions
(continued)
0.025
1.96
1.96
0.025
1.31
Decision: Do not reject H
0
Conclusion: There is not
significant evidence of a
difference in the proportion
who will vote yes between
men and women.
( ) ( )
( ) ( )
1.31
50
1
72
1
.549) 0 (1 .549 0
0 .62 0 .50 0
n
1
n
1
) p (1 p
p p
z
2 1
2 1 2 1
=

.

\

+
=


.

\

+
=
Reject H
0
Reject H
0
Critical Values = 1.96
For o = 0.05