You are on page 1of 21

9-1 of 21

Chapter Nine
Statistical Inferences
Based on Two Samples

9-2 of 21
McGraw-Hill/Irwin

Copyright 2003 by The McGraw-Hill Companies, Inc. All rights reserved.

Statistical Inferences Based on Two


Samples
9.1
9.2
9.3
9.4
9.5

9-3 of 21

Comparing Two Population Means Using Large


Independent Samples
Comparing Two Population Means Using Small
Independent Samples
Comparing Two Population Variances Using
Independent Samples
Paired Difference Experiments
Comparing Two Population Proportions Using
Large Independent Samples

9.1 Sampling Distribution


of

x1 x 2

If independent random samples are taken from two

populationsthen the sampling distribution of the sample


difference in means
is

x1 x 2

Normal, if each of the sampled populations is normal and


approximately normal if the sample sizes n1 and n2 are large

Has
mean:

x1 - x 2 = 1 2

Has standard
deviation:
9-4 of 21

x1 - x 2

12 22
=

n1 n 2

Sampling Distribution
of
(Continued)

9-5 of 21

x1 x 2

Large Sample Confidence Interval,


Difference in Mean
If two independent samples are from populations that are
normal or each of the sample sizes is large, 100(1 - )%
confidence interval for 1 - 2 is

(x1 x 2 ) z/2

12 22

n1
n2

If 1 and 2 are unknown and the each of the sample


sizes is large (n1, n2 30), estimate the sample standard
deviations by s1 and s2 and a 100(1 - )% confidence
interval for 1 - 2 is
2
2

(x1 x 2 ) z/2

9-6 of 21

s1 s2

n1 n2

Large Sample Tests about Differences


in Means
If sampled populations are normal or both samples are large, we
can reject H0: 1 - 2 = D0 at the level of significance if and
only if the appropriate rejection point condition holds or,
equivalently, if the corresponding p-value is less than .

Alternative
H a : 1 2 D0
H a : 1 2 D0
H a : 1 2 D0

Reject H0 if:
z z
z z
z z / 2 , that is

p-Value
Area under std normal curve right of z
Area under std normal curve left of z
Twice area under std normal curve right of z

z z / 2 or z z / 2

Test Statistic

9-7 of 21

(x1 x 2 ) D 0

n1
n2
2
1

2
2

If population variance unknown


and the sample sizes are large,
substitute sample variances.

Example: Large Sample Interval and


Test
Bank Waiting Times, Current System versus New System

n1 100, x1 8.79, s12 4.7089,

n 2 100, x2 5.14, s22 1.9044

95% Confidence Interval for 1 - 2

(x1 x 2 ) z/2

s12 s22
4.7089 1.9044

(8.79 5.14) 1.96

n1 n2
100
100
3.65 0.5040 [3.15, 4.15]

Test H0: 1 - 2 3 versus Ha: 1 - 2 > 3, = 0.05

(x1 x 2 ) D 0
s12 s22

n1 n2

(8.79 5.14) 3
2.53 1.645 z.05
4.7089 1.9044

100
100

p value P(z 2.53) (0.5 - 0.4943) 0.0057


9-8 of 21

9.2 Small Sample Confidence Interval,


Difference in Mean When Variances are
Equal
If two independent samples are from populations that are
normal with equal variances, 100(1 - )% confidence
interval for 1 - 2 is

(x1 x 2 ) t /2

1 1
s

n1 n2
2
p

Where sp2 is the pooled variance


2
2
(
n

1
)
s

(
n

1
)
s
1
2
2
s 2p 1
(n1 n2 2)

9-9 of 21

And t/2 is based on (n1 n2 2) degrees of freedom.

Small Sample Tests about Differences


in Means When Variances are Equal
If sampled populations are both normal with equal variances,
we can reject H0: 1 - 2 = D0 at the level of significance if
and only if the appropriate rejection point condition holds or,
equivalently, if the p-value is less than .

Alternative
H a : 1 2 D0
H a : 1 2 D0
H a : 1 2 D0

Reject H0 if:

Test Statistic
(x x 2 ) D 0
t 1
1
2 1

sp

n1 n2

Pooled Variance

9-10 of 21

t t
t t
t t / 2 , that is
t t / 2 or t t / 2

p-Value
Area under t distribution right of t
Area under t distribution left of t
Twice area under t distribution right of t

(n1 1) s12 (n2 1) s22


s
(n1 n2 2)
2
p

t, t/2 and p-values are based on (n1 n2 2) df

Example: Small Sample Difference


in Mean Test
Catalyst Case, Difference in Mean Hourly Yields?

n1 5, x1 811.0, s12 386,

n 2 5, x2 750.2, s22 484.2

Test H0: 1 - 2 = 0 versus Ha: 1 - 2 0, = 0.01


2
2
(
n

1
)
s

(
n

1
)
s
(5 1)386 (5 1)484.2
1
2
2
s 2p 1

435.1
(n1 n2 2)
(5 5 2)

(x1 x 2 ) D 0

(811 750.2) 0

1 1
1 1
435
.
1


s

5 5
n1 n2
p value P(t 4.6087) 0.0017
2
p

9-11 of 21

4.6087 3.355 t.005

Small Sample Intervals and Tests


about Differences in
Means When
Variances are Not Equal
If sampled populations are both normal, but sample sizes and
variances differ substantially, small-sample estimation and testing
can be based on the following unequal variance procedure.

Confidence Interval

(x1 x 2 ) z/2

Test Statistic
2
1

2
2

s
s

n1 n2

(x1 x 2 ) D 0
s12 s22

n1 n2

For both the interval and test, the degrees of freedom are equal to

9-12 of 21

(s12 / n1 s 22 / n 2 ) 2
df 2
(s1 / n1 ) 2 (s 22 / n 2 ) 2

n1 1
n 2 1

9.3 Comparing Two Population


Variances Using Independent
Samples (One-Tailed)
If both sampled populations are normal

9-13 of 21

Test of H0: 12 = 22 vs
Ha: 12 > 22

Test of H0: 12 = 22 vs
Ha: 12 < 22

s12
Test Statistic F s 2
2

s22
Test Statistic F s 2
1

Reject H0 in favor of Ha if:


F > F or if
p-value <
F is based on
(n1 1) and (n2 1) df

Reject H0 in favor of Ha if:


F > F or if
p-value <
F is based on
(n2 1) and (n1 1) df

Comparing Two Population


Variances Using Independent
Samples (Two-Tailed)
If both sampled populations are normal

Test of H0: 12 = 22 vs Ha: 12 22

larger of s12 and s22


F
Test Statistic
smaller of s12 and s22

df1 = {size of sample with larger variance} 1


df2 = {size of sample with smaller variance} 1

9-14 of 21

Reject H0 in favor of Ha if:


F > F/2 or if
p-value <

9.4 Paired Difference Interval for


Difference in Mean
If the sampled population of differences is normally
distributed with mean d, then a )100%
confidence interval for d is

d t /2
t /2

9-15 of 21

sd
n

is based on n 1 degrees of freedom.

Paired Difference Test for Difference in


Mean

If the population of differences is normal, we can reject H0:


d = D0 at the level of significance (probability of Type I
error equal to ) if and only if the appropriate rejection
point condition holds or, equivalently, if the corresponding
p-value is less than .
p-Value
Alternative Reject H0 if:
Area under t distribution right of t
H a : d D0
t t
Area under t distribution left of t
H a : d D0
t t
H a : d D0
Twice area under t distribution right of t
t t / 2 , that is
t t / 2 or t t / 2

9-16 of 21

Test Statistic
d-D 0
t, t/2 and p-values are based on n 1 degrees of
t=
sd / n
freedom.

Example: Paired Difference Interval


and Test
Car
Car 1
Car 2
Car 3
Car 4
Car 5
Car 6
Car 7

Garage 1 Garage 2 Difference


$ 7.10 $
7.90
-0.8
9.00
10.10
-1.1
11.00
12.20
-1.2
8.90
8.80
0.1
9.90
10.40
-0.5
9.10
9.80
-0.7
10.30
11.70
-1.4

Table 9.3

Mean
Std Dev

Excel Test Output

-0.8
0.5033

95% Confidence Interval

d t / 2
9-17 of 21

sd
0.5033
0.8 2.447
0.8 0.4654 [1.2654,0.3346]
n
7

9.5 Large Sample Interval for the


Difference in Proportions
If two independent samples are both large, a
100(1 - )% confidence interval for p1 - p2 is

(p1 p 2 ) z / 2

9-18 of 21

p1 (1 p1 ) p 2 (1 p 2 )

n1 1
n 2 1

Large Sample Test for Difference in


Proportions
If two sampled populations are both large, we can reject H0: p1 p2 = D0 at the level of significance if and only if the appropriate
rejection point condition holds or, equivalently, if the corresponding
p-value is less than .

Alternative
H a : p1 p2 D0
H a : p1 p2 D0
H a : p1 p2 D0

Test Statistics
z
9-19 of 21

Reject H0 if:
z z
z z

p-Value

Area under std normal curve right of z


Area under std normal curve left of z

z z / 2 , that is

Twice area under std normal curve right of z

z z / 2 or z z / 2
D0 0

( p 1 p 2 ) D 0
1 1
p (1 p )

n1 n2

D0 0
z

( p 1 p 2 ) D 0
p 1 (1 p 1 ) p 2 (1 p 2 )

n1 1
n2 1

Example: Paired Difference


Interval and Test
Example 9.11
Advertising Media

p1

631
798
631 798

, p2
, p
1000
1000
1000 1000

95% Confidence Interval for p1 - p2

.631(1 .369) .798(1 .202)


(.631 .798) 1.96

1000 - 1
1000 - 1
0.167 0.0389 [0.2059, 0.1281]
Test H0: p1 - p2 = 0 versus Ha: p1 - p2 0

9-20 of 21

( p 1 p 2 ) D 0

(0.631 0.798) 0

1
1 1
1
0
.
7145
(
1

0
.
7145
)

p (1 p )

1000
1000

n1 n2
8.2673 3.29 z0.0005 , p value 2 P ( z 8.2673) 0.001

Statistical Inferences Based on Two


Samples
Summary
9.1
: Comparing Two Population Means Using Large
9.2
9.3
9.4
9.5

9-21 of 21

Independent Samples
Comparing Two Population Means Using Small
Independent Samples
Comparing Two Population Variances Using
Independent Samples
Paired Difference Experiments
Comparing Two Population Proportions Using
Large Independent Samples

You might also like