chapter 9: inferences based on two samples: confidence intervals and tests of hypotheses statistics

63
Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

Upload: malcolm-willis-peters

Post on 03-Jan-2016

221 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses

Statistics

Page 2: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

2

Where We’ve Been

Made inferences based on confidence intervals and tests of hypotheses

Studied confidence intervals and hypothesis tests for µ, p and σ 2

Selected the necessary sample size for a given margin of error

Page 3: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

3

Where We’re Going

Learn to use confidence intervals and hypothesis tests to compare two populations

Learn how to use these tools to compare two population means, proportions and variances

Select the necessary sample size for a given margin of error when comparing parameters from two populations

Page 4: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

4

9.1: Identifying the Target Parameter

Page 5: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

5

9.2: Comparing Two Population Means: Independent Sampling

Point Estimators → µ 1 - 2 → µ1 - µ2To construct a confidence interval or conduct a hypothesis test, we need the standard deviation:

Singe sample nsx ̂

2

22

1

21

21ˆ

n

s

n

sxx Two

samples

Page 6: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

6

9.2: Comparing Two Population Means: Independent Sampling

The Sampling Distribution for (1 - 2)

1. The mean of the sampling distribution is (µ1-µ2).

2. If the two samples are independent, the standard deviation of the sampling distribution (the standard error) is

3. The sampling distribution for (1 - 2) is approximately normal for large samples.

2

22

1

21

21ˆ

n

s

n

sxx

Page 7: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

7

9.2: Comparing Two Population Means: Independent Sampling

The Sampling Distribution for (1 - 2)

Page 8: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

8

9.2: Comparing Two Population Means: Independent Sampling

Large Sample Confidence Interval for (µ1 - µ2 )

2

22

1

21

2/21

2

22

1

21

2/21)(2/21

)(

)()(21

n

s

n

szxx

nnzxxzxx xx

Page 9: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

9.2: Comparing Two Population Means: Independent Sampling

Private Colleges n: 71 Mean: 78.17 Standard Deviation: 9.55 Variance: 91.17

Public Universities n: 32 Mean: 84 Standard Deviation: 9.88 Variance: 97.64

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

9

Two samples concerning retention rates for first-year students at private and public institutions were obtained from the Department of Education’s data

base to see if there was a significant difference in the two types of colleges.

What does a 95% confidence interval tell us about retention rates?

Source: National Center for Education Statistics

Page 10: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

9.2: Comparing Two Population Means: Independent Sampling

Private Colleges n: 71 Mean: 78.17 Standard Deviation: 9.55 Variance: 91.17

Public Universities n: 32 Mean: 84 Standard Deviation: 9.88 Variance: 97.64

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

10

08.483.532

64.97

71

1.9196.18417.78

)()(2

22

1

21

2/21)(2/21 21

n

s

n

szxxzxx xx

Page 11: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

9.2: Comparing Two Population Means: Independent Sampling

Private Colleges n: 71 Mean: 78.17 Standard Deviation: 9.55 Variance: 91.17

Public Universities n: 32 Mean: 84 Standard Deviation: 9.88 Variance: 97.64

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

11

08.483.532

64.97

71

1.9196.18417.78

)()(2

22

1

21

2/21)(2/21 21

n

s

n

szxxzxx xx

Since 0 is not in the confidence interval, the difference in the sample means appears to indicate a real difference in retention.

Page 12: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

12

9.2: Comparing Two Population Means: Independent Sampling

Small Sample Confidence Interval for (µ1 - µ2 )

21

22/21)(2/21

11)()(

21 nnstxxtxx pxx

The value of t is based on (n1 + n2 -2) degrees of freedom.

Page 13: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

13

9.2: Comparing Two Population Means: Independent Sampling

For small samples, the t-distribution can be used with a pooled sample estimator of σ 2, σ p

2

2

)1()1(

21

222

2112

nn

snsnsp

Page 14: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

9.2: Comparing Two Population Means: Independent Sampling

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

14

H0: (µ1 - µ2) = D0

Ha: (µ1 - µ2) > D0 (< D0)

Rejection region:

z < -za (> za)

Test Statistic:

where

H0: (µ1 - µ2) = D0

Ha: (µ1 - µ2) ≠ D0

Rejection region:

|z| > za/2

Two-Tailed TestOne-Tailed Test

)(

021

21

)(

xx

Dxxz

2

22

1

21

2

22

1

21

)( 21 n

s

n

s

nnxx

Page 15: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

15

9.2: Comparing Two Population Means: Independent Sampling

Conditions Required for Valid Large-Sample Inferences about (µ1 - µ2)

1. The two samples are randomly and independently selected from the target populations.

2. The sample sizes are both ≥ 30.

Page 16: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

9.2: Comparing Two Population Means: Independent Sampling

Private Colleges n: 71 Mean: 78.17 Standard Deviation: 9.55 Variance: 91.17

Public Universities n: 32 Mean: 84 Standard Deviation: 9.88 Variance: 97.64

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

16

Let’s go back to the retention data and test the hypothesis that there is no significant difference in retention at privates and publics.

08.232

64.97

71

17.91

2

22

1

21

)( 21 n

s

n

sxx

Page 17: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

9.2: Comparing Two Population Means: Independent Sampling

799.208.2

83.50)(

05.

0)(:

0)(:

)(

21

21

210

21

xx

a

xxz

H

H

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

17

Test statistic:

Reject the null hypothesis:

96.1799.2

|| 2/

zz

Page 18: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

18

9.2: Comparing Two Population Means: Independent Sampling

For small samples, the t-distribution can be used with a pooled sample estimator of σ 2, σ p

2

2

)1()1(

21

222

2112

nn

snsnsp

Page 19: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

9.2: Comparing Two Population Means: Independent Sampling

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

19

H0: (µ1 - µ2) = D0

Ha: (µ1 - µ2) > D0 (< D0)

Rejection region:

t < -ta (> ta)

Test Statistic:

H0: (µ1 - µ2) = D0*

Ha: (µ1 - µ2) ≠ D0

Rejection region:

|t| > ta/2

Two-Tailed TestOne-Tailed Test

21

2

021

11

)(

nns

Dxxt

p

Page 20: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

20

9.2: Comparing Two Population Means: Independent Sampling

Conditions Required for Valid Small-Sample Inferences about (µ1 - µ2)

1. The two samples are randomly and independently selected from the target populations.

2. Both sampled populations have distributions that are approximately normal.

3. The population variances are equal.

Page 21: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

21

Does class time affect performance? The test performance of students in two

sections of international trade, meeting at different times, were compared.

8:00 a.m. ClassMean: 78

Standard Deviation: 14Variance: 196

n: 21

9:30 a.m. ClassMean: 82

Standard Deviation: 17Variance: 289

n: 21

With a = .05, test H0 : µ1 = µ2

9.2: Comparing Two Population Means: Independent Sampling

Page 22: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

22

8:00 a.m. ClassMean: 78

Variance: 196n: 21

9:30 a.m. ClassMean: 82

Variance: 289n: 21

832.

211

211

5.242

0)8278(

11

0)( :StatisticTest

5.24222121

289)121(196)121(

2

)1()1(

05.

0:

0:

21

2

21

21

222

2112

21

210

nns

xxt

nn

snsns

H

H

p

p

a

9.2: Comparing Two Population Means: Independent Sampling

Page 23: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

23

8:00 a.m. ClassMean: 78

Variance: 196n: 21

9:30 a.m. ClassMean: 82

Variance: 289n: 21

832.

211

211

5.242

0)8278(

11

0)( :StatisticTest

5.24222121

289)121(196)121(

2

)1()1(

05.

0:

0:

21

2

21

21

222

2112

21

210

nns

xxt

nn

snsns

H

H

p

p

a

With df = 18 + 24 – 2 = 40, ta/2 = t.025 = 2.021. Since out test statistic t = -.812. |t| < t.025.

Do not reject the null hypothesis

9.2: Comparing Two Population Means: Independent Sampling

Page 24: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

24

8:00 a.m. ClassMean: 72

Variance: 154n: 13

9:30 a.m. ClassMean: 86

Variance: 163n: 21

0 1 2

1 2

1 2

2 21 2

1 2

Several students in the 8:00 a.m. section sleep through

the next exam. We can still compare the results,

with some modifications.

: 0

: 0

.05

( ) 0Test Statistic:

a

H

H

x xt

s s

n n

(72 86) 03.16

154 16313 21

9.2: Comparing Two Population Means: Independent Sampling

Page 25: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

25

8:00 a.m. ClassMean: 72

Variance: 154n: 13

9:30 a.m. ClassMean: 86

Variance: 163n: 21

056.2

2615.26

12121/163

11313/154

21/16313/154

1/

1/

// Freedom of Degrees

16.3

26,025.

22

2

2

2

222

1

2

121

2

2221

21

dft

nns

nns

nsnsv

t

9.2: Comparing Two Population Means: Independent Sampling

Page 26: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

26

8:00 a.m. ClassMean: 72

Variance: 154n: 13

9:30 a.m. ClassMean: 86

Variance: 163n: 21

056.2

2615.26

12121/163

11313/154

21/16313/154

1/

1/

// Freedom of Degrees

16.3

26,025.

22

2

2

2

222

1

2

121

2

2221

21

dft

nns

nns

nsnsv

t

Since |t| > t.025,df=26 ,, reject the null hypothesis.

9.2: Comparing Two Population Means: Independent Sampling

Page 27: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

27

9.3: Comparing Two Population Means: Paired Difference Experiments

observed pairs ofnumber n where

sdifference ofdeviation standard sample s where

differencemean sample where

freedom, of degrees )1(with :Sample Small

:Sample Large

for Interval Confidence Difference Paired

2/

2/2/

21d

d

d

d

d

d

dd

d

dd

d

dd

x

nn

stx

n

szx

nzx

Page 28: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

28

9.3: Comparing Two Population Means: Paired Difference Experiments

Suppose ten pairs of puppies were housetrained using two different methods: one puppy from each pair was paper-trained, with the paper gradually moved outside, and the other was taken out every three hours and twenty minutes after each meal. The number of days until the puppies were considered housetrained (three days straight without an accident) were compared. Nine of the ten paper-trained dogs took longer than the other paired dog to complete training, with the average difference equal to 4 days, with a standard deviation of 3 days.

What is a 90% confidence interval on the difference in successful training?

Page 29: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

29

9.3: Comparing Two Population Means: Paired Difference Experiments

74.1410

3833.14

confident 90%

3

4

1,2/21

d

dndfd

d

d

n

stx

s

x

d

Since 0 is not in the interval, one program does seem to work more effectively.

Page 30: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

30

9.3: Comparing Two Population Means: Paired Difference Experiments

dd

dα, n

dd

d

dd

d

ns

Dxt

ns

Dx

n

Dxz

d /

statistic test sample Small

//

statistic test sample Large

forTests Hypothesis

Difference Paired

01

00

21d

tt

zz

DH

DH

da

d

)or ( :region rejection sample Small

)or ( :regionrejection sample Large

)or (:

:

Test Tailed-One

0

00

2/

2/

0

00

|| :region rejection sample Small

|| :regionrejection Sample Large

:

:

Test Tailed-Two

tt

zz

DH

DH

da

d

Page 31: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

31

9.3: Comparing Two Population Means: Paired Difference Experiments

Suppose 150 items were priced at two online stores, “cport” and “warriorwoman.” Mean difference: $1.75 Standard Deviation: $10.35 Test at the 95% level that the difference in

the two stores is zero.

Page 32: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

32

9.3: Comparing Two Population Means: Paired Difference Experiments

Suppose 150 items were priced at two online stores, “cport” and “warriorwoman.” Mean difference:

$1.75 Standard Deviation:

$10.35 a = .05

07.2150/35.10

075.1

/

0:

0:

0

0

z

z

n

Dxz

H

H

dd

d

da

d

Page 33: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

33

9.3: Comparing Two Population Means: Paired Difference Experiments

Suppose 150 items were priced at two online stores, “cport” and “warriorwoman.” Mean difference:

$1.75 Standard Deviation:

$10.35 a = .05

07.2150/35.10

075.1

/

0:

0:

0

0

z

z

n

Dxz

H

H

dd

d

da

d

The critical value of z.05 is

1.96, so we would reject

this null hypothesis.

Page 34: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

34

9.4: Comparing Two Population Proportions: Independent Sampling

.ˆ and ˆ examiningby and

about inferences makecan We

21 21 pppp

stics.characteri particular regarding

sproportionsimilar have

notmay or may groups Two

Page 35: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

35

9.4: Comparing Two Population Proportions: Independent Sampling

normal.ely approximat ison distributi

sampling thelarge, are samples theIf .3

ˆˆˆˆ .2

)( )ˆˆ( .1

)ˆˆ( ofon Distributi Sampling theof Properties

2

22

1

11

2

22

1

11)ˆˆ(

2121

21

21 n

qp

n

qp

n

qp

n

qp

ppppE

pp

pp

Page 36: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

36

9.4: Comparing Two Population Proportions: Independent Sampling

2

22

1

112/21

2

22

1

112/21)ˆˆ(2/21

21

ˆˆˆˆ)ˆˆ(

)ˆˆ()ˆˆ(

)(for Interval Confidence )%-100(1 Sample-Large

21

n

qp

n

qpzpp

n

qp

n

qpzppzpp

pp

pp

Page 37: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

37

9.4: Comparing Two Population Proportions: Independent Sampling

A group of men and women were asked their opinions on the following important issue:

Are the Three Stooges funny?

The results are as follow:

Men Women

Yes 290 200

No 50 50

n 340 250

Page 38: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

38

9.4: Comparing Two Population Proportions: Independent Sampling

Men Women

p .85 .80

q .15 .20

n 340 250

Calculate a 95% confidence interval on the difference in the opinions of men and women.

1 1 2 2/2

1 2

ˆ ˆ( )

.85 .15 .80 .20(.85 .80) 1.96

340 250.05 .062

M W

p q p qp p z

n n

Page 39: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

39

9.4: Comparing Two Population Proportions: Independent Sampling

Men Women

p .85 .80

q .15 .20

n 340 250

Calculate a 95% confidence interval on the difference in the opinions of men and women.

1 1 2 2/2

1 2

ˆ ˆ( )

.85 .15 .80 .20(.85 .80) 1.96

340 250.05 .062

M W

p q p qp p z

n n

Since 0 is in the confidence interval, we cannot rule out

the possibility that both genders find the Stooges

equally funny. Nyuk nyuk nyuk.

Page 40: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

40

9.4: Comparing Two Population Proportions: Independent Sampling

21about Hypothesis ofTest Sample-Large pp

zz

DorppH

DppH

a

|| :regionRejection

)()(:

0)often very ()(:

Test Tailed-One

021

0210

2/

021

0210

|| :regionRejection

)(:

)(:

Test Tailed-Two

zz

DppH

DppH

a

21)ˆˆ(

21

21

)ˆˆ(

21

11ˆˆ andˆ where

)ˆˆ( :StatisticTest

21

21

nnqp

nn

xxp

ppz

pp

pp

Page 41: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

41

9.4: Comparing Two Population Proportions: Independent Sampling Randy Stinchfield of the University of Minnesota studied the gambling

activities of public school students in 1992 and 1998 (Journal of Gambling Studies, Winter 2001). His results are reported below:

Do these results represent a statistically significant difference at the a = .01 level?

1992 1998

Survey n 21,484 23,199

Number who gambled 4.684 5,313

Proportion who gambled .218 .229

Page 42: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

42

9.4: Comparing Two Population Proportions: Independent Sampling

1992 1998

Survey n 21,484 23,199

Number who gambled

4.684 5,313

Proportion who gambled

.218 .229

0 1 2 0

1 2 0

/2

Two-Tailed Test

: ( )

: ( )

Rejection region:

| | 2.576

a

H p p D

H p p D

z z

1 2

1 2

1 2

1 2

ˆ ˆ( )1 2

1 2

ˆ ˆ( )

4,684 5,313ˆ .224

21,484 23,199

1 1ˆ ˆ

1 1(.224)(.776) .00395

21,484 23,199

ˆ ˆ( ) (.218 .229)Test Statistic:

.00395

2.786

p p

p p

x xp

n n

pqn n

p pz

Page 43: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

43

9.4: Comparing Two Population Proportions: Independent Sampling

1992 1998

Survey n 21,484 23,199

Number who gambled

4.684 5,313

Proportion who gambled

.218 .229

0 1 2 0

1 2 0

/2

Two-Tailed Test

: ( )

: ( )

Rejection region:

| | 2.576

a

H p p D

H p p D

z z

1 2

1 2

1 2

1 2

ˆ ˆ( )1 2

1 2

ˆ ˆ( )

4,684 5,313ˆ .224

21,484 23,199

1 1ˆ ˆ

1 1(.224)(.776) .00395

21,484 23,199

ˆ ˆ( ) (.218 .229)Test Statistic:

.00395

2.786

p p

p p

x xp

n n

pqn n

p pz

Since the computed value of z, -2.786, is of greater magnitude than the critical value, 2.576, we can reject the null hypothesis at the a = .01 level.

Page 44: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

44

9.4: Comparing Two Population Proportions: Independent Sampling

For valid inferences The two samples must be independent The two sample sizes must be large:

15ˆ and 15ˆ

15ˆ and 15ˆ

2222

1111

qnpn

qnpn

Page 45: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

45

9.5: Determining the Sample Size

With a given level of confidence, and a specified sampling error, it is possible to calculate the required sample size Typically, n1 = n2

Page 46: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

46

9.5: Determining the Sample Size

Sample size needed to estimate (µ1 - µ1) Given (1 - a ) and the sampling error (SE)

required

Estimates of σ1 and σ2 will be needed

2

22

21

22/

21 SE

)()(

znn

Page 47: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

47

9.5: Determining the Sample Size

Suppose you need to estimate the difference between two population means to within 2.2 at the a = 5% level. You have good reason to believe the two variances are equal to each other, and equal 15.

How large must n1 and n2 be?

Page 48: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

248.232.2

)1515(96.1

SE

)()(

21

2

2

21

2

22

21

22/

21

nn

nn

znn

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

48

9.5: Determining the Sample Size

SE = 2.2 a = 5% level. σ1

2 = σ22 =15.

n1 and n2 = ?

Page 49: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

49

9.5: Determining the Sample Size

Sample size needed to estimate (p1 - p2) Given (1 - a ) and the sampling error (SE)

required

Estimates of p1 and p2 will be needed The most conservative values are p1 = p2 =.5

22211

22/

21 SE

)()( qpqpznn

Page 50: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

50

9.5: Determining the Sample Size

Suppose you need to calculate a 90% confidence interval of width .05, with no information about possible values of p1 and p2.

What size do n1 and n2 need to be?

Page 51: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

5422.541.05

)]5)(.5(.)5)(.5[(.645.1

SE

)()(

21

2

2

21

22211

22/

21

nn

nn

qpqpznn

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

51

9.5: Determining the Sample Size Suppose you

need to calculate a 90% confidence interval of width .05, with no information about possible values of p1 and p2.

What size do n1 and n2 need to be?

Page 52: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

52

9.6: Comparing Two Population Variances: Independent Sampling

Page 53: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

53

9.6: Comparing Two Population Variances: Independent Sampling

Since variances do not follow a normal distribution (due to the squaring involved) we use a different technique for inferences about variances.

Page 54: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

54

9.6: Comparing Two Population Variances: Independent Sampling

2 22 2 2 2 1 1

1 1 2 2 2 22 2

22 2 1

1 2 22

1

2

If ( ) and ( ) , then .

If , the random variable .

The random variable is a ratio with 1 numerator

and 1 denominator degrees of freed

sE s E s E

s

sF

s

F n

n

om.

Page 55: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

55

9.6: Comparing Two Population Variances: Independent Sampling

If the ratio of variances gets too far from 1 in value, in either direction the likelihood that both samples share a population variance drops. For convenience the larger sample variance is usually put in the numerator.

Page 56: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

56

9.6: Comparing Two Population Variances: Independent Sampling

2 21 2

2 2 21 1 12 2 22 , /2 2 2 , /2

, /2

, /2

A (1 ) 100% Confidence Interval for /

1 1

where leaves ( /2)% of the distribution in a lower tail

and leaves ( /2)% o

U L

L

U

s s

s F s F

F

F

1

2

f the distribution in an upper tail.

Degrees of freedom are 1 in the numerator and

1 in the denominator.

n

n

Page 57: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

57

9.6: Comparing Two Population Variances: Independent Sampling

Home Runs, 2003

American League

National League

µ 178.5 169.25

σ 2 1415.8 951.4

n 14 16

Has the designated hitter produced a significant difference in homeruns in the two major leagues?

To use the two-sample t-test, we should check the variance ratio to see if the assumption of equal variances is acceptable.

Page 58: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

58

9.6: Comparing Two Population Variances: Independent Sampling

2 2 21 1 12 2 22 , /2 2 2 , /2

212

,.025 2 ,.025

2122

1 1

1415.8 1 1415.8 1

951.4 951.4

1415.8 1 1415.8

951.4 2.92 951.

U L

U L

s s

s F s F

F F

2122

1

4 .32

.5096 4.6504

Home Runs, 2003

American League

National League

µ 178.5 169.25

σ2 1415.8 951.4

n 14 16

Page 59: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

59

9.6: Comparing Two Population Variances: Independent Sampling

2 2 21 1 12 2 22 , /2 2 2 , /2

212

,.025 2 ,.025

2122

1 1

1415.8 1 1415.8 1

951.4 951.4

1415.8 1 1415.8

951.4 2.92 951.

U L

U L

s s

s F s F

F F

2122

1

4 .32

.5096 4.6504

Home Runs, 2003

American League

National League

µ 178.5 169.25

σ 2 1415.8 951.4

n 14 16

Since 1 is in the confidence interval, the assumption of equal variances needed for the t-test is not rejected.

Page 60: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

-Test for Equal Population VariancesF

2 20 1 2

2 21 2

22 221 22

1

22 211 22

2

One-Tailed Test

:

: (or )

Test Statistic: if :

or if :

Rejection Region:

a

a

a

H

H

sF H

s

sF H

s

F F

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

60

9.6: Comparing Two Population Variances: Independent Sampling

2 20 1 2

2 21 2

/2

Two-Tailed Test

:

:

Test Statistic:

Larger sample variance

Smaller sample variance

Rejection Region:

a

H

H

F

F F

Page 61: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

9.6: Comparing Two Population Variances: Independent Sampling

In 2006, ten fast-growing economies had an average GDP growth rate of 8.69%, with a standard deviation of 1.7. Ten slow-growing economies had an average GDP growth rate of 2.29%, with a standard deviation of .58.* Do slow- and fast-growing economies have similar variability (a=5%)?

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

61

* Source: euroekonom.com

Page 62: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

62

9.6: Comparing Two Population Variances: Independent Sampling

2 20 1 2

2 21 2

.025

Two-Tailed Test

:

:

Test Statistic:

Larger sample variance 2.898.5

Smaller sample variance .34

Rejection Region: 4.03

a

H

H

F

F F

µfast-growing = 8.69%µslow-growing = 2.29%σ 2fast-growing = 2.89σ 2slow-growing = .34

Page 63: Chapter 9: Inferences Based on Two Samples: Confidence Intervals and Tests of Hypotheses Statistics

McClave, Statistics, 11th ed. Chapter 9: Inferences Based on Two Samples

63

9.6: Comparing Two Population Variances: Independent Sampling

2 20 1 2

2 21 2

.025

Two-Tailed Test

:

:

Test Statistic:

Larger sample variance 2.898.5

Smaller sample variance .34

Rejection Region: 4.03

a

H

H

F

F F

µfast-growing = 8.69%µslow-growing = 2.29%σ 2fast-growing = 2.89σ 2slow-growing = .34

Reject the null hypothesis at the a=.05 level.