57
1 Chapter 2: Comparing Means 2.1 One-Sample t-Test 2.2 Paired t-Test 2.3 Two-Sample t-Test

1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

Embed Size (px)

Citation preview

Page 1: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

11

Chapter 2: Comparing Means

2.1 One-Sample t-Test

2.2 Paired t-Test

2.3 Two-Sample t-Test

Page 2: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

22

Chapter 2: Comparing Means

2.1 One-Sample 2.1 One-Sample tt-Test-Test

2.2 Paired t-Test

2.3 Two-Sample t-Test

Page 3: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

3

Objectives Use JMP to evaluate the t-test assumption

of normality. Construct lower-tailed, upper-tailed, and two-tailed

hypothesis tests using the t-test. Identify the appropriate test statistic and hypothesis

test to answer a research question.

3

Page 4: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

4

One-Sample t-Test AssumptionsThe one-sample t-test assumes that is normally distributed. Normal populations yield normal sample means.

– Decide whether population is normal based on tests of sample data.

– Small samples might weakly support these tests. Non-normal populations might yield normal sample

means.– Large samples benefit from principle of central

limit theorem.

4

y

Page 5: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

5

Evaluating NormalityIn addition to graphical tools, JMP provides a statistical test for normality with the following hypotheses:

H0: the data come from a

normal distribution

H1: the data do not come from

a normal distribution

5

Page 6: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

6

Statistical Tests for NormalityThree tests are provided by the Distribution platform to assess the normality of the data. Shapiro-Wilk test for up to 2000 observations. Kolmogorov-Smirnov-Lilliefors (KSL) test for more

than 2000 observations. Lilliefors confidence region in the normal quantile plot.

6

Page 7: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

7

One-Sample t-Test AssumptionsThe one-sample t-test assumes that observations are independent. Independence is determined by the data collection

method. An appropriate simple random sample should lead

to independent observations. Advanced methods handle restrictions to the

randomization both in the design and in the analysis of data from an experiment.

7

Page 8: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

8

Three Research Problems An electronics manufacturer wants to determine

whether, on average, its power supplies are supplying significantly more or less than the desired 12 amperes.

An agricultural company is confident that its new fertilizer results in crop yields of more than 55 bushels per acre, on average.

A laboratory group is concerned that the purity of a chemical that it is using is less than 99.4% on average, as the supplier claims.

8

Page 9: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

9

How to Choose the Appropriate t-TestExamine the alternative hypothesis to determine what t-test is appropriate. Use a two-tailed test if you suspect the true mean

is different than claimed (H1: 12). Use an upper-tailed test if you suspect that the true

mean is higher than claimed (H1: > 55 ). Use a lower-tailed test if you suspect that the true

mean is lower than claimed (H1: < 99.4).

9

Page 10: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

10

2.01 Multiple Answer PollThe null hypothesis is which of the following? (Select all of the correct answers.)

a. The logical opposite of the alternative hypothesisb. The claim that you suspect is truec. Always assumed to be trued. Your instinct

10

Page 11: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

11

2.01 Multiple Answer Poll – Correct AnswersThe null hypothesis is which of the following? (Select all of the correct answers.)

a. The logical opposite of the alternative hypothesisb. The claim that you suspect is truec. Always assumed to be trued. Your instinct

11

Page 12: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

12

Three t-Tests and Their p-Values

12

Two-tailed ( |t| )

Upper-tailed ( > )

Lower-tailed ( < )

Page 13: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

13

2.02 Multiple Choice PollA professor suspects her class is performing below the department average of 73%. She decides to test this claim. Which of the following is the correct alternative hypothesis?

a. μ < .73

b. μ > .73

c. μ ≠ .73

13

Page 14: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

14

2.02 Multiple Choice Poll – Correct AnswerA professor suspects her class is performing below the department average of 73%. She decides to test this claim. Which of the following is the correct alternative hypothesis?

a. μ < .73

b. μ > .73

c. μ ≠ .73

14

Page 15: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

15

The Test StatisticThe statistic follows a t-distribution with mean zero and a standard deviation that depends on the degrees of freedom.

15

where µ0 is the hypothesized mean.

y is the sample mean.

ys is the estimated standard error

of the mean.

ysy

t)μ( 0

Page 16: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

16

Research QuestionA research company suspects that drivers are going faster than the posted speed limit of 45 mph. Help it test the following hypotheses:

16

H0: ≤ 45 H1: > 45

= 0.05

Page 17: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

17

The Reference Distribution

Compute

17

ysy

t)45(

for your sample and compare the sample t to the reference distribution.

Page 18: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

18

Analysis WorkflowFollow these steps in your analysis: Plot your data Diagnose data problems Perform your analysis / Choose your model Evaluate model assumptions Diagnose statistics or model problems Iterate as necessary

18

Page 19: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

19

This demonstration illustrates the concepts discussed previously.

Upper-Tailed Hypothesis Test

Page 20: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

20

Page 21: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

21

Setup for the PollExamine the Goodness-of-Fit Test output from the demonstration.

21

Page 22: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

22

2.03 PollAt α=.05, is there sufficient evidence to reject normality of the data?

Yes

No

22

Page 23: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

23

2.03 Poll – Correct AnswerAt α=.05, is there sufficient evidence to reject normality of the data?

Yes

No

23

Page 24: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

24

This exercise reinforces the concepts discussed previously.

Exercise

Page 25: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

25

2.04 Multiple Choice PollIn the exercise, a one-sample t-test examined whether the average weight of cereal boxes was significantly different from 15. What type of test was run?

a. An upper-tailed testb. A lower-tailed testc. A two-sided test

25

Page 26: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

26

2.04 Multiple Choice Poll – Correct AnswerIn the exercise, a one-sample t-test examined whether the average weight of cereal boxes was significantly different from 15. What type of test was run?

a. An upper-tailed testb. A lower-tailed testc. A two-sided test

26

Page 27: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

2727

Chapter 2: Comparing Means

2.1 One-Sample t-Test

2.2 Paired 2.2 Paired tt-Test-Test

2.3 Two-Sample t-Test

Page 28: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

28

Objectives Recognize when a paired t-test is appropriate. Perform a paired t-test.

28

Page 29: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

29

Paired t-TestA paired t-test is a one-sample t-test on the mean of the differences between paired observations. A paired t-test tests the following hypotheses:

where d is the difference between paired measurements.

29

H0: µd = 0

H1: µd 0

Page 30: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

30

The Test StatisticUse this test statistic to determine whether two means from paired samples differ:

where

is the mean difference between the paired observations (di = y2i – y1i).

is the hypothesized mean difference (H0: µd = 0).

is the standard error of the mean difference.

30

dddd s

ds

ds

ddt 00

d

ds0d

Page 31: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

31

Paired t-Test AssumptionsThe assumptions of the paired t-test are as follows: is normally distributed measurements among subjects are independent the difference should not be proportional to the

response

31

d

Page 32: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

32

Total Cholesterol ExampleA clinical chemist is interested in whether cholesterol measurements are different for pairs of fresh and frozen serum samples obtained from a group of patients.

32

Page 33: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

33

This demonstration illustrates the concepts discussed previously.

Paired t-Test

Page 34: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

34

Page 35: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

35

2.05 Multiple Answer PollWhich of the following statements are true?

a. A paired t-test is the same as a one-sample t-test on the differences.

b. The Matched Pairs platform in JMP allows an evaluation of the relationship, if any, between the differences and the response level.

c. A paired t-test is used when pairs of observations are related.

35

Page 36: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

36

2.05 Multiple Answer Poll – Correct AnswersWhich of the following statements are true?

a. A paired t-test is the same as a one-sample t-test on the differences.

b. The Matched Pairs platform in JMP allows an evaluation of the relationship, if any, between the differences and the response level.

c. A paired t-test is used when pairs of observations are related.

36

Page 37: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

37

This exercise reinforces the concepts discussed previously.

Exercise

Page 38: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

38

2.06 QuizExamine the output from the exercise. What is the conclusion from these comparisons of blood pressure before and after the training?

38

Page 39: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

39

2.06 Quiz – Correct AnswerExamine the output from the exercise. What is the conclusion from these comparisons of blood pressure before and after the training?

The 95% confidence interval on the true average does not contain zero in either case, so this indicates that there is a difference, on average, between the blood pressure readings before and after the training.

39

Page 40: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

4040

Chapter 2: Comparing Means

2.1 One-Sample t-Test

2.2 Paired t-Test

2.3 Two-Sample 2.3 Two-Sample tt-Test-Test

Page 41: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

41

Objectives Distinguish between a two-sample t-test

and a paired t-test. Identify the three assumptions of a two-sample t-test. Compare the means of two populations using

a two-sample t-test.

41

Page 42: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

42

Two-Sample t-Test or Paired t-Test? A two-sample t-test, or independent t-test, is used

when you compare the means of two independent populations.

A paired t-test is used when there are pairs of related measurements.

42

Page 43: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

43

2.07 Multiple Choice PollSuppose that you are interested in evaluating the effect of a marketing campaign on regional retail sales. You collect data before and after the campaign for each retail facility. Which is the more appropriate test?

a. One-sample t-testb. Paired t-testc. Two-sample t-testd. Any of these tests could be appropriate.

43

Page 44: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

44

2.07 Multiple Choice Poll – Correct AnswerSuppose that you are interested in evaluating the effect of a marketing campaign on regional retail sales. You collect data before and after the campaign for each retail facility. Which is the more appropriate test?

a. One-sample t-testb. Paired t-testc. Two-sample t-testd. Any of these tests could be appropriate.

44

Page 45: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

45

Concrete Example

45

Reinforced Standard

Page 46: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

46

Statistical Assumptions Independent observations is normally distributed for each population Equal variances for each population

46

y

C o m p a r in g Tw o P o p u la t io n s

A BTr e a tm e n t

1

2

µ1

µ2

Page 47: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

47

The Test StatisticUse this t-test to test whether the means of two independent groups are different:

47

ty ysy y

y y( )

( )1 2

1 2

1 2

where

)2y1y( t is the test statistic.

iy is the mean for the sample from population i (i=1, 2).

)2y1y( s is the pooled standard error.

Page 48: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

48

Example of a Two-Sided HypothesisSuppose you are interested in determining whether two group means are different from one another. The null and alternative hypotheses are the following:

H0: the group means are identical (1 = 2)

H1: the group means are different (1 2)

48

Page 49: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

49

This demonstration illustrates the concepts discussed previously.

Comparing Two Means Using a t-Test

Page 50: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

50

Setup for the PollExamine the output of the tests of equal variances.

50

Page 51: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

51

2.08 PollAt α =.05, is there sufficient evidence to reject equal variances?

Hint: recall that H0: σ12 = σ2

2 and H1: σ12 ≠ σ2

2

Yes

No

51

Page 52: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

52

2.08 Poll – Correct AnswerAt α =.05, is there sufficient evidence to reject equal variances?

Hint: recall that H0: σ12 = σ2

2 and H1: σ12 ≠ σ2

2

Yes

No

52

Page 53: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

53

Page 54: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

54

This exercise reinforces the concepts discussed previously.

Exercise

Page 55: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

55

Setup for the PollExamine the output from the exercise to determine which p-value would be appropriate if someone were to test whether the risks at public hospitals were lower than private hospitals.

55

Page 56: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

56

2.09 Multiple Choice PollWhich p-value would be appropriate if someone were to test if the risks at public hospitals were lower than private hospitals?

a. 0.4411b. 0.2206c. 0.7794

56

Page 57: 1 1 Chapter 2: Comparing Means 2.1 One-Sample t -Test 2.2 Paired t -Test 2.3 Two-Sample t -Test

57

2.09 Multiple Choice Poll – Correct AnswerWhich p-value would be appropriate if someone were to test if the risks at public hospitals were lower than private hospitals?

a. 0.4411b. 0.2206c. 0.7794

57