65
1 Chapter 3: Analysis of Variance 3.1 One-Way ANOVA with Two Groups 3.2 One-Way ANOVA with More than Two Groups 3.3 Fitting an N-Way ANOVA Model 3.4 Contrasts in N-Way ANOVA (Self- Study) 3.5 Power and Sample Size

Chapter 3: Analysis of Variance

  • Upload
    yehuda

  • View
    68

  • Download
    3

Embed Size (px)

DESCRIPTION

5. Chapter 3: Analysis of Variance. 5. Chapter 3: Analysis of Variance. Objectives. Understand the use of sums of squares for comparing group means. Use JMP to perform a one-way ANOVA. Compare the one-way ANOVA with two groups to the two sample t -test. Sums of Squares. - PowerPoint PPT Presentation

Citation preview

Page 1: Chapter 3: Analysis of Variance

11

Chapter 3: Analysis of Variance

3.1 One-Way ANOVA with Two Groups

3.2 One-Way ANOVA with More than Two Groups

3.3 Fitting an N-Way ANOVA Model

3.4 Contrasts in N-Way ANOVA (Self-Study)

3.5 Power and Sample Size

Page 2: Chapter 3: Analysis of Variance

22

Chapter 3: Analysis of Variance

3.1 One-Way ANOVA with Two Groups3.1 One-Way ANOVA with Two Groups

3.2 One-Way ANOVA with More than Two Groups

3.3 Fitting an N-Way ANOVA Model

3.4 Contrasts in N-Way ANOVA (Self-Study)

3.5 Power and Sample Size

Page 3: Chapter 3: Analysis of Variance

3

Objectives Understand the use of sums of squares for comparing

group means. Use JMP to perform a one-way ANOVA. Compare the one-way ANOVA with two groups to the

two sample t-test.

3

Page 4: Chapter 3: Analysis of Variance

4

Sums of Squares

4

Page 5: Chapter 3: Analysis of Variance

5

Total Sum of Squares

5

SST = (3-6)2 + (4-6)2 + (5-6)2 + (7-6)2 + (8-6)2 + (9-6)2 = 28

(3-6)2

(7-6)2

Page 6: Chapter 3: Analysis of Variance

6

Error Sum of Squares

6

SSE = (3-4)2 + (4-4)2 + (5-4)2 + (7-8)2 + (8-8)2 + (9-8)2 = 4

(5-4)2

8B

4A

(7-8)2

Page 7: Chapter 3: Analysis of Variance

7

Model Sum of Squares

7

SSM = 3*(4-6)2 + 3*(8-6)2 = 24

8B

4A

3*(8-6)2

3*(4-6)2

Page 8: Chapter 3: Analysis of Variance

8

ANOVA Table

8

Source Degrees

OfFreedom

Sum ofSquares

MeanSquare

F Ratio

Model

Error

Total

1k

kn kn

ESS

1n

1

SSM

k

2

1

( )k

j jj

n y y

k

j 1

2

1

)( jij

n

i

yyj

E

M

MS

MS

2

1

( )n

ii

y y

Page 9: Chapter 3: Analysis of Variance

9

The Reference Distribution

9

E

M

MS

MSF

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

Compute

Page 10: Chapter 3: Analysis of Variance

10

3.01 Multiple Answer PollThe model sum of squares (SSM) describes which of the following?

a. The variability between the groupsb. The variability within the groupsc. The variability explained by the grouping variable

10

Page 11: Chapter 3: Analysis of Variance

11

3.01 Multiple Answer Poll – Correct AnswersThe model sum of squares (SSM) describes which of the following?

a. The variability between the groupsb. The variability within the groupsc. The variability explained by the grouping variable

11

Page 12: Chapter 3: Analysis of Variance

12

The One-Way ANOVA Model and Standard Assumptions

= + +

12

Yik = µ + τi + εik

The errors are normally distributed with a mean of zero. The variance is the same for all groups. The errors occur independently of one another.

Strength ofConcrete

Base Level Type ofAdditive

UnexplainedVariation

Page 13: Chapter 3: Analysis of Variance

13

Concrete Example

13

Reinforced Standard

Page 14: Chapter 3: Analysis of Variance

14

This demonstration illustrates the concepts discussed previously.

Comparing Two Means Using a One-Way ANOVA

Page 15: Chapter 3: Analysis of Variance

15

Page 16: Chapter 3: Analysis of Variance

16

3.02 QuizMatch the significance test output on the right to the correct null hypothesis on the left.

16

1. H0: σ21 = σ2

2

2. H0: μ1 = μ2

3. H0: data from normal distribution

A.

B.

C.

Page 17: Chapter 3: Analysis of Variance

17

3.02 Quiz – Correct AnswerMatch the significance test output on the right to the correct null hypothesis on the left.

17

1-A, 2-C, 3-B

1. H0: σ21 = σ2

2

2. H0: μ1 = μ2

3. H0: data from normal distribution

A.

B.

C.

Page 18: Chapter 3: Analysis of Variance

18

3.03 QuizWhich of the following statements are true at α=0.05?

18

1. There is not sufficient evidence to reject equal variances.

2. There is not sufficient evidence to reject equal means.

3. There is not sufficient evidence to reject normality.

Page 19: Chapter 3: Analysis of Variance

19

3.03 Quiz – Correct AnswerWhich of the following statements are true at α=0.05?

19

1. There is not sufficient evidence to reject equal variances.

2. There is not sufficient evidence to reject equal means.

3. There is not sufficient evidence to reject normality.

(2 is false because the p-value is .0011, so there is sufficient evidence to reject H0: µ1 = µ2 at α = 0.05)

Page 20: Chapter 3: Analysis of Variance

2020

Chapter 3: Analysis of Variance

3.1 One-Way ANOVA with Two Groups

3.2 One-Way ANOVA with More than Two Groups3.2 One-Way ANOVA with More than Two Groups

3.3 Fitting an N-Way ANOVA Model

3.4 Contrasts in N-Way ANOVA (Self-Study)

3.5 Power and Sample Size

Page 21: Chapter 3: Analysis of Variance

21

Objectives Fit a one-way ANOVA with more than two groups. Use multiple comparisons procedures to determine

which means are significantly different.

21

Page 22: Chapter 3: Analysis of Variance

22

Insulation ExampleDo additives differ in their effectiveness at enhancing the properties of an insulator?

22

Page 23: Chapter 3: Analysis of Variance

23

The One-Way ANOVA Hypothesis

23

H0: All means equal

80

60

40

20

0

H1: At least onemean different

80

60

40

20

0

H0: μ1 = μ2 = μ3 H1: not (μ1 = μ2 = μ3)

Page 24: Chapter 3: Analysis of Variance

24

This demonstration illustrates the concepts discussed previously.

Fitting a One-Way ANOVA Model with More than Two Groups

Page 25: Chapter 3: Analysis of Variance

25

Multiple Comparisons Methods

25

ControlComparisonwise

Error Rate

ControlExperimentwise

Error Rate

Compare Each PairPairwise t-Tests

Compare All PairsTukey-Kramer

Compare with ControlDunnett's Test

Page 26: Chapter 3: Analysis of Variance

26

Experimentwise Error Rates

Comparisonwise error rate = 0.05

EER 1-(1-)nc where nc = number of comparisons

26

Page 27: Chapter 3: Analysis of Variance

27

Properties of Multiple Comparisons Methods

27

Procedure Comparisons Adjustment Conservative

t-test k(k-1)/2 None Least

Tukey-Kramer

k(k-1)/2 Largest Most

Dunnett’s (k-1) Smallest Less

Page 28: Chapter 3: Analysis of Variance

28

This demonstration illustrates the concepts discussed previously.

Generating Multiple Comparisons

Page 29: Chapter 3: Analysis of Variance

29

Page 30: Chapter 3: Analysis of Variance

30

3.04 Multiple Choice PollA statistically conservative method tends to do which of the following?

a. Find more significant differences than might otherwise be found

b. Vary in its findings, depending on the observed datac. Find fewer significant differences than might otherwise

be found

30

Page 31: Chapter 3: Analysis of Variance

31

3.04 Multiple Choice Poll – Correct AnswerA statistically conservative method tends to do which of the following?

a. Find more significant differences than might otherwise be found

b. Vary in its findings, depending on the observed datac. Find fewer significant differences than might otherwise

be found

31

Page 32: Chapter 3: Analysis of Variance

32

This exercise reinforces the concepts discussed previously.

Exercise

Page 33: Chapter 3: Analysis of Variance

3333

Chapter 3: Analysis of Variance

3.1 One-Way ANOVA with Two Groups

3.2 One-Way ANOVA with More than Two Groups

3.3 Fitting an N-Way ANOVA Model3.3 Fitting an N-Way ANOVA Model

3.4 Contrasts in N-Way ANOVA (Self-Study)

3.5 Power and Sample Size

Page 34: Chapter 3: Analysis of Variance

34

Objectives Fit an N-way ANOVA model. Understand interactions in ANOVA. Use JMP to fit a model with interactions. Compare response groups.

34

Page 35: Chapter 3: Analysis of Variance

35

N-Way ANOVA

35

Page 36: Chapter 3: Analysis of Variance

36

Neutralization ExampleDo different diluents and buffers affect the final pH of media?

Is there an interaction between these predictors?

36

Page 37: Chapter 3: Analysis of Variance

37

Interactions

37

Page 38: Chapter 3: Analysis of Variance

38

Interactions When the interactions are not significant, you can

usually delete the interactions and analyze just the main effects.

When the interactions are significant, you should not delete them or their corresponding main effects from the model. Try to understand the interactions by examining the interaction plots.

38

Page 39: Chapter 3: Analysis of Variance

39

The N-Way ANOVA Model and Standard Assumptions

39

Yijk = µ + αi + τj + (ατ)ij + εijk

The errors are normally distributed with a mean of zero. The variance is the same for all groups. The errors occur independently of one another.

pHBaseLevel

Buffer ResidualDiluent Interaction= + + + +

Page 40: Chapter 3: Analysis of Variance

40

Residuals The residuals represent the random variation

in the statistical model. You expect them to do the following:

– display no particular pattern (unbiased)– be normally distributed– exhibit constant variance (independent

of response)– be independent (no correlation)

40

Page 41: Chapter 3: Analysis of Variance

41

N-Way ANOVA Hypothesis

41

Page 42: Chapter 3: Analysis of Variance

42

This demonstration illustrates the concepts discussed previously.

ANOVA with TwoCategorical Predictors

Page 43: Chapter 3: Analysis of Variance

43

Page 44: Chapter 3: Analysis of Variance

44

This exercise reinforces the concepts discussed previously.

Exercise

Page 45: Chapter 3: Analysis of Variance

4545

Chapter 3: Analysis of Variance

3.1 One-Way ANOVA with Two Groups

3.2 One-Way ANOVA with More than Two Groups

3.3 Fitting an N-Way ANOVA Model

3.4 Contrasts in N-Way ANOVA (Self-Study)3.4 Contrasts in N-Way ANOVA (Self-Study)

3.5 Power and Sample Size

Page 46: Chapter 3: Analysis of Variance

46

Objectives Understand the use of contrasts. Use JMP to construct contrasts in N-way ANOVA.

46

Page 47: Chapter 3: Analysis of Variance

47

Simple Contrasts

47

1

Page 48: Chapter 3: Analysis of Variance

48

Other Contrasts

48

1

Page 49: Chapter 3: Analysis of Variance

49

This demonstration illustrates the concepts discussed previously.

Examining a Contrast

Page 50: Chapter 3: Analysis of Variance

50

Page 51: Chapter 3: Analysis of Variance

51

3.05 QuizWhat does the following contrast test?

51

Page 52: Chapter 3: Analysis of Variance

52

3.05 Quiz – Correct AnswerWhat does the following contrast test?

52

The contrast tests if the average of diluent A across the first 3 levels of buffer is the same as the average of diluent B across the first 3 levels of buffer. H0: 1/3(μA/1 + μA/2 + μA/3) - 1/3(μB/1 + μB/2 + μB/3) = 0

Page 53: Chapter 3: Analysis of Variance

53

3.06 QuizRecall that the following contrast tests:

H0: ½ (μA/1 + μA/2) = ½ (μB/1 + μB/2)

H1: ½ (μA/1 + μA/2) ≠ ½ (μB/1 + μB/2)

What can you conclude from the p-value of the contrast?

53

Page 54: Chapter 3: Analysis of Variance

54

3.06 Quiz – Correct AnswerRecall that the following contrast tests:

H0: ½ (μA/1 + μA/2) = ½ (μB/1 + μB/2)

H1: ½ (μA/1 + μA/2) ≠ ½ (μB/1 + μB/2)

What can you conclude from the p-value of the contrast?

54

There is sufficient evidence to reject the null hypothesis and say that a difference does exist between the average of diluent A across buffers 1 and 2 and the average of diluent B across buffers 1 and 2.

Page 55: Chapter 3: Analysis of Variance

5555

Chapter 3: Analysis of Variance

3.1 One-Way ANOVA with Two Groups

3.2 One-Way ANOVA with More than Two Groups

3.3 Fitting an N-Way ANOVA Model

3.4 Contrasts in N-Way ANOVA (Self-Study)

3.5 Power and Sample Size3.5 Power and Sample Size

Page 56: Chapter 3: Analysis of Variance

56

Objectives Understand the relationship between power,

significance level, effect size, variability, and sample size.

Use JMP software’s Power and Sample Size platform to determine the required sample size for an experiment.

56

Page 57: Chapter 3: Analysis of Variance

57

Types of Errors and PowerYou perform a hypothesis test and make a decision, but was the decision correct?

The probability of a Type I error is denoted by .

57

Page 58: Chapter 3: Analysis of Variance

58

Types of Errors and PowerYou perform a hypothesis test and make a decision, but was the decision correct?

The probability of a Type II error is denoted by .

The power of the statistical test is 1 - .

58

Page 59: Chapter 3: Analysis of Variance

59

How Many Observations?

59

Level of Significance

(Alpha)

Effect Size(Difference to

detect)

Power

Variability(Std Dev)Required

Sample Size

Page 60: Chapter 3: Analysis of Variance

60

3.07 Multiple Answer PollPower is defined to be which of the following?

a. The measure of the ability of the statistical hypothesis test to reject the null hypothesis when it is actually false

b. The probability of not committing a Type II errorc. The probability of failing to reject the null hypothesis

when it is actually false

60

Page 61: Chapter 3: Analysis of Variance

61

3.07 Multiple Answer Poll – Correct AnswersPower is defined to be which of the following?

a. The measure of the ability of the statistical hypothesis test to reject the null hypothesis when it is actually false

b. The probability of not committing a Type II errorc. The probability of failing to reject the null hypothesis

when it is actually false

61

Page 62: Chapter 3: Analysis of Variance

62

This demonstration illustrates the concepts discussed previously.

Power and Sample Size for Experiments

Page 63: Chapter 3: Analysis of Variance

63

Page 64: Chapter 3: Analysis of Variance

64

3.08 QuizAn experimenter decides an effect size of 6 mm is no longer sufficient and instead he wants to be able to detect an effect size of 4 mm. If his sample size, alpha (significance level), and variability remain the same as before, will the power of the test increase or decrease? Why?

64

Page 65: Chapter 3: Analysis of Variance

65

3.08 Quiz – Correct AnswerAn experimenter decides an effect size of 6 mm is no longer sufficient and instead he wants to be able to detect an effect size of 4 mm. If his sample size, alpha (significance level), and variability remain the same as before, will the power of the test increase or decrease? Why?

The power of the test will decrease. The experimenter wants to be able to detect a smaller effect size. That is, he wants the significance test to detect a smaller difference, and this is harder to do. Smaller differences are harder to detect, so the power of the test decreases (holding other terms the same).

65