© the mcgraw-hill companies, inc., 2000 10-1 chapter 10 testing the difference between means and...

40
© The McGraw-Hill Companies, Inc., 2000 10-1 10-1 Chapter 10 Chapter 10 Testing the Difference Testing the Difference between Means and between Means and Variances Variances

Upload: malakai-gannaway

Post on 01-Apr-2015

221 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-110-1

Chapter 10Chapter 10

Testing the Difference between Testing the Difference between Means and VariancesMeans and Variances

Page 2: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-210-2OutlineOutline

10-1 Introduction

10-2 Testing the Difference

between Two Means: Large

Samples

10-3 Testing the Difference

between Two Variances

Page 3: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-310-3OutlineOutline

10-4 Testing the Difference

between Two Means: Small

Independent Samples

10-5 Testing the Difference

between Two Means: Small

Dependent Samples

Page 4: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-510-5ObjectivesObjectives

Test the difference between two large sample means using the z-test.

Test the difference between two variances or standard deviations.

Test the difference between two means for small independent samples.

Page 5: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-610-6ObjectivesObjectives

Test the difference between two means for small dependent samples.

Page 6: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-710-7 10-2 Testing the Difference between 10-2 Testing the Difference between Two Means: Two Means: Large Samples

Assumptions for this test: Samples are independent. The sampling populations must

be normally distributed. Standard deviations are known

or samples must be at least 30.

Page 7: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-810-8 10-2 Testing the Difference between 10-2 Testing the Difference between Two Means: Two Means: Large Samples

1

2, 1

n s2

2, 2n s

1

2, 1

2

2, 2

Page 8: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-910-9 10-2 Formula for the 10-2 Formula for the zz Test for Comparing Test for Comparing Two Means from Independent PopulationsTwo Means from Independent Populations

z

X X

n n

1 2 1 2

1

2

1

2

2

2

Page 9: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-1010-10 10-210-2 zz Test for Comparing Two Means Test for Comparing Two Means

from Independent Populations -from Independent Populations -Example

A survey found that the average hotel room rate in Toronto was $88.42 and the average room rate in Ottawa was $80.61. Assume that the data were obtained from two samples of 50 hotels each and that the standard deviations were $5.62 and $4.83 respectively. At = 0.05, can it be concluded that there was no significant difference in the rates?

Page 10: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-1110-11

Step 1:Step 1: State the hypotheses and identify the claim.

H0: (claim) H1: Step 2:Step 2: Find the critical values. Since

= 0.05 and the test is a two-tailed test, the critical values are z = 1.96.

Step 3: Step 3: Compute the test value.

10-2 10-2 zz Test for Comparing Two Means Test for Comparing Two Means

from Independent Populationsfrom Independent Populations - - Example

Page 11: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-1210-12 10-210-2 zz Test for Comparing Two Means Test for Comparing Two Means

from Independent Populationsfrom Independent Populations - - Example

zX X

n n

1 2 1 2

1

2

1

2

2

2

2 2

88 42 80 61 0

5 62

50

4 83

50

7 45

. .

. ..

Page 12: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-1310-13

Step 4:Step 4: Make the decision. Reject the null hypothesis at = 0.05, since 7.45 > 1.96.

Step 5:Step 5: Summarize the results. There is enough evidence to reject the claim that the means are equal. Hence, there is a significant difference in the hotel rates between Toronto and Ottawa.

10-210-2 zz Test for Comparing Two Means Test for Comparing Two Means

from Independent Populationsfrom Independent Populations - - Example

Page 13: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-1410-1410-2 10-2 PP-Values-Values

The P-values for the tests can be determined using the same procedure as shown in Section 9-3.

The P-value for the previous example will be: P-value = 2P(z > 7.45) 2(0) = 0.

You will reject the null hypothesis since the P-value < 0.0005 which is < = 0.05.

Page 14: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-1710-17 10-3 Testing the Difference Between 10-3 Testing the Difference Between Two Variances Two Variances

For the comparison of two variances or standard deviations, an F-test is used.

The sampling distribution of the variances is called the F distribution.

Page 15: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-1810-18 10-3 Characteristics of the 10-3 Characteristics of the FF Distribution Distribution

The values of F cannot be negative. The distribution is positively skewed. The mean value of F is approximately

equal to 1. The F distribution is a family of curves

based on the degrees of freedom of the variance of the numerator and denominator.

Page 16: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-1910-1910-3 Curves for the 10-3 Curves for the FF Distribution Distribution

0

1.0

0.00

1.0

0.0

Page 17: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-2010-2010-3 Formula for the 10-3 Formula for the FF -Test -Test

.

Fs

s

where s is the larger of the two

numerator of freedom n

denominator of freedom n

n is the sample size from which the larger

was obtained

1

2

2

2

1

2

1

2

1

1

1

variances

degrees

degrees

variance

.

Page 18: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-2110-21

The populations from which the samples were obtained must be normally distributed.

The samples must be independent of each other.

10-3 Assumptions for Testing the 10-3 Assumptions for Testing the Difference between Two VariancesDifference between Two Variances

Page 19: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-2210-22

A researcher wishes to see whether the variances of the heart rates (in beats per minute) of smokers are different from the variances of heart rates of people who do not smoke. Two samples are selected, and the data are given on the next slide. Using = 0.05, is there enough evidence to support the claim?

10-3 10-3 Testing the Difference between Testing the Difference between Two Variances Two Variances - - Example

Page 20: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-2310-23

For smokers n1 = 26 and = 36; for

nonsmokers n2 = 18 and = 10. Step 1:Step 1: State the hypotheses and

identify the claim. H0: H1: (claim)

10-3 10-3 Testing the Difference between Testing the Difference between Two Variances Two Variances - - Example

s21

s22

21 2

2 21 2

2

Page 21: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-2410-24

Step 2:Step 2: Find the critical value. Since = 0.05 and the test is a two-tailed test, use the 0.025 table. Here d.f. N. = 26 – 1 = 25, and d.f.D. = 18 – 1 = 17. The critical value is F = 2.56.

Step 3: Step 3: Compute the test value. F = / = 36/10 = 3.6.

10-3 10-3 Testing the Difference between Testing the Difference between Two Variances Two Variances - - Example

s22s

21

Page 22: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-2510-25

Step 4:Step 4: Make the decision. Reject the null hypothesis, since 3.6 > 2.56.

Step 5:Step 5: Summarize the results. There is enough evidence to support the claim that the variances are different.

10-3 10-3 Testing the Difference between Testing the Difference between Two Variances Two Variances - - Example

Page 23: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-2610-26 10-3 10-3 Testing the Difference between Testing the Difference between Two Variances Two Variances - - Example

Page 24: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-2710-27

An instructor hypothesizes that the standard deviation of the final exam grades in her statistics class is larger for the male students than it is for the female students. The data from the final exam for the last semester are: males n1 = 16 and s1 = 4.2; females n2 = 18 and s2 = 2.3.

10-3 10-3 Testing the Difference between Testing the Difference between Two Variances Two Variances - - Example

Page 25: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-2810-28

Is there enough evidence to support her claim, using = 0.01?

Step 1:Step 1: State the hypotheses and identify the claim. H0: H1: (claim)

10-3 10-3 Testing the Difference between Testing the Difference between Two Variances Two Variances - - Example

21 2

2 21 2

2

Page 26: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-2910-29

Step 2:Step 2: Find the critical value. Here, d.f.N. = 16 –1 = 15, and d.f.D. = 18 –1 = 17. For = 0.01 table, the critical value is F = 3.31.

Step 3: Step 3: Compute the test value. F = (4.2)2/(2.3)2 = 3.33.

10-3 10-3 Testing the Difference between Testing the Difference between Two Variances Two Variances - - Example

Page 27: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-3010-30

Step 4: Step 4: Make the decision. Reject the null hypothesis, since 3.33 > 3.31.

Step 5:Step 5: Summarize the results. There is enough evidence to support the claim that the standard deviation of the final exam grades for the male students is larger than that for the female students.

10-3 10-3 Testing the Difference between Testing the Difference between Two Variances Two Variances - - Example

Page 28: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-3110-31 10-3 10-3 Testing the Difference between Testing the Difference between Two Variances Two Variances - - Example

Page 29: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-3210-32

When the sample sizes are small (< 30) and the population variances are unknown, a t-test is used to test the difference between means.

The two samples are assumed to be independent and the sampling populations are normally or approximately normally distributed.

10-4 Testing the Difference between 10-4 Testing the Difference between Two Means:Two Means: Small Independent Samples

Page 30: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-3310-33

There are two options for the use of the t-test.

When the variances of the populations are equal and when they are not equal.

The F-test can be used to establish whether the variances are equal or not.

10-4 Testing the Difference between 10-4 Testing the Difference between Two Means:Two Means: Small Independent Samples

Page 31: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-3410-34

t

X X

sn

sn

d f smaller of n or n

1 2 1 2

1

2

1

2

2

2

1 21 1

. .

10-4 Testing the Difference between 10-4 Testing the Difference between Two Means:Two Means: Small Independent Samples - Test Value Formula

Unequal VariancesUnequal Variances

Page 32: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-3510-3510-4 Testing the Difference between 10-4 Testing the Difference between Two Means:Two Means: Small Independent Samples - Test Value Formula

Equal VariancesEqual Variances

t

X X

n s n sn n n n

d f n n

1 2 1 2

1 1

2

2 2

2

1 2 1 2

1 2

1 12

1 1

2

( ) ( )

. . .

Page 33: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-3610-36

The average size of a farm in Waterloo County is 199 acres, and the average size of a farm in Perth County is 191 acres. Assume the data were obtained from two samples with standard deviations of 12 acres and 38 acres, respectively, and the sample sizes are 10 farms from Waterloo County and 8 farms in Perth County. Can it be concluded at = 0.05 that the average size of the farms in the two counties is different?

10-4 Difference between Two Means: 10-4 Difference between Two Means: Small Independent Samples -Small Independent Samples - Example

Page 34: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-3710-37

Assume the populations are normally distributed.

First we need to use the F-test to determine whether or not the variances are equal.

The critical value for the F-test for = 0.05 is 4.20.

The test value = 382/122 = 10.03.

10-4 Difference between Two Means: 10-4 Difference between Two Means: Small Independent Samples -Small Independent Samples - Example

Page 35: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-3810-38

Since 10.03 > 4.20, the decision is to reject the null hypothesis and conclude the variances are not equal.

Step 1:Step 1: State the hypotheses and identify the claim for the means.

H0: H1: (claim)

10-4 Difference between Two Means: 10-4 Difference between Two Means: Small Independent Samples -Small Independent Samples - Example

Page 36: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-3910-39

Step 2:Step 2: Find the critical values. Since = 0.05 and the test is a two-tailed test, the critical values are t = +/–2.365 with d.f. = 8 – 1 = 7.

Step 3:Step 3: Compute the test value. Substituting in the formula for the test value when the variances are not equal gives t = 0.57.

10-4 Difference between Two Means: 10-4 Difference between Two Means: Small Independent Samples -Small Independent Samples - Example

Page 37: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-4010-40

Step 4: Step 4: Make the decision. Do not reject the null hypothesis, since 0.57 < 2.365.

Step 5: Step 5: Summarize the results. There is not enough evidence to support the claim that the average size of the farms is different.

Note:Note: If the the variances were equal - use the other test value formula.

10-4 Difference between Two Means: 10-4 Difference between Two Means: Small Independent Samples -Small Independent Samples - Example

Page 38: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-4310-43

When the values are dependent, employ a t-test on the differences.

Denote the differences with the symbol D, the mean of the population of differences with D, and the sample standard deviation of the differences with sD.

10-5 Testing the Difference between 10-5 Testing the Difference between Two Means:Two Means: Small Dependent Samples

Page 39: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-4410-44

tD

s n

where

D sample mean

of freedom n

D

D

degrees 1

10-5 Testing the Difference between Two 10-5 Testing the Difference between Two Means:Means: Small Dependent Samples -Formula for the test value.

Page 40: © The McGraw-Hill Companies, Inc., 2000 10-1 Chapter 10 Testing the Difference between Means and Variances

© The McGraw-Hill Companies, Inc., 2000

10-4510-45

Note:Note: This test is similar to a one sample t-test, except it is done on the differences when the samples are dependent.

10-5 Testing the Difference between Two 10-5 Testing the Difference between Two Means:Means: Small Dependent Samples -Formula for the test value.