analysis of variance chapter 15 - continued. 15.5 two-factor analysis of variance - example 15.3...

37
Analysis of Variance Chapter 15 - continued

Post on 21-Dec-2015

237 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Analysis of VarianceAnalysis of Variance

Chapter 15 - continued

Page 2: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

15.5 Two-Factor Analysis of Variance -

• Example 15.3– Suppose in Example 15.1, two factors are to be

examined:• The effects of the marketing strategy on sales.

– Emphasis on convenience– Emphasis on quality– Emphasis on price

• The effects of the selected media on sales.– Advertise on TV– Advertise in newspapers

Page 3: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• Solution– We may attempt to analyze combinations of levels, one

from each factor using one-way ANOVA.– The treatments will be:

• Treatment 1: Emphasize convenience and advertise in TV• Treatment 2: Emphasize convenience and advertise in

newspapers• …………………………………………………………………….• Treatment 6: Emphasize price and advertise in newspapers

Attempting one-way ANOVA

Page 4: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• Solution– The hypotheses tested are:

H0: 1= 2= 3= 4= 5= 6

H1: At least two means differ.

Attempting one-way ANOVA

Page 5: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

City1 City2 City3 City4 City5 City6Convnce Convnce Quality Quality Price Price

TV Paper TV Paper TV Paper

– In each one of six cities sales are recorded for ten weeks. – In each city a different combination of marketing emphasis and media usage is employed.

• Solution

Attempting one-way ANOVA

Page 6: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• The p-value =.0452. • We conclude that there is evidence that differences exist in the mean weekly sales among the six cities.

City1 City2 City3 City4 City5 City6Convnce Convnce Quality Quality Price Price

TV Paper TV Paper TV Paper

• Solution

Xm15-03

Attempting one-way ANOVA

Page 7: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• These result raises some questions:– Are the differences in sales caused by the different

marketing strategies?– Are the differences in sales caused by the different

media used for advertising?– Are there combinations of marketing strategy and

media that interact to affect the weekly sales?

Interesting questions – no answers

Page 8: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• The current experimental design cannot provide answers to these questions.

• A new experimental design is needed.

Two-way ANOVA (two factors)

Page 9: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Two-way ANOVA (two factors)

City 1sales

City3sales

City 5sales

City 2sales

City 4sales

City 6sales

TV

Newspapers

Convenience Quality Price

Are there differences in the mean sales caused by different marketing strategies?

Factor A: Marketing strategy

Fact

or B

: Ad

verti

sing

med

ia

Page 10: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Test whether mean sales of “Convenience”, “Quality”, and “Price” significantly differ from one another.

H0: Conv.= Quality = Price

H1: At least two means differ

Calculations are based on the sum of square for factor ASS(A)

Two-way ANOVA (two factors)

Page 11: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Two-way ANOVA (two factors)

City 1sales

City 3sales

City 5sales

City 2sales

City 4sales

City 6sales

Factor A: Marketing strategy

Fact

or B

: Ad

verti

sing

med

ia

Are there differences in the mean sales caused by different advertising media?

TV

Newspapers

Convenience Quality Price

Page 12: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Test whether mean sales of the “TV”, and “Newspapers” significantly differ from one another.

H0: TV = Newspapers

H1: The means differ

Calculations are based onthe sum of square for factor BSS(B)

Two-way ANOVA (two factors)

Page 13: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Two-way ANOVA (two factors)

City 1sales

City 5sales

City 2sales

City 4sales

City 6sales

TV

Newspapers

Convenience Quality Price

Factor A: Marketing strategy

Fact

or B

: Ad

verti

sing

med

ia

Are there differences in the mean sales caused by interaction between marketing strategy and advertising medium?

City 3sales

TV

Quality

Page 14: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Test whether mean sales of certain cells are different than the level expected.

Calculation are based on the sum of square for interaction SS(AB)

Two-way ANOVA (two factors)

Page 15: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Graphical description of the possible relationships between factors A and B.Graphical description of the possible relationships between factors A and B.

Page 16: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Levels of factor A

1 2 3

Level 1 of factor B

Level 2 of factor B

1 2 3

1 2 31 2 3

Level 1and 2 of factor B

Difference between the levels of factor ANo difference between the levels of factor B

Difference between the levels of factor A, anddifference between the levels of factor B; nointeraction

Levels of factor A

Levels of factor A Levels of factor A

No difference between the levels of factor A.Difference between the levels of factor B

Interaction

M Re e sa pn o n s e

M Re e sa pn o n s e

M Re e sa pn o n s e

M Re e sa pn o n s e

Page 17: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Sums of squares

a

1i

2i )x]A[x(rb)A(SS })()()){(2(10( 222

. xxxxxx pricequalityconv

b

1j

2j )x]B[x(ra)B(SS })()){(3)(10( 22 xxxx NewspaperTV

b

1j

2jiij

a

1i

)x]B[x]A[x]AB[x(r)AB(SS

r

kijijk

b

j

a

i

ABxxSSE1

2

11

)][(

Page 18: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

F tests for the Two-way ANOVA

• Test for the difference between the levels of the main factors A and B

F= MS(A)MSE

F= MS(B)MSE

Rejection region: F > F,a-1 ,n-ab F > F, b-1, n-ab

• Test for interaction between factors A and B

F= MS(AB)MSE

Rejection region: F > Fa-1)(b-1),n-ab

SS(A)/(a-1) SS(B)/(b-1)

SS(AB)/(a-1)(b-1)

SSE/(n-ab)

Page 19: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Required conditions:

1. The response distributions is normal2. The treatment variances are equal.3. The samples are independent.

Page 20: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• Example 15.3 – continued( Xm15-03)

F tests for the Two-way ANOVA

Convenience Quality Price

TV 491 677 575TV 712 627 614TV 558 590 706TV 447 632 484TV 479 683 478TV 624 760 650TV 546 690 583TV 444 548 536TV 582 579 579TV 672 644 795

Newspaper 464 689 803Newspaper 559 650 584Newspaper 759 704 525Newspaper 557 652 498Newspaper 528 576 812Newspaper 670 836 565Newspaper 534 628 708Newspaper 657 798 546Newspaper 557 497 616Newspaper 474 841 587

Page 21: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• Example 15.3 – continued– Test of the difference in mean sales between the three marketing

strategiesH0: conv. = quality = price

H1: At least two mean sales are different

F tests for the Two-way ANOVA

ANOVASource of Variation SS df MS F P-value F critSample 13172.0 1 13172.0 1.42 0.2387 4.02Columns 98838.6 2 49419.3 5.33 0.0077 3.17Interaction 1609.6 2 804.8 0.09 0.9171 3.17Within 501136.7 54 9280.3

Total 614757.0 59

Factor A Marketing strategies

Page 22: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• Example 15.3 – continued– Test of the difference in mean sales between the three

marketing strategiesH0: conv. = quality = price

H1: At least two mean sales are different

F = MS(Marketing strategy)/MSE = 5.33

Fcritical = F,a-1,n-ab = F.05,3-1,60-(3)(2) = 3.17; (p-value = .0077)

– At 5% significance level there is evidence to infer that differences in weekly sales exist among the marketing strategies.

F tests for the Two-way ANOVA

MS(A)MSE

Page 23: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• Example 15.3 - continued– Test of the difference in mean sales between the two

advertising mediaH0: TV. = Nespaper

H1: The two mean sales differ

F tests for the Two-way ANOVA

Factor B = Advertising media

ANOVASource of Variation SS df MS F P-value F critSample 13172.0 1 13172.0 1.42 0.2387 4.02Columns 98838.6 2 49419.3 5.33 0.0077 3.17Interaction 1609.6 2 804.8 0.09 0.9171 3.17Within 501136.7 54 9280.3

Total 614757.0 59

Page 24: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• Example 15.3 - continued– Test of the difference in mean sales between the two

advertising mediaH0: TV. = Nespaper

H1: The two mean sales differ

F = MS(Media)/MSE = 1.42 Fcritical = Fa-1,n-ab = F.05,2-1,60-(3)(2) = 4.02 (p-value = .2387)

– At 5% significance level there is insufficient evidence to infer that differences in weekly sales exist between the two advertising media.

F tests for the Two-way ANOVA

MS(B)MSE

Page 25: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• Example 15.3 - continued– Test for interaction between factors A and B

H0: TV*conv. = TV*quality =…=newsp.*price

H1: At least two means differ

F tests for the Two-way ANOVA

Interaction AB = Marketing*Media

ANOVASource of Variation SS df MS F P-value F critSample 13172.0 1 13172.0 1.42 0.2387 4.02Columns 98838.6 2 49419.3 5.33 0.0077 3.17Interaction 1609.6 2 804.8 0.09 0.9171 3.17Within 501136.7 54 9280.3

Total 614757.0 59

Page 26: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• Example 15.3 - continued– Test for interaction between factor A and B

H0: TV*conv. = TV*quality =…=newsp.*price

H1: At least two means differ

F = MS(Marketing*Media)/MSE = .09

Fcritical = Fa-1)(b-1),n-ab = F.05,(3-1)(2-1),60-(3)(2) = 3.17 (p-value= .9171)

– At 5% significance level there is insufficient evidence to infer that the two factors interact to affect the mean weekly sales.

MS(AB)MSE

F tests for the Two-way ANOVA

Page 27: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

15.7 Multiple Comparisons

• When the null hypothesis is rejected, it may be desirable to find which mean(s) is (are) different, and at what ranking order.

• Three statistical inference procedures, geared at doing this, are presented:– Fisher’s least significant difference (LSD) method– Bonferroni adjustment– Tukey’s multiple comparison method

Page 28: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• Two means are considered different if the difference between the corresponding sample means is larger than a critical number. Then, the larger sample mean is believed to be associated with a larger population mean.

• Conditions common to all the methods here:– The ANOVA model is the one way analysis of variance– The conditions required to perform the ANOVA are satisfied.– The experiment is fixed-effect

15.7 Multiple Comparisons

Page 29: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Fisher Least Significant Different (LSD) Method

• This method builds on the equal variances t-test of the difference between two means.

• The test statistic is improved by using MSE rather than sp2.

• We can conclude that i and j differ (at % significance level if |i - j| > LSD, where

kn.f.d

)n1

n1

(MSEtLSDji

2

Page 30: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Experimentwise Type I error rate (E)(the effective Type I error)

• The Fisher’s method may result in an increased probability of committing a type I error.

• The experimentwise Type I error rate is the probability of committing at least one Type I error at significance level of It iscalculated by

E = 1-(1 – )C

where C is the number of pairwise comparisons (I.e. C = k(k-1)/2

• The Bonferroni adjustment determines the required Type I error probability per pairwise comparison () , to secure a pre-determined overall E

Page 31: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• The procedure:– Compute the number of pairwise comparisons (C)

[C=k(k-1)/2], where k is the number of populations.– Set = E/C, where E is the true probability of making at

least one Type I error (called experimentwise Type I error).– We can conclude that i and j differ (at /C% significance

level if

kn.f.d

)n1

n1

(MSEtji

)C2(ji

Bonferroni Adjustment

Page 32: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

35.4465.6080.653xx

10.3165.60855.577xx

45.750.65355.577xx

32

31

21

• Example 15.1 - continued– Rank the effectiveness of the marketing strategies

(based on mean weekly sales).– Use the Fisher’s method, and the Bonferroni adjustment method

• Solution (the Fisher’s method)– The sample mean sales were 577.55, 653.0, 608.65.– Then,

71.59)20/1()20/1(8894t

)n1

n1

(MSEt

2/05.

ji

2

Fisher and Bonferroni Methods

Page 33: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• Solution (the Bonferroni adjustment)– We calculate C=k(k-1)/2 to be 3(2)/2 = 3.– We set = .05/3 = .0167, thus t.01672, 60-3 = 2.467 (Excel).

54.73)20/1()20/1(8894467.2

)n1

n1

(MSEtji

2

Again, the significant difference is between 1 and 2.

35.4465.6080.653xx

10.3165.60855.577xx

45.750.65355.577xx

32

31

21

Fisher and Bonferroni Methods

Page 34: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

• The test procedure:– Find a critical number as follows:

gnMSE

),k(q

k = the number of samples =degrees of freedom = n - kng = number of observations per sample (recall, all the sample sizes are the same) = significance levelq(k,) = a critical value obtained from the studentized range table

Tukey Multiple Comparisons

Page 35: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

If the sample sizes are not extremely different, we can use the above procedure with ng calculated as the harmonic mean ofthe sample sizes. k21 n1...n1n1

kgn

• Repeat this procedure for each pair of samples. Rank the means if possible.

• Select a pair of means. Calculate the difference between the larger and the smaller mean.

• If there is sufficient evidence to conclude that max > min .

minmax xx

minmax xx

Tukey Multiple Comparisons

Page 36: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

City 1 vs. City 2: 653 - 577.55 = 75.45City 1 vs. City 3: 608.65 - 577.55 = 31.1City 2 vs. City 3: 653 - 608.65 = 44.35

• Example 15.1 - continued We had three populations (three marketing strategies).K = 3,

Sample sizes were equal. n1 = n2 = n3 = 20,= n-k = 60-3 = 57,MSE = 8894.

minmax xx

70.7120

8894)57,3(.q

nMSE

),k(q 05g

Take q.05(3,60) from the table.

Population

Sales - City 1Sales - City 2Sales - City 3

Mean

577.55653698.65

minmax xx

Tukey Multiple Comparisons

Page 37: Analysis of Variance Chapter 15 - continued. 15.5 Two-Factor Analysis of Variance - Example 15.3 –Suppose in Example 15.1, two factors are to be examined:

Excel – Tukey and Fisher LSD method

Xm15-01

Fisher’s LDS

Bonferroni adjustments

= .05

= .05/3 = .0167

Multiple Comparisons

LSD OmegaTreatment Treatment Difference Alpha = 0.05 Alpha = 0.05Convenience Quality -75.45 59.72 71.70

Price -31.1 59.72 71.70Quality Price 44.35 59.72 71.70

Multiple Comparisons

LSD OmegaTreatment Treatment Difference Alpha = 0.0167 Alpha = 0.05Convenience Quality -75.45 73.54 71.70

Price -31.1 73.54 71.70Quality Price 44.35 73.54 71.70