© 2010 pearson prentice hall. all rights reserved chapter inferences on two samples 11

198
© 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

Upload: hallie-cornish

Post on 01-Apr-2015

222 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

Chapter

Inferences on Two Samples

11

Page 2: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

Section

Inference about Two Means: Dependent Samples

11.1

Page 3: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-3

Objectives

1. Distinguish between independent and dependent sampling

2. Test hypotheses regarding matched-pairs data

3. Construct and interpret confidence intervals about the population mean difference of matched-pairs data

Page 4: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-4

Objective 1

• Distinguish between Independent and Dependent Sampling

Page 5: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-5

A sampling method is independent when the individuals selected for one sample do not dictate which individuals are to be in a second sample. A sampling method is dependent when the individuals selected to be in one sample are used to determine the individuals to be in the second sample.

Dependent samples are often referred to as matched-pairs samples.

Page 6: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-6

For each of the following, determine whether the sampling method is independent or dependent.

a) A researcher wants to know whether the price of a one night stay at a Holiday Inn Express is less than the price of a one night stay at a Red Roof Inn. She randomly selects 8 towns where the location of the hotels is close to each other and determines the price of a one night stay.

b) A researcher wants to know whether the “state” quarters (introduced in 1999) have a mean weight that is different from “traditional” quarters. He randomly selects 18 “state” quarters and 16 “traditional” quarters and compares their weights.

Parallel Example 1: Distinguish between Independent and Dependent Sampling

Page 7: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-7

a) The sampling method is dependent since the 8 Holiday Inn Express hotels can be matched with one of the 8 Red Roof Inn hotels by town.

b) The sampling method is independent since the “state” quarters which were sampled had no bearing on which “traditional” quarters were sampled.

Solution

Page 8: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-8

Objective 2

• Test Hypotheses Regarding Matched-Pairs Data

Page 9: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-9

“In Other Words”

Statistical inference methods on matched-pairs data use the same methods as inference on a single population mean with unknown, except that the differences are analyzed.

Page 10: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-10

To test hypotheses regarding the mean difference of matched-pairs data, the following must be satisfied:

1. the sample is obtained using simple random sampling

2. the sample data are matched pairs,

3. the differences are normally distributed with no outliers or the sample size, n, is large (n ≥ 30).

Testing Hypotheses Regarding the Differenceof Two Means Using a Matched-Pairs Design

Page 11: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-11

Step 1: Determine the null and alternative hypotheses. The hypotheses can be structured in one of three ways, where d is the population mean difference of the matched-pairs data.

Page 12: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-12

Step 2: Select a level of significance, , based on the seriousness of making a Type I error.

Page 13: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-13

Step 3: Compute the test statistic

which approximately follows Student’s t-distribution with n-1 degrees of freedom. The values of and sd are the mean and standard deviation of the differenced data.

t0 d sd

n

d

Page 14: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-14

Step 4: Use Table VI to determine the critical value using n-1 degrees of freedom.

Classical Approach

Page 15: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-15

Classical Approach

(critical value)

Two-Tailed

Page 16: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-16

Classical Approach

(critical value)

Left-Tailed

Page 17: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-17

Classical Approach

(critical value)

Right-Tailed

Page 18: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-18

Step 5: Compare the critical value with the test statistic:

Classical Approach

Page 19: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-19

Step 4: Use Table VI to determine the P-value using n-1 degrees of freedom.

P-Value Approach

Page 20: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-20

P-Value Approach

Two-Tailed

Page 21: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-21

P-Value Approach

Left-Tailed

Page 22: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-22

P-Value Approach

Right-Tailed

Page 23: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-23

Step 5: If P-value < , reject the null hypothesis.

P-Value Approach

Page 24: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-24

Step 6: State the conclusion.

Page 25: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-25

These procedures are robust, which means that minor departures from normality will not adversely affect the results. However, if the data have outliers, the procedure should not be used.

Page 26: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-26

The following data represent the cost of a one night stay in Hampton Inn Hotels and La Quinta Inn Hotels for a random sample of 10 cities. Test the claim that Hampton Inn Hotels are priced differently than La Quinta Hotels at the =0.05 level of significance.

Parallel Example 2: Testing a Claim Regarding Matched-Pairs Data

Page 27: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-27

City Hampton Inn La Quinta

Dallas 129 105

Tampa Bay 149 96

St. Louis 149 49

Seattle 189 149

San Diego 109 119

Chicago 160 89

New Orleans 149 72

Phoenix 129 59

Atlanta 129 90

Orlando 119 69

Page 28: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-28

This is a matched-pairs design since the hotel prices come from the same ten cities. To test the hypothesis, we first compute the differences and then verify that the differences come from a population that is approximately normally distributed with no outliers because the sample size is small.

The differences (Hampton - La Quinta) are:

24 53 100 40 -10 71 77 70 39 50

with = 51.4 and sd = 30.8336.

Solution

d

Page 29: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-29

No violation of normality assumption.

Solution

Page 30: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-30No outliers.

Solution

Page 31: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-31

Step 1: We want to determine if the prices differ:

H0: d = 0 versus H1: d 0

Step 2: The level of significance is =0.05.

Step 3: The test statistic is

Solution

t0 51.4

30.833610

5.2716.

Page 32: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-32

Step 4: This is a two-tailed test so the critical values at the =0.05 level of significance with n-1=10-1=9 degrees of freedom

are -t0.025=-2.262 and t0.025=2.262.

Solution: Classical Approach

Page 33: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-33

Step 5: Since the test statistic, t0=5.27 is greater than the critical value t.025=2.262, we reject the null hypothesis.

Solution: Classical Approach

Page 34: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-34

Step 4: Because this is a two-tailed test, the P-value is two times the area under the t-distribution with n-1=10-1=9 degrees of freedom to the right of the test statistic t0=5.27. That is, P-value = 2P(t > 5.27) ≈ 2(0.00026)=0.00052 (using technology). Approximately 5 samples in 10,000 will yield results as extreme as we obtained if the null hypothesis is true.

Solution: P-Value Approach

Page 35: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-35

Step 5: Since the P-value is less than the level of significance =0.05, we reject the null hypothesis.

Solution: P-Value Approach

Page 36: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-36

Step 6: There is sufficient evidence to conclude that Hampton Inn hotels and La Quinta hotels are priced differently at the =0.05 level of significance.

Solution

Page 37: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-37

Objective 3

• Construct and Interpret Confidence Intervals for the Population Mean Difference of Matched-Pairs Data

Page 38: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-38

A (1-)100% confidence interval for d is given by

Lower bound:

Upper bound:

The critical value t/2 is determined using n-1 degrees of freedom.

Confidence Interval for Matched-Pairs Data

d t2

sd

n

d t2

sd

n

Page 39: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-39

Note: The interval is exact when the population is normally distributed and approximately correct for nonnormal populations, provided that n is large.

Confidence Interval for Matched-Pairs Data

Page 40: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-40

Construct a 90% confidence interval for the mean difference in price of Hampton Inn versus La Quinta hotel rooms.

Parallel Example 4: Constructing a Confidence Interval for Matched-Pairs Data

Page 41: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-41

• We have already verified that the differenced data come from a population that is approximately normal with no outliers.

• Recall = 51.4 and sd = 30.8336.

• From Table VI with = 0.10 and 9 degrees of freedom, we find t/2 = 1.833.

Solution

d

Page 42: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-42

Thus,

• Lower bound =

• Upper bound =

We are 90% confident that the mean difference in hotel room price for Ramada Inn versus La Quinta Inn is between $33.53 and $69.27.

Solution

51.4 1.83330.8336

10

33.53

51.4 1.83330.8336

10

69.27

Page 43: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

Section

Inference about Two Means: Independent Samples

11.2

Page 44: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-44

Objectives

1. Test hypotheses regarding the difference of two independent means

2. Construct and interpret confidence intervals regarding the difference of two independent means

Page 45: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-45

Suppose that a simple random sample of size n1 is taken from a population with unknown mean 1 and unknown standard deviation 1. In addition, a simple random sample of size n2 is taken from a population with unknown mean 2 and unknown standard deviation 2. If the two populations are normally distributed or the sample sizes are sufficiently large (n1 ≥ 30, n2 ≥ 30) , then

approximately follows Student’s t-distribution with the smaller of n1-1 or n2-1 degrees of freedom where is the sample mean and si

is the sample standard deviation from population i.

Sampling Distribution of the Difference of Two Means: Independent Samples with Population

Standard Deviations Unknown (Welch’s t)

t x 1 x 2 1 2

s12

n1

s22

n2

x i

Page 46: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-46

Objective 1

• Test Hypotheses Regarding the Difference of Two Independent Means

Page 47: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-47

To test hypotheses regarding two population means, 1 and 2, with unknown population standard deviations, we can use the following steps, provided that:

1. the samples are obtained using simple random sampling;

2. the samples are independent;3. the populations from which the samples are drawn

are normally distributed or the sample sizes are large (n1 ≥ 30, n2 ≥ 30).

Testing Hypotheses Regarding the Difference of Two Means

Page 48: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-48

Step 1: Determine the null and alternative hypotheses. The hypotheses are structured in one of three ways:

Page 49: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-49

Step 2: Select a level of significance, , based on the seriousness of making a Type I error.

Page 50: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-50

Step 3: Compute the test statistic

which approximately follows Student’s t- distribution.

t0 x 1 x 2 1 2

s12

n1

s22

n2

Page 51: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-51

Step 4: Use Table VI to determine the criticalvalue using the smaller of n1 -1 or n2 -1 degrees of freedom.

Classical Approach

Page 52: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-52

Classical Approach

(critical value)

Two-Tailed

Page 53: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-53

Classical Approach

(critical value)

Left-Tailed

Page 54: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-54

Classical Approach

(critical value)

Right-Tailed

Page 55: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-55

Step 5: Compare the critical value with the test statistic:

Classical Approach

Page 56: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-56

Step 4: Use Table VI to determine the P-value using the smaller of n1 -1 or n2 -1 degrees of freedom.

P-Value Approach

Page 57: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-57

P-Value Approach

Two-Tailed

Page 58: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-58

P-Value Approach

Left-Tailed

Page 59: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-59

P-Value Approach

Right-Tailed

Page 60: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-60

Step 5: If P-value < , reject the null hypothesis.

P-Value Approach

Page 61: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-61

Step 6: State the conclusion.

Page 62: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-62

These procedures are robust, which means that minor departures from normality will not adversely affect the results. However, if the data have outliers, the procedure should not be used.

Page 63: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-63

A researcher wanted to know whether “state” quarters had a weight that is more than “traditional” quarters. He randomly selected 18 “state” quarters and 16 “traditional” quarters, weighed each of them and obtained the following data.

Parallel Example 1: Testing Hypotheses Regarding Two Means

Page 64: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-64

Page 65: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-65

Test the claim that “state” quarters have a mean weight that is more than “traditional” quarters at the =0.05 level of significance.

NOTE: A normal probability plot of “state” quarters indicates the population could be normal. A normal probability plot of “traditional” quarters indicates the population could be normal

Page 66: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-66

No outliers.

Page 67: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-67

Step 1: We want to determine whether state quarters weigh more than traditional quarters:

H0: 1 = 2 versus H1: 1 > 2

Step 2: The level of significance is =0.05.

Step 3: The test statistic is

Solution

t0 5.7022 5.6494

0.04972

18 0.06892

16

2.53.

Page 68: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-68

Solution: Classical Approach

Step 4: This is a right-tailed test with =0.05. Since n1-1=17 and n2-1=15, we will use 15 degrees of freedom. The corresponding critical value is t0.05=1.753.

Page 69: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-69

Step 5: Since the test statistic, t0=2.53 is greater than the critical value t.05=1.753, we reject the null hypothesis.

Solution: Classical Approach

Page 70: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-70

Step 4: Because this is a right-tailed test, the P-value is the area under the t-distribution to the right of the test statistic t0=2.53. That is, P-value = P(t > 2.53) ≈ 0.01.

Solution: P-Value Approach

Page 71: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-71

Step 5: Since the P-value is less than the level of significance =0.05, we reject the null hypothesis.

Solution: P-Value Approach

Page 72: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-72

Step 6: There is sufficient evidence at the =0.05 level to conclude that the state quarters weigh more than the traditional quarters.

Solution

Page 73: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-73

NOTE: The degrees of freedom used to determine the critical value in the last example are conservative. Results that are more accurate can be obtained by using the following degrees of freedom:

df

s12

n1

s2

2

n2

2

s12

n1

2

n1 1

s22

n2

2

n2 1

Page 74: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-74

Objective 3

• Construct and Interpret Confidence Intervals Regarding the Difference of Two Independent Means

Page 75: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-75

A simple random sample of size n1 is taken from a population with unknown mean 1 and unknown standard deviation 1. Also, a simple random sample of size n2 is taken from a population with unknown mean 2 and unknown standard deviation 2. If the two populations are normally distributed or the sample sizes are sufficiently large (n1≥30 and n2≥30), a (1-)100% confidence interval about 1 - 2 is given by

Lower bound:

Upper bound:

Constructing a (1-) 100% ConfidenceInterval for the Difference of Two Means

x 1 x 2 t2

s1

2

n1

s2

2

n2

x 1 x 2 t2

s1

2

n1

s2

2

n2

Page 76: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-76

Construct a 95% confidence interval about the difference between the population mean weight of a “state” quarter versus the population mean weight of a “traditional” quarter.

Parallel Example 3: Constructing a Confidence Interval for the Difference of Two Means

Page 77: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-77

• We have already verified that the populations are approximately normal and that there are no outliers.

• Recall = 5.702, s1 = 0.0497, =5.6494 and s2 = 0.0689.

• From Table VI with = 0.05 and 15 degrees of freedom, we find t/2 = 2.131.

Solution

x 1

x 2

Page 78: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-78

Thus,

• Lower bound =

• Upper bound =

Solution

5.702 5.649 2.1310.04972

18

0.06892

160.0086

5.702 5.649 2.1310.04972

18

0.06892

160.0974

Page 79: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-79

We are 95% confident that the mean weight of the “state” quarters is between 0.0086 and 0.0974 ounces more than the mean weight of the “traditional” quarters. Since the confidence interval does not contain 0, we conclude that the “state” quarters weigh more than the “traditional” quarters.

Solution

Page 80: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-80

When the population variances are assumed to be equal, the pooled t-statistic can be used to test for a difference in means for two independent samples. The pooled t-statistic is computed by finding a weighted average of the sample variances and using this average in the computation of the test statistic.

• The advantage to this test statistic is that it exactly follows Student’s t-distribution with n1+n2-2 degrees of freedom.

• The disadvantage to this test statistic is that it requires that the population variances be equal.

Page 81: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

Section

Inference about Two Population Proportions

11.3

Page 82: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-82

Objectives

1. Test hypotheses regarding two population proportions

2. Construct and interpret confidence intervals for the difference between two population proportions

3. Use McNemar’s Test to compare two proportions from matched-pairs data

4. Determine the sample size necessary for estimating the difference between two population proportions within a specified margin of error.

Page 83: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-83

Suppose that a simple random sample of size n1 is taken from a

population where x1 of the individuals have a specified characteristic,

and a simple random sample of size n2 is independently taken from a

different population where x2 of the individuals have a specified

characteristic. The sampling distribution of , where

and , is approximately normal, with mean

and standard deviation

provided that and .

Sampling Distribution of the Difference between Two Proportions

ˆ p 1 ˆ p 2

ˆ p 1 x1 n1

ˆ p 1 ˆ p 2p1 p2

ˆ p 2 x2 n2

ˆ p 1 ˆ p 2

p1 1 p1 n1

p2 1 p2

n2

n1ˆ p 1 1 ˆ p 1 10

n2ˆ p 2 1 ˆ p 2 10

Page 84: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-84

The standardized version of is then written as

which has an approximate standard normal distribution.

Sampling Distribution of the Difference between Two Proportions

ˆ p 1 ˆ p 2

Z ˆ p 1 ˆ p 2 p1 p2

p1 1 p1 n1

p2 1 p2

n2

Page 85: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-85

Objective 1

• Test Hypotheses Regarding Two Population Proportions

Page 86: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-86

The best point estimate of p is called the pooled estimate of p, denoted , where

Test statistic for Comparing Two Population Proportions

ˆ p

ˆ p x1 x2

n1 n2

z0 ˆ p 1 ˆ p 2 ˆ p 1 ˆ p 2

ˆ p 1 ˆ p 2

ˆ p 1 ˆ p 1

n1

1

n2

Page 87: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-87

To test hypotheses regarding two population proportions, p1 and p2, we can use the steps that follow, provided that:

1. the samples are independently obtained using simple random sampling,

2. and and

3. n1 ≤ 0.05N1 and n2 ≤ 0.05N2 (the sample size is no more than 5% of the population size); this requirement ensures the independence necessary for a binomial experiment.

Hypothesis Test Regarding the Differencebetween Two Population Proportions

n1ˆ p 1 1 ˆ p 1 10

n2ˆ p 2 1 ˆ p 2 10,

Page 88: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-88

Step 1: Determine the null and alternative hypotheses. The hypotheses can be structured in one of three ways:

Page 89: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-89

Step 2: Select a level of significance, , based on the seriousness of making a Type I error.

Page 90: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-90

Step 3: Compute the test statistic

where

z0 ˆ p 1 ˆ p 2

ˆ p 1 ˆ p 1

n1

1

n2

ˆ p x1 x2

n1 n2

.

Page 91: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-91

Step 4: Use Table V to determine the criticalvalue.

Classical Approach

Page 92: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-92

Classical Approach

(critical value)

Two-Tailed

Page 93: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-93

Classical Approach

(critical value)

Left-Tailed

Page 94: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-94

Classical Approach

(critical value)

Right-Tailed

Page 95: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-95

Step 5: Compare the critical value with the test statistic:

Classical Approach

Page 96: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-96

Step 4: Use Table V to estimate the P-value..

P-Value Approach

Page 97: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-97

P-Value Approach

Two-Tailed

Page 98: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-98

P-Value Approach

Left-Tailed

Page 99: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved 11-99

P-Value Approach

Right-Tailed

Page 100: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-100

Step 5: If P-value < , reject the null hypothesis.

P-Value Approach

Page 101: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-101

Step 6: State the conclusion.

Page 102: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-102

An economist believes that the percentage of urban households with Internet access is greater than the percentage of rural households with Internet access. He obtains a random sample of 800 urban households and finds that 338 of them have Internet access. He obtains a random sample of 750 rural households and finds that 292 of them have Internet access. Test the economist’s claim at the =0.05 level of significance.

Parallel Example 1: Testing Hypotheses Regarding Two Population Proportions

Page 103: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-103

We must first verify that the requirements are satisfied:

– The samples are simple random samples that were obtained independently.

– x1=338, n1=800, x2=292 and n2=750, so

3. The sample sizes are less than 5% of the population size.

Solution

ˆ p 1 338

8000.4225 and ˆ p 2

292

7500.3893. Thus,

n1ˆ p 1 1 ˆ p 1 800(0.4225)(1 0.4225) 195.195 10

n2ˆ p 2 1 ˆ p 2 750(0.3893)(1 0.3893) 178.309 10

Page 104: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-104

Step 1: We want to determine whether the percentage of urban households with Internet access is greater than the percentage of rural households with Internet access. So,

H0: p1 = p2 versus H1: p1 > p2

or, equivalently,

H0: p1 - p2=0 versus H1: p1 - p2 > 0

Step 2: The level of significance is = 0.05.

Solution

Page 105: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-105

Step 3: The pooled estimate of is:

The test statistic is:

Solution

z0 0.4225 0.3893

0.4065 1 0.4065 1

800 1

750

1.33.

ˆ p

ˆ p x1 x2

n1 n2

338 292

800 7500.4065.

Page 106: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-106

Step 4: This is a right-tailed test with =0.05. The critical value is z0.05=1.645.

Solution: Classical Approach

Page 107: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-107

Step 5: Since the test statistic, z0=1.33 is less than the critical value z.05=1.645, we fail to reject the null hypothesis.

Solution: Classical Approach

Page 108: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-108

Step 4: Because this is a right-tailed test, the P-value is the area under the normal to the right of the test statistic z0=1.33. That is, P-value = P(Z > 1.33) ≈ 0.09.

Solution: P-Value Approach

Page 109: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-109

Step 5: Since the P-value is greater than the level of significance =0.05, we fail to reject the null hypothesis.

Solution: P-Value Approach

Page 110: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-110

Step 6: There is insufficient evidence at the =0.05 level to conclude that the percentage of urban households with Internet access is greater than the percentage of rural households with Internet access.

Solution

Page 111: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-111

Objective 2

• Construct and Interpret Confidence Intervals for the Difference between Two Population Proportions

Page 112: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-112

To construct a (1-)100% confidence interval for the difference between two population proportions, the following requirements must be satisfied:

1. the samples are obtained independently using simple random sampling,

2. , and

3. n1 ≤ 0.05N1 and n2 ≤ 0.05N2 (the sample size is no more than 5% of the population size); this requirement ensures the independence necessary for a binomial experiment.

Constructing a (1-) 100% Confidence Interval for the Difference between Two

Population Proportions

n1ˆ p 1 1 ˆ p 1 10

n2ˆ p 2 1 ˆ p 2 10

Page 113: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-113

Provided that these requirements are met, a (1-)100% confidence interval for p1-p2 is given by

Lower bound:

Upper bound:

ˆ p 1 ˆ p 2 z2

ˆ p 1 1 ˆ p 1

n1

ˆ p 2 1 ˆ p 2

n2

ˆ p 1 ˆ p 2 z2

ˆ p 1 1 ˆ p 1

n1

ˆ p 2 1 ˆ p 2

n2

Constructing a (1-) 100% Confidence Interval for the Difference between Two

Population Proportions

Page 114: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-114

An economist obtains a random sample of 800 urban households and finds that 338 of them have Internet access. He obtains a random sample of 750 rural households and finds that 292 of them have Internet access. Find a 99% confidence interval for the difference between the proportion of urban households that have Internet access and the proportion of rural households that have Internet access.

Parallel Example 3: Constructing a Confidence Interval for the Difference between Two Population Proportions

Page 115: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-115

We have already verified the requirements for constructing a confidence interval for the difference between two population proportions in the previous example.

Recall

Solution

ˆ p 1 338

8000.4225 and ˆ p 2

292

7500.3893.

Page 116: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-116

Thus,

Lower bound =

Upper bound =

Solution

0.4225 0.3893

2.5750.4225(1 0.4225)

800

0.3893(1 0.3893)

750 0.0310

0.4225 0.3893

2.5750.4225(1 0.4225)

800

0.3893(1 0.3893)

7500.0974

Page 117: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-117

We are 99% confident that the difference between the proportion of urban households that have Internet access and the proportion of rural households that have Internet access is between -0.03 and 0.10. Since the confidence interval contains 0, we are unable to conclude that the proportion of urban households with Internet access is greater than the proportion of rural households with Internet access.

Solution

Page 118: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-118

Objective 3

• Use McNemar’s Test to Compare Two Proportions from Matched-Pairs Data

Page 119: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-119

McNemar’s Test is a test that can be used to compare two proportions with matched-pairs data (i.e., dependent samples)

Page 120: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-120

Testing a Hypothesis Regarding the Difference of Two Population

Proportions: Dependent Samples

To test hypotheses regarding two population proportionsp1 and p2, where the samples are dependent, arrange thedata in a contingency table as follows:

Treatment A

Treatment B

Success Failure

Success f11 f12

Failure f21 f22

Page 121: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-121

Testing a Hypothesis Regarding the Difference of Two Population

Proportions: Dependent Samples

We can use the steps that follow provided that:1. the samples are dependent and are obtained

randomly and2. the total number of observations where the

outcomes differ must be greater than or equal to 10.That is, f12 + f21 ≥ 10.

Page 122: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-122

Step 1: Determine the null and alternative hypotheses.

H0: the proportions between the two populations are equal (p1 =

p2)

H1: the proportions between the two populations differ (p1 ≠ p2)

Page 123: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-123

Step 2: Select a level of significance, , based on the seriousness of making a Type I error.

Page 124: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-124

Step 3: Compute the test statistic

z0 f12 f21 1

f12 f21

Page 125: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-125

Step 4: Use Table V to determine the criticalvalue. This is a two tailed test. However, z0 is always positive, so we only need to find the right critical value z/2.

Classical Approach

Page 126: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-126

Classical Approach

Page 127: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-127

Step 5: If z0 > z/2, reject the null hypothesis.

Classical Approach

Page 128: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-128

Step 4: Use Table V to determine the P-value..Because z0 is always positive, we find the area to the right of z0 and then double this area (since this is a two-tailed test).

P-Value Approach

Page 129: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-129

P-Value Approach

Page 130: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-130

Step 5: If P-value < , reject the null hypothesis.

P-Value Approach

Page 131: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-131

Step 6: State the conclusion.

Page 132: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-132

A recent General Social Survey asked the following two questions of a random sample of 1483 adult Americans under the hypothetical scenario that the government suspected that a terrorist act was about to happen:

• Do you believe the authorities should have the right to tap people’s telephone conversations?

• Do you believe the authorities should have the right to detain people for as long as they want without putting them on trial?

Parallel Example 4: Analyzing the Difference of Two Proportions from Matched-Pairs Data

Page 133: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-133

The results of the survey are shown below:

Do the proportions who agree with each scenario differ significantly? Use the =0.05 level of significance.

Parallel Example 4: Analyzing the Difference of Two Proportions from Matched-Pairs Data

Detain

Tap

Phone

Agree Disagree

Agree 572 237

Disagree 224 450

Page 134: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-134

The sample proportion of individuals who believe that the

authorities should be able to tap phones is

.

The sample proportion of individuals who believe that

the authorities should have the right to detain people is

. We want to

determine whether the difference in sample

proportions is due to sampling error or to the fact that

the population proportions differ.

Solution

ˆ p T 572 237

14830.5455

ˆ p D 572 224

14830.5367

Page 135: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-135

The samples are dependent and were obtained randomly. The total number of individuals who agree with one scenario, but disagree with the other is 237+224=461, which is greater than 10. We can proceed with McNemar’s Test.

Step 1: The hypotheses are as follows

H0: the proportions between the two populations are equal (pT = pD)

H1: the proportions between the two populations differ (pT ≠ pD)

Step 2: The level of significance is = 0.05.

Solution

Page 136: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-136

Step 3: The test statistic is:

Solution

z0 224 237 1

237 2240.56

Page 137: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-137

Step 4: The critical value with an =0.05 level of significance is z0.025=1.96.

Solution: Classical Approach

Page 138: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-138

Step 5: Since the test statistic, z0=0.56 is less than the critical value z.025=1.96, we fail to reject the null hypothesis.

Solution: Classical Approach

Page 139: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-139

Step 4: The P-value is two times the area under the normal curve to the right of the test statistic z0=0.56. That is, P-value = 2*P(Z > 0.56) ≈ 0.5754.

Solution: P-Value Approach

Page 140: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-140

Step 5: Since the P-value is greater than the level of significance =0.05, we fail to reject the null hypothesis.

Solution: P-Value Approach

Page 141: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-141

Step 6: There is insufficient evidence at the =0.05 level to conclude that there is a difference in the proportion of adult Americans who believe it is okay to phone tap versus detaining people for as long as they want without putting them on trial in the event that the government believed a terrorist plot was about to happen.

Solution

Page 142: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-142

Objective 4

• Determine the Sample Size Necessary for Estimating the Difference between Two Population Proportions within a Specified Margin of Error

Page 143: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-143

Sample Size for Estimating p1-p2

The sample size required to obtain a (1-)100% confidence interval with a margin of error, E, is givenby

rounded up to the next integer, if prior estimates of p1

and p2, , are available. If prior estimates ofp1 and p2 are unavailable, the sample size is

rounded up to the next integer.

n n1 n2 ˆ p 1 1 ˆ p 1 ˆ p 2 1 ˆ p 2 z 2

E

2

ˆ p 1 and ˆ p 2

n n1 n2 0.5z 2

E

2

Page 144: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-144

A doctor wants to estimate the difference in the proportion of 15-19 year old mothers that received prenatal care and the proportion of 30-34 year old mothers that received prenatal care. What sample size should be obtained if she wished the estimate to be within 2 percentage points with 95% confidence assuming:

a) she uses the results of the National Vital Statistics Report results in which 98% of the 15-19 year old mothers received prenatal care and 99.2% of 30-34 year old mothers received prenatal care.

b) she does not use any prior estimates.

Parallel Example 5: Determining Sample Size

Page 145: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-145

We have E=0.02 and z/2=z0.025=1.96.

a) Letting ,

The doctor must sample 265 randomly selected 15-19 year old mothers and 265 randomly selected 30-34 year old mothers.

Solution

ˆ p 1 0.98 and ˆ p 2 0.992

n1 n2 0.98(1 0.98) 0.992(1 0.992) 1.96

0.02

2

264.5

Page 146: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-146

b) Without prior estimates of p1 and p2, the sample size is

The doctor must sample 4802 randomly selected 15-19 year old mothers and 4802 randomly selected 30-34 year old mothers. Note that having prior estimates of p1 and p2 reduces the number of mothers that need to be surveyed.

Solution

n1 n2 0.51.96

0.02

2

4802

Page 147: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

Section

Inference about Two Population Standard Deviations

11.4

Page 148: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-148

Objectives

1. Find critical values of the F-distribution

2. Test hypotheses regarding two population standard deviations

Page 149: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-149

Objective 1

• Find Critical Values of the F-distribution

Page 150: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-150

Requirements for Testing Claims Regarding Two Population Standard

Deviations

1. The samples are independent simple random samples.

Page 151: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-151

Requirements for Testing Claims Regarding Two Population Standard

Deviations

1. The samples are independent simple random samples.2. The populations from which the samples are drawn are normally distributed.

Page 152: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-152

CAUTION!

If the populations from which the samples are drawnare not normal, do not use the inferential procedures

discussed in this section.

Page 153: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-153

Notation Used When Comparing Two Population Standard Deviations

12

: Variance for population 1

: Variance for population 2

: Sample variance for population 1

: Sample variance for population 2

n1 : Sample size for population 1

n2 : Sample size for population 2

22

s12

s22

Page 154: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-154

Fisher's F-distribution

If and and are sample variances fromindependent simple random samples of size n1 andn2, respectively, drawn from normal populations, then

follows the F-distribution with n1-1 degrees offreedom in the numerator and n2-1 degrees of freedom in the denominator.

12 2

2

s12

s22

F s1

2

s22

Page 155: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-155

Characteristics of the F-distribution

1. It is not symmetric. The F-distribution is skewed right.

Page 156: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-156

Characteristics of the F-distribution

1. It is not symmetric. The F-distribution is skewed right.2. The shape of the F-distribution depends upon the degrees of freedom in the numerator and denominator. This is similar to the 2 distribution and Student’s t-distribution, whose shapes depend upon their degrees of freedom.

Page 157: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-157

Characteristics of the F-distribution

1. It is not symmetric. The F-distribution is skewed right.2. The shape of the F-distribution depends upon the degrees of freedom in the numerator and denominator. This is similar to the distribution and Student’s t-distribution, whose shape depends upon their degrees of freedom.3. The total area under the curve is 1.

Page 158: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-158

Characteristics of the F-distribution

1. It is not symmetric. The F-distribution is skewed right.2. The shape of the F-distribution depends upon the degrees of freedom in the numerator and denominator. This is similar to the distribution and Student’s t-distribution, whose shape depends upon their degrees of freedom.3. The total area under the curve is 1.4. The values of F are always greater than or equal to zero.

Page 159: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-159

Page 160: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-160

is the critical F with n1 – 1 degrees of freedom in the numerator and n2 – 1 degrees of freedom in the denominator and an area of to the right of the critical F.

Page 161: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-161

To find the critical F with an area of α to the left, use the following:

F1 ,n1 1,n2 1 1

F,n2 1,n1 1

Page 162: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-162

Find the critical F-value:

a) for a right-tailed test with =0.1, degrees of freedom in the numerator = 8 and degrees of freedom in the denominator = 4.

b) for a two-tailed test with =0.05, degrees of freedom in the numerator = 20 and degrees of freedom in the denominator = 15.

Parallel Example 1: Finding Critical Values for the F-distribution

Page 163: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-163

a) F0.1,8,4 = 3.95

b) F.025,20,15 = 2.76; = 0.39

Solution

F.975,20,15 1

F.025,15,20

1

2.57

Page 164: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-164

NOTE:

If the number of degrees of freedom is not found in the table, we follow the practice of choosing the degrees of freedom closest to that desired. If the degrees of freedom is exactly between two values, find the mean of the values.

Page 165: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-165

Objective 2

• Test Hypotheses Regarding Two Population Standard Deviations

Page 166: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-166

To test hypotheses regarding two population standard deviations, 1 and 2, we can use the following steps, provided that

1. the samples are obtained using simple random sampling,

2. the sample data are independent, and

3. the populations from which the samples are drawn are normally distributed.

Test Hypotheses Regarding Two Population Standard Deviations

Page 167: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-167

Step 1: Determine the null and alternative hypotheses. The hypotheses can be structured in one of three ways:

Two-Tailed Left-Tailed Right-Tailed

H0: 1 = 2 H0: 1 = 2 H0: 1 = 2

H1: 1 ≠ 2 H1: 1 < 2 H1: 1 > 2

Note: 1 is the population standard deviation for population 1 and 2 is the population standard deviation for population 2.

Page 168: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-168

Step 2: Select a level of significance, , based on the seriousness of making a Type I error.

Page 169: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-169

Step 3: Compute the test statistic

which follows Fisher’s F-distribution with n1-1 degrees of freedom in the numerator and n2-1 degrees of freedom in the denominator.

F0 s1

2

s22

Page 170: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-170

Step 4: Use Table VIII to determine the criticalvalue(s) using n1-1 degrees of freedom in the numerator and n2-1 degrees of freedom in the denominator.

Classical Approach

Page 171: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-171

Classical Approach

(critical value)

Two-Tailed

Page 172: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-172

Classical Approach

(critical value)

Left-Tailed

Page 173: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-173

Classical Approach

(critical value)

Right-Tailed

Page 174: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-174

Step 5: Compare the critical value with the test statistic:

Classical Approach

Two-Tailed Left-Tailed Right-Tailed

If or , reject the null hypothesis.

If , reject the null hypothesis.

If , reject the null hypothesis.

F0 F1 2,n1 1,n2 1

F0 F 2,n1 1,n2 1

F0 F1 ,n1 1,n2 1

F0 F,n1 1,n2 1

Page 175: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-175

Step 4: Use technology to determine the P-value.

P-Value Approach

Page 176: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-176

Step 5: If P-value < , reject the null hypothesis.

P-Value Approach

Page 177: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-177

Step 6: State the conclusion.

Page 178: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-178

CAUTION!

The procedures just presented are not robust,minor departures from normality will adversely affect the results of the test. Therefore, the test should be used only when the requirement of normality has been verified.

Page 179: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-179

A researcher wanted to know whether “state” quarters had a standard deviation weight that is less than “traditional” quarters. He randomly selected 18 “state” quarters and 16 “traditional” quarters, weighed each of them and obtained the data on the next slide. A normal probability plot indicates that the sample data could come from a population that is normal. Test the researcher’s claim at the = 0.05 level of significance.

Parallel Example 2: Testing Hypotheses Regarding Two Population Standard Deviations

Page 180: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-180

Page 181: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-181

Step 1: The researcher wants to know if “state” quarters have a standard deviation weight that is less than “traditional” quarters. Thus

H0: 1= 2 versus H1: 1< 2

This is a left-tailed test.

Step 2: The level of significance is = 0.05.

Solution

Page 182: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-182

Step 3: The standard deviation of “state” quarters was found to be 0.0497 and the standard deviation of “traditional” quarters was found to be 0.0689. The test statistic is then

Solution

F0 0.04972

0.06892 0.52

Page 183: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-183

Step 4: Since this is a left-tailed test, we determine the critical value at the 1- = 1-0.05 = 0.95 level of significance with n1-1=18-1=17 degrees of freedom in the numerator and n2-1=16-1=15 degrees of freedom in the denominator. Thus,

Note: we used the table value F0.05,15,15 for the above calculation since this is the closest to the required degrees of freedom available from Table VIII.

Solution: Classical Approach

F.95,17,15 1

F.05,15,17

1

2.400.42.

Page 184: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-184

Step 5: Since the test statistic F0= 0.52 is greater than the critical value F0.95,17,15=0.42, we fail to reject the null hypothesis.

Solution: Classical Approach

Page 185: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-185

Step 4: Using technology, we find that the P-value is 0.097. If the statement in the null hypothesis were true, we would expect to get the results obtained about 10 out of 100 times. This is not very unusual.

Solution: P-Value Approach

Page 186: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-186

Step 5: Since the P-value is greater than the level of significance, = 0.05, we fail to reject the null hypothesis.

Solution: P-Value Approach

Page 187: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-187

Step 6: There is not enough evidence to conclude that the standard deviation of weight is less for “state” quarters than it is for “traditional” quarters at the = 0.05 level of significance.

Solution

Page 188: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

Section

Putting It Together: Which Method Do I Use?

11.5

Page 189: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-189

Objectives

1. Determine the appropriate hypothesis test to perform

Page 190: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-190

Objective 1

• Determine the Appropriate Hypothesis Test to Perform

Page 191: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-191

What parameter is addressed in the hypothesis?

• Proportion, p• or 2

• Mean,

Page 192: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-192

Proportion, p

Is the sampling Dependent or Independent?

Page 193: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-193

Proportion, p

Dependent samples:Provided the samples are obtained randomly and the total number of observations where the outcomes differ is at least 10, use the normal distribution with

z0 f12 f21 1

f12 f21

Page 194: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-194

Proportion, p

Independent samples:Provided for each sample and the sample size is no more than 5% of the populationsize, use the normal distribution with

where

nˆ p 1 ˆ p 10

z0 ˆ p 1 ˆ p 2

ˆ p 1 ˆ p 1n1

1n2

ˆ p x1 x2

n1 n2

Page 195: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-195

or 2

Provided the data are normally distributed, use the F-distribution with

F0 s1

2

s22

Page 196: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-196

Mean,

Is the sampling Dependent or Independent?

Page 197: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-197

Mean,

Dependent samples:Provided each sample size is greater than 30 or the differences come from a population that is normally distributed, use Student’s t-distributionwith n-1 degrees of freedom with

t0 d d

sd

n

Page 198: © 2010 Pearson Prentice Hall. All rights reserved Chapter Inferences on Two Samples 11

© 2010 Pearson Prentice Hall. All rights reserved

11-198

Mean,

Independent samples:Provided each sample size is greater than 30 or eachpopulation is normally distributed, use Student’st-distribution

t0 x 1 x 2 1 2

s12

n1

s22

n2