the mcgraw-hill companies, inc., 2000 9-1 chapter 9 testing the difference between two means

23
© The McGraw-Hill Companies, Inc., 2000 9-1 9-1 Chapter 9 Chapter 9 Testing the Difference Testing the Difference between Two Means between Two Means

Upload: merry-holt

Post on 18-Jan-2018

220 views

Category:

Documents


0 download

DESCRIPTION

© The McGraw-Hill Companies, Inc., Testing the Difference between Two Means: Testing the Difference between Two Means:  1 and  2 known Assumptions for this test: Samples are randomly sampled and independent. The populations must be normally distributed if n

TRANSCRIPT

Page 1: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-19-1

Chapter 9Chapter 9

Testing the Difference between Testing the Difference between Two MeansTwo Means

Page 2: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-59-5ObjectivesObjectives

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

Test the difference between two means for independent samples using the t-test.

Test the difference between two means for dependent samples.

Page 3: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-79-7 Testing the Difference between Testing the Difference between Two Means:Two Means: 1 and 2 known

Assumptions for this test:Samples are randomly sampled and independent.The populations must be normally distributed if n <30.Population standard deviations are known.

Page 4: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-89-8 Testing the Difference between Testing the Difference between Two Means:Two Means: 1 and 2 known

1

2, 1

n s2

2, 2n s

1

2, 1

2

2, 2

Page 5: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-99-9 Formula for the Formula for the zz-test for Comparing Two -test for Comparing Two Means from Independent PopulationsMeans from Independent Populations

zX X

n n

1 2 1 2

1

2

1

2

2

2

Usually 1 and 2 are assumed to be equal so the numerator is the difference between the sample means.

Page 6: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-109-10 zz-test for Comparing Two Means from -test for Comparing Two Means from Independent Populations – Independent Populations – Example

A survey found that the average hotel room rate in New Orleans is $88.42 and the average room rate in Phoenix is $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 is no significant difference in the rates?

Page 7: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-119-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.

zz-test for Comparing Two Means from -test for Comparing Two Means from Independent PopulationsIndependent Populations – – Example

Page 8: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-129-12 zz-test for Comparing Two Means from -test for Comparing Two Means from Independent PopulationsIndependent Populations – – Example

zX X

n n

1 2 1 2

1

2

1

2

2

2

2 2

88 42 80 61 05 62

504 8350

7 45

. .. .

.

Page 9: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-139-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 rates.

zz-test for Comparing Two Means from -test for Comparing Two Means from Independent PopulationsIndependent Populations – – Example

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

© The McGraw-Hill Companies, Inc., 2000

9-149-14PP-Values-Values

The P-values for the tests can be determined by looking up the area(s) in the tails of the z-value(s).

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 < = 0.05.

Page 11: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-329-32

When the 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 sampled populations must be normally or approximately normally distributed if n <30.

Testing the Difference between Testing the Difference between Two Two Means:Means: 1 and 2 unknown

Page 12: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-339-33

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

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

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

Testing the Difference between Testing the Difference between Two Two Means:Means: 1 and 2 unknown

Page 13: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-349-34

t

X Xsn

sn

d f smaller of n or n

1 2 1 2

1

2

1

2

2

2

1 21 1

. .

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

Unequal Variances

Page 14: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-359-35 Testing the Difference between Two Means:Testing the Difference between Two Means: Independent Samples - Test Value Formula

Equal Variances

t

X Xn s n s

n n n nd 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 15: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-369-36

The average size of a farm in Greene County, PA, is 199 acres, and the average size of a farm in Indiana County, PA, 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 Greene County and 8 farms in Indiana County. Can it be concluded at = 0.05 that the average size of the farms in the two counties is different?

Difference between Two Means:Difference between Two Means:Independent Samples -Independent Samples - Example

Page 16: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-379-37

Assume the populations are normally distributed.

First use an 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.

Difference between Two Means: Difference between Two Means: Independent Samples -Independent Samples - Example

Page 17: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-389-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)

Difference between Two Means: Difference between Two Means: Independent Samples -Independent Samples - Example

Page 18: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-399-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 and +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.

Difference between Two Means: Difference between Two Means: Independent Samples -Independent Samples - Example

Page 19: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-409-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.

Difference between Two Means: Difference between Two Means: Independent Samples -Independent Samples - Example

Page 20: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-429-42

When the values are dependent, employ a t-test on paired 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.

Testing the Difference between Two Means:Testing the Difference between Two Means: Dependent Samples

Page 21: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-439-43

Samples may be dependent because the same subjects are used twice – called a repeated-measures test – or the subjects are paired by some important factor, e.g., identical twins, same height, same percent body fat, same grade. Using twins or same subjects is best.

Testing the Difference between Two Means:Testing the Difference between Two Means: Dependent Samples

Page 22: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-449-44

t Ds n

whereD sample mean

of freedom n

D

D

degrees 1

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

Page 23: The McGraw-Hill Companies, Inc., 2000 9-1 Chapter 9 Testing the Difference between Two Means

© The McGraw-Hill Companies, Inc., 2000

9-459-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.

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