21
Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Embed Size (px)

Citation preview

Page 1: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning

Chapter 14

ANOVA

Page 2: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.2

Analysis of Variance Allows us to compare ≥2 populations of

interval data. ANOVA is:.

a procedure which determines whether differences exist between population means.

a procedure which analyzes sample variance.

Referred to as treatments

Not necessarily equal

Page 3: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.3

One Way ANOVANew Terminology: Population classification criterion is called a factor Each population is a factor level

Example 14.1 (Stock Ownership) (1)

The analyst was interested in determining whether the ownership of stocks varied by age. (Xm14-01)

The age categories are: Young (Under 35) Early middle-age (35 to 49) Late middle-age (50 to 65) Senior (Over 65)

Page 4: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.4

Question: Does the stock ownership between the four age groups differs?

n=366; % of financial assets invested in equity Factor: Age Category “One Way” ANOVA since only 1 factor 4 factor levels: (1)Young; (2)Early middle

age; (3)Late middle age; & (4)Senior Hypothesis:

H0:µ1 = µ2 = µ3 = µ4

i.e. there are no differences between population means

H1: at least two means differ

Example 14.1 (Stock Ownership) (2)

Page 5: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning

Example 14.1 (Stock Ownership) (3) Rule….F-stat macam chapter 13 (ada

paham?) Rejection Region….

F > F ,k–1, n–k

F-stat

Page 6: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.6

SST gave us the between-treatments variation

SSE (Sum of Squares for Error) measures the within-treatments variation

Sample Statistics & Grand Mean

Example 14.1 (Stock Ownership) (4)

18.50x

84.51x

14.51x

47.52x

40.44x

4

3

2

1

Page 7: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.7

Hence, the between-treatments variation SST, is

Sample variances:

Then SSE: 161,871

24

23

22

21 )xx(58)xx(93)xx(131)xx(84SST

4.3741

)18.5084.51(58

)18.5014.51(93)18.5047.52(131)18.5040.44(842

222

Example 14.1 (Stock Ownership) (5)

79.444s,82.461s,44.469s,55.386s 24

23

22

21

)79.444)(158()82.471)(193()44.469)(1131()55.386)(184(

244

233

222

211 s)1n(s)1n(s)1n(s)1n(SSE

Page 8: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.8

12.247,1

3

4.741,3

1k

SSTMST

16.447

362

3.612,161

kn

SSEMSE

79.2

16.447

12.247,1

MSE

MSTF

Example 14.1 (Stock Ownership) (6)

F >F ,(k–1),(n–k) = F5%, (4 –1), (366–4) = 2.61

H0:µ1 = µ2 = µ3 = µ4 H1: at least two means differ

2.79 > 2.61 thus reject H0

B-12

Page 9: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.9

Using Excel: Click Data, Data Analysis, Anova: Single Factor

Example 14.1 (Stock Ownership) (7)

12345678910111213141516

A B C D E F GAnova: Single Factor

SUMMARYGroups Count Sum Average Variance

Young 84 3729.5 44.40 386.55Early Middle Age 131 6873.9 52.47 469.44Late Middle Age 93 4755.9 51.14 471.82Senior 58 3006.6 51.84 444.79

ANOVASource of Variation SS df MS F P-value F crit

Between Groups 3741.4 3 1247.12 2.79 0.0405 2.6296Within Groups 161871.0 362 447.16

Total 165612.3 365

Page 10: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.10

p-value = 0.0405 < 0.05 Reject the null hypothesis (H0:µ1 = µ2 = µ3 =

µ4) in favor of the alternative hypothesis (H1: at least two population means differ).

Conclusion: there is enough evidence to infer that the mean percentages of assets invested in the stock market differ between the four age categories.

Example 14.1 (Stock Ownership) (8)

Page 11: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.11

Multiple ComparisonsIf the conclusion is “at least two treatment means differ”

i.e. reject the H0:

We often need to know which treatment means are responsible for these differences3 statistical inference procedures highlights it: Fisher’s least significant difference (LSD)

method Tukey’s multiple comparison method

Page 12: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.12

Fisher’s Least Significant Difference

A better estimator of the pooled variances = MSE

Substitute MSE in place of sp2

Compares the difference between means to the Least Significant Difference LSD, given by:

LSD will be the same for all pairs of means if all k sample sizes are equal.

If some sample sizes differ, LSD must be calculated for each combination.

Differ if absolute value of difference between means >

LSD

Page 13: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.13

Example 14.2 (Car bumper Quality) (1)

North American automobile manufacturers have become more concerned with quality because of foreign competition. One aspect of quality is the cost of repairing damage caused by accidents. A manufacturer is considering several new types of bumpers. To test how well they react to low-speed collisions, 10 bumpers of each of 4 different types were installed on mid-size cars, which were then driven into a wall at 5 miles per hour.

Page 14: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.14

The cost of repairing the damage in each case was assessed. Xm14-02

Questions… Is there sufficient evidence to infer that the

bumpers differ in their reactions to low-speed collisions?

If differences exist, which bumpers differ?

Objective: to compare 4 populations Data: interval Samples: independent Statistical method: One-way ANOVA.

Example 14.2 (Car bumper Quality) (2)

Page 15: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.15

F = 4.06, p-value = 0.0139 If 5% SL, then….Reject Ho

There is enough evidence to infer that a difference exists between the 4 bumpers

The question now is…….which bumpers differ?

111213141516

A B C D E F GANOVASource of Variation SS df MS F P-value F crit

Between Groups 150,884 3 50,295 4.06 0.0139 2.8663Within Groups 446,368 36 12,399

Total 597,252 39

Example 14.2 (Car bumper Quality) (3)

Page 16: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.16

The sample means are….

2.348

8.483

9.485

0.380

4

3

2

1

x

x

x

x

We calculate the absolute value of the differences between means and compare them.

6.135|6.135||2.3488.483||xx|

7.137|7.137||2.3489.485||xx|

1.2|1.2||8.4839.485||xx|

8.31|8.31||2.3480.380||xx|

8.103|8.103||8.4830.380||xx|

9.105|9.105||9.4850.380||xx|

43

42

32

41

31

21

Example 14.2 (Car bumper Quality) (4)

Page 17: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.17

Click Add-Ins > Data Analysis Plus > Multiple Comparisons

Example 14.2 (Car bumper Quality) (5)

Page 18: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.18

Hence, µ1 and µ2, µ1 and µ3, µ2 and µ4, and µ3 and µ4 differ.

The other two pairs µ1 and µ4, and µ2 and µ3 do not differ.

123456789

10

A B C D EMultiple Comparisons

LSD OmegaTreatment Treatment Difference Alpha = 0.05 Alpha = 0.05Bumper 1 Bumper 2 -105.9 100.99 133.45

Bumper 3 -103.8 100.99 133.45Bumper 4 31.8 100.99 133.45

Bumper 2 Bumper 3 2.1 100.99 133.45Bumper 4 137.7 100.99 133.45

Bumper 3 Bumper 4 135.6 100.99 133.45

Example 14.2 (Car bumper Quality) (6)

Page 19: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.19

Tukey’s Multiple Comparison Method

As before, we are looking for a critical number to compare the differences of the sample means against. In this case:

Note: is a lower case Omega, not a “w”

Critical value of the Studentized rangewith n–k degrees of freedomTable 7 - Appendix B harmonic mean of the sample sizes

Different if the pair means diff >

Page 20: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.20

Example 14.2

k = 4N1 = n2 = n3 = n4 = ng = 10

Ν = 40 – 4 = 36MSE = 12,399

Thus,

79.3)40,4(q)37,4(q 05.05.

45.133

10

399,12)79.3(

n

MSE),k(q

g

Page 21: Copyright © 2009 Cengage Learning Chapter 14 ANOVA

Copyright © 2009 Cengage Learning 14.21

Example 14.1  (Tukey’s Method)

Using Tukey’s method µ2 and µ4, and µ3 and µ4 differ.

12345678910

A B C D EMultiple Comparisons

LSD OmegaTreatment Treatment Difference Alpha = 0.05 Alpha = 0.05Bumper 1 Bumper 2 -105.9 100.99 133.45

Bumper 3 -103.8 100.99 133.45Bumper 4 31.8 100.99 133.45

Bumper 2 Bumper 3 2.1 100.99 133.45Bumper 4 137.7 100.99 133.45

Bumper 3 Bumper 4 135.6 100.99 133.45