Analysis of Variance

 

Analysis of Variance allows us to compare two or more populations of quantitative data (such as the mean).  It allows us to determine whether differences exist among population means by analyzing the sample variance. 

 

Example:

A supermarket owner wants to determine whether or not the sales of a new product are affected by the aisle in which the product is stored.  If there are 10 aisles in the store, the experiment would consist of locating the product in a different aisle each of 10 weeks and recording the daily sales.  The owner would conduct an analysis of variance, which tests to determine if differences exist among mean daily sales.  The parameters are m1, m2, …, m10.  In this experiment, we are able to classify the population using only one factor, which is the aisle on which the new product is placed. This factor has 10 levels, which is the specific aisle on which the product is placed.  If we could placed the new product on one of three shelves in each aisle, then we would have a second factor (shelves) with 3 levels.

 

Single-Factor (One-Way) Analysis of Variance: Independent Samples

 

In this section, we will cover the procedure to apply when the samples are independently drawn.

 

Example: Single-Factor

The marketing manager of an apple juice manufacturer has to decide how to market a new liquid concentrate apple juice.  She can create advertising that emphasizes convenience, quality or price.  In order to facilitate a decision, she conducts an experiment.  She launches the product in three different small cities.  In City 1 she launches the product with advertising stressing convenience.  In City 2, she launches the product with advertising stressing quality.  In City 3, she launches the product with advertising stressing price.  The number of packages sold weekly is recorded for 20 weeks (stored in file XM15-01).  The marketing manager wants to know if differences in sales exit among the three cities. 

 

Weekly Sales in the 3 Cities:

City 1 (Convenience)

City 2 (Quality)

City 3 (Price)

529

804

672

658

630

531

793

774

443

514

717

596

 

The first step is to establish H0 and HA:

 

H0 : m1 = m2 = m3

HA : At least two means differ

 

 

Test Statistic:

Independent Samples from k Populations (Treatments)

 

1

2

k

x11

x12

x1k

x21

x22

x2k

 

 

 

 

 

 

xn11

xn22

xnkk

n1

n2

nk

 

xij = ith observation of the jth sample

nj = number of observations in the sample taken from the jth population

 

 = mean of the jth sample

 

 = grand mean of all the observations

 

where n = n1 + n2 = … + nk and k is the number of populations.  Notice that we allow the sample sizes to be different. 

 

The variable x is called the response variable and its values are called responses.

 

The unit that we measure is called an experimental unit. 

 

In our example, the response variable is weekly sales and the experimental units are the weeks in the 3 cities when we record sales figures.  The sales figures are the responses.

 

We have one factor, the advertising approach that defines the populations, and there are 3 levels of this factor (convenience, quality, price). 

 

Test Statistic:

The statistic that measures the proximity of the sample means to each other is called the between-treatments variation, which is also called the Sum of Squares for Treatments, SST.

 

 

If the sample means are close to each other, all of the sample means would be close to the grand mean and the SST would be small.  The SST is smallest when all the sample means are equal:

 

then SST = 0. 

 

In our example,

 

then:

 

SST = 20(577.55 - 613.07)2 + 20(653.00 - 613.07)2 + 20(608.65 - 613.07)2 = 57512.23

 

If large differences exist between the sample means, at least some sample means differ considerable from the grand mean, producing a large value of SST.  Then we reject H0. 

 

How large does SST have to be in order to reject H0?

 

To answer this question, we must know how much variation exists in the weekly sales, which is measured by the within treatments variation, which is called the Sum of Squares for Error, SSE.  SSE provides a measure of the amount of variation we can expect from the random variable we have observed.

 

 

Now look at this Table 2:

 

1

2

3

10

15

20

10

16

20

11

14

20

10

16

20

9

14

20

 

In this example, the variation within each sample is small and SST is judged to be a large number. This random variable displays very little variation.  The differences between the sample means appear to be caused by real differences between the population means. 

 

Now look at Table 3:

1

2

3

1

19

5

12

31

33

20

4

20

10

9

12

7

12

30

 


 


The value of SST in Table 15.3 is equal to Table 15.2.  However, the variation within the samples is large, which tells us that this random variable features a lot of variation.  SST is small which we would conclude that the differences between the sample means does not allow us to infer that the population means differ.

 

SSE can also be expressed as the following when we divide each component by nj - 1:

 

SSE = (n1 - 1)s12 + (n2 - 1)s22 + … + (nk - 1)sk2 =

 

Where sj2 is the sample variance of sample j. 

 

Thus the SSE is the combined or pooled variation of the k samples.

 

To use this form of the SSE, the population variances must be equal:

s12 = s22 = … = sk2   

 

In our apple juice example, the sample variances are:

 

s12 = 10774.44

s22 = 7238.61

s32 = 8669.47

 

Thus,

 

SSE = (n1 - 1)s12 + (n2 - 1)s22 + (n3 - 1)s32

SSE = 19(10774.44) + 19(7238.61) + 19(8669.47)

SSE = 506967.88

 

The next step is to calculate the Mean Squares. 

 

The Mean Square for Treatments (MST):

 

MST = SST/(k - 1)

 

The Mean Square for Error (MSE):

 

MSE = SSE/(n - k)

 

Test Statistic:

 

F = MST/MSE

 

The test statistic is F-distributed with k - 1 and n - k degrees of freedom provided that the response variable is normally distributed.  The ratio F = MST/MSE is the ratio of two sample variances.

 

MST = SST/(k - 1) = 57512.23/(3-1) = 28756.12

 

MSE = SSE/(n - k) = 506967.88/(60 - 3) = 8894.17

 

F = MST/MSE = 28756.12/8894.17 = 3.23

 

Rejection Region

 

F > Fa, k - 1, n - k

 

If we let a = .05, then the rejection region for the apple juice example is:

 

F > Fa, k - 1, n - k = F > F.05, 2, 57 ~ 3.15

 

Show Figure 15.4 - F distribution and rejection region

 

We found the value of the test statistic to be F = 3.23, which allows us to conclude that there is enough evidence to infer that the mean weekly sales differ among the three cities, and we reject H0. 

 

The results of the analysis of variance are usually reported in an ANOVA Table:

ANOVA Table for the Single-factor Analysis of Variance: Independent Samples

Source of Variation

Degrees of Freedom

Sum of Squares

Mean Squares

F-Statistic

Treatments

k-1

SST

MST = SST/(k - 1)

F = MST/MSE

Error

n-k

SSE

MSE = SSE/(n - k)

 

Total

n-1

SS(total)

 

 

 

ANOVA Table for Apple Juice example

Source of Variation

Degrees of Freedom

Sum of Squares

Mean Squares

F-Statistic

Treatments

2

57,512.23

28,756.12

3.23

Error

57

506,967.88

8,894.17

 

Total

59

SS(total)

 

 

 

Using Minitab:

1.      Type or Import the data

2.      If the data are unstacked, click Stat, ANOVA, and Oneway (Unstacked)

3.      Type the names of the treatments (Convnce, Quality, Price)

4.      Click O.K.

If the data are stacked,

5.      Click Stat, ANOVA, and Oneway

6.      Type the variable name of the response variable and variable name of the factor

7.      Click O.K.

 

Interpreting the Results

The p-value is .047 which means there is evidence to infer that mean weekly sales of the apple juice are different in at least two of the cities. 

 

SS(Total) = SST + SSE

 

SSE = measures the amount of variation within the samples

 

SST = measures the amount of variation attributed to the differences among the treatments

 

If SST explains a significant portion of the total variation, we conclude that the population means differ.

 

Can We Use t-tests of the Difference Between Two Means Instead of the Analysis of Variance?

The Analysis of variance tests to determine whether there are differences among two or more population means.  The t-test of m1 - m2 determines whether there is a difference between two population means. 

 

The question you might ask "can we use t-tests instead of the analysis of variance?"  That is, instead of testing all the means at once as with the ANOVA, why not test each pair of means?

 

In the apple juice example, we would test m1 - m2 , m1 - m3 , m2 - m3  If we found no evidence of a difference in each test, we would conclude that none of the means differ.  Alternatively, if we found evidence of at least one difference in a test, we would conclude that some of the means differ.

 

There are 2 reasons we do not use multiple t-tests:

1.      We would have to perform many more calculations. 

2.      Conducting multiple tests increases the probability of making Type I errors (probability of rejecting a true Null Hypothesis).     

 

Example:

Consider a problem where we want to compare 6 populations, all of which are identical.  If we conduct an analysis of variance and set the significance level at 5%, there is a 5% chance that we would reject the Null Hypothesis (we would conclude that differences exist when in fact they do not). 

 

To replace the F-test, we would perform 15 t-tests (a combinations problem of taking 6 things 2 at a time).  Each test would have a 5% probability of erroneously rejecting the null hypothesis.  This probability becomes 54% for all 15 tests combined (computed using a Binomial distribution with n = 15, and p = .05).  

 

Can We Use the Analysis of Variance Instead of the t-test of m1 - m2  

The Analysis of Variance is one of several techniques used to compare two or more populations.  It can be used to compare exactly 2 populations, so why do we need a technique specifically for 2 populations such as the t-test?  Suppose we plan to use the analysis of variance to test 2 population means:

 

H0: m1 = m2

HA: At least 2 means differ

 

The alternative Hypothesis specifies that m1 ¹ m2 . If we want to determine whether m1 is greater than m2 or less than m2 we cannot use the analysis of variance since it only tests for a difference.

 

Conceptually and mathematically, the F-test of the independent samples single factor analysis of variance is an extension of the t-test of m1 = m2.  In fact, if you square the test statistic for the t-test, you have the F-test.  If we simply want to determine if a difference between two means exists, we can use the analysis of variance.  The advantage is using the ANOVA is that we can partition the total sum of squares, which allows us to measure how much variation is attributed to differences among populations and how much variation is attributed to difference within populations.

 

Analysis of Variance Models

 

Single Factor and Multi-factor Models

Remember, the group of treatments or populations is called a factor.  The apple juice example was a single factor analysis of variance because it addressed the problem of comparing 2 or more populations on the basis of one factor.

 

A multi-factor model is one where there are 2 or more factors that define the treatments. 

 

Consider the advertising example.  We used the single factor model because the treatments were the 3 advertising approaches.  The factor was the advertising approach and the 3 levels were convenience, quality, and price.

 

Now, what if we conduct another study and vary the medium in which the advertising is delivered: television or newspaper.  We could then develop a 2 factor analysis of variance.  The second factor would be the advertising medium with 2 levels. 

 

Independent Sample and Blocks

When the problem objective is to compare more than 2 populations, the experimental design is called the randomized block design. 

 

The term block refers to a matched group of observations from each population. 

 

Example:

To determine whether incentive pay plans are effective, we selected 3 groups of 5 workers who assemble electronic equipment.  Each group will be offered a different incentive plan.  The treatments are the incentive plans, the response variable is the number of units produced each day, and the experimental units are the workers.

 

If we obtain data from independent samples, we may not be able to detect differences among the pay plans because of variation among the workers.  If the there are differences among the workers, we need to identify the source of the differences. 

 

Suppose that we know that more experienced workers produce more units no matter what the pay plan.  We could improve the experiment if we were to block the workers into five groups of three according to their experience.  Three workers with the most experience will represent block 1, the next three will be block 2 and so on. 

 

As a result, the workers in each block will have approximately the same amount of experience.  By designing the experiment in this way, we remove the effect of different amounts of experience on the response variable.

 

Example:

We can also perform a blocked experiment by using the same subject (person, plant, store) for each treatment.  We can determine whether sleeping pills are effective by giving 3 brands of pills to the same group of people to measure the effects.  These applications are called repeated measures design. 

 

Technically, this is a different design than the randomized block, but the single factor model is analyzed in the same way for both designs, so we will treat repeated measures designs as randomized block designs. 

 

Fixed and Random Effects Models

If our analysis includes all possible levels of a factor, the technique is called a fixed effects model of the analysis of variance.

 

If the levels included in the study represent a random sample of all the levels that exist, the technique is called a random effects model.

 

Single-Factor Analysis of Variance: Randomized Blocks

The purpose of designing a randomized block experiment is to reduce the within treatments variation to more easily detect differences among the treatment means.

 

In the independent samples single-factor analysis of variance, we partitioned the total variation into the between-treatments and the within-treatments variation:

 

SS(Total) = SST + SSE

 

In the randomized block design of the analysis of variance, we partition the total variation into 3 sources:

 

SS(Total) = SST + SSB + SSE

 

Where SSB = sum of squares for blocks = measures the variation among the blocks

 

 

Consider the following notation:

 

 = mean of the observations in the jth treatment

 

 = mean of the observations in the ith block

 

b = number of blocks

 

Notation for the Randomized Block Design of the Analysis of Variance

 

Blocked Samples from k Populations (Treatments)

Blocks

1

2

k

Block Mean

1

x11

x12

x1k

2

x21

x22

x2k

b

xb1

xb2

xbk

Treatment mean

 

 

Sum of Squares in the Randomized Block Design

 

 

The definitions of SS(Total) and SST in the randomized block design are identical to those in the independent samples design.  SSE in the independent samples design is equal to the sum of SSB and SSE in the randomized block design.

 

Mean Squares for the Randomized Block Design

 

 

Test Statistic for the Randomized Block Design

 

 

which is F-distributed with k-1 and n-k-b+1 degrees of freedom. 

 

In addition to testing the treatment means, we can also test to determine if the block means differ.  This will allow us to determine whether the experiment should have been conducted as a randomized block design. 

 

If there are no differences among the blocks, the randomized block design is less likely to detect real differences among the treatment means.  The test of the block means is the same as the treatment means except the test statistic is:

 

 

Rejection Region

 

F > Fa, k - 1, (b - 1)(k - 1)

 

ANOVA Table for the Randomized Block Design

 

Source of Variation

Degrees of Freedom

Sum of Squares

Mean Squares

F-Statistic

Treatments

k-1

SST

MST

F=MST/MSE

Blocks

b-1

SSB

MSB

F=MSB/MSE

Error

n-k-b+1

SSE

MSE

 

Total

n-1

SS(Total)

 

 

 

Example: Single-Factor Analysis of Variance: Randomized Blocks

The advertising revenues commanded by a radio station depends on the number of listeners it has.  The manager of a station that plays mostly hard rock music wants to learn more about its listeners - mostly teenagers and young adults.  In particular, he wants to know if the amount of time they spend listening to radio music varies by the day of the week.  If the manager discovers that the time per day is about the same, he will schedule the most popular music evenly throughout the week.  Otherwise, the top hits will be played mostly on the days that attract the greatest audience.  An opinion survey company is hired, and it randomly selects 200 teenagers and ask the to record the amount of time spent listening to music on the radio for each day of the previous week.  The data are stored in file XM14-02.  What can the manager conclude from these data?

 

Time Spent Listening to Radio Music (in Minutes)

Teenager

Sunday

Monday

Tuesday

Wednesday

Thursday

Friday

Saturday

1

65

40

32

48

60

75

110

2

90

85

75

90

78

120

100

3

30

30

20

25

30

60

70

200

80

90

90

80

80

120

120

 

The problem objective is to compare 7 populations.  Because the survey company recorded the listening times for each day of the week for each teenager, we identify the experimental design as randomized block.  The response variable is the amount of time listening to the radio, the treatments are the days of the week, and the blocks are the 200 teenagers. 

 

HA = At least 2 means differ

 

Test Statistic:

F = MST/MSE

 

Minitab Commands:

1.      Type or import the data.  The data must be in stacked form with column 1 containing the responses, column 2 containing codes (1-7) for the treatment levels, and column 3 containing codes for the block levels (1-200).

2.      Click Stat, ANOVA, and Twoway

3.      Specify the Responses: C1 Times, Treatment: C2 Day (row factor) and Block: C3 Teenager (Column factor)

4.      Hit Tab and type the variable names that constitute the model.  That is, the variable name of the treatments and the variable name of the blocks.  Click O.K.

 

Analysis of Variance for Times

Source

Degrees of Freedom

Sum of Squares

Mean Square

F

P

Day

6

28673.7

4779.0

11.91

0.0

Teenager

199

209834.6

1054.4

2.63

0.0

Error

1194

479125.1

401.3

 

 

Total

1399

717633.5

 

 

 

 

The value of the F-statistic to determine if differences exist among days of the week is 11.91.  Its p-value is .000.  Notice that the results indicate that differences among the teenagers also exists.  The value of that F-statistic is 2.63 with a p-value of .00. 

 

Rejection Region

 

F > Fa, k - 1, (b - 1)(k - 1)

 

If we let a = .05, then the rejection region for the radio example is:

 

F > F.05, 6, 1194 ~ 2.10 for treatments (Days)

 

F > Fa, b - 1, (b - 1)(k - 1) for blocks (teenagers)

 

F > F.05, 199, 1194~ 1.18 for blocks (teenagers)

 

Interpreting the results:

There is very strong evidence to infer that on certain days the mean listening time is greater than on other days.  An examination of the results reveals that on Fridays and Saturdays, teenagers usually spend more time listening to radio music.  The top hits should be played more frequently on those days. 

 

Criteria For Blocking

The purpose of blocking is to reduce the variation caused by differences among the experimental units.  Any characteristics that are related to the experimental units are potential blocking criteria.  If the experimental units are people, we may block according to age, gender, income, work experience, intelligence, residence, weight, or height (to name a few).  If the experimental unit is a factory and we are measuring the number of units produced hourly, blocking criteria include workforce experience, age of the plant, and quality of suppliers (to name a few).  

 

Example:

Suppose that a Dr. Underdown wants to determine which of four methods of teaching statistics is best.  In an independent sample design he might take four samples of 10 students, teach each sample by a different method, grade the students at the end of the course, and perform an f-test to determine if difference exist.  However, it is likely that there are very large differences among students within each class that may hide differences between classes.  To reduce this variation, Dr. Underdown needs to identify variables that are linked to a student's grade in statistics.  For example, overall ability of the student, completion of mathematics courses, and exposure to other statistics course are all related to performance in a statistics course. 

 

Dr. Underdown could select 4 students at random whose average grade before statistics is 95-100.  He then randomly assigns the students to one of the 4 classes.  He repeats the process with students whose average is 90-95, 85-90, …, and 50-55.  The final grades would be used to test for differences among the classes. 

 

Two Factor Analysis of Variance: Independent Samples

When examining 2 factors (generally called factorial experiments), we can examine the effects on the random variable of two or more factors. 

 

We can use the analysis of variance to determine whether the levels of each factor are different from one another. 

 

Example:

Consider the advertising example.  In addition to varying the marketing approach, the manufacturer also decided to advertise in one of the 2 media that are available: television and newspapers.  Six different small cities were selected.  In City 1, the marketing emphasized convenience, and all the advertising was conducted on television.  In City 2, the marketing emphasized convenience and all the advertising was conducted in the daily newspaper.  Quality was emphasized in Cities 3 and 4. City 3 learned about the product from television commercials and City 4 saw newspaper advertising.  Price was the marketing emphasis in Cities 5 and 6.  City 5 saw television commercials and City 6 saw newspaper advertisements.  In each city, the weekly sales for each of 10 weeks were recorded.  These data are listed in the accompanying table (column Sales, column 2 = marketing approach, and column 3 = medium).  What conclusions can be drawn from these results?

 

City 1

City 2

City 3

City 4

City 5

City 6

491

464

677

689

575

803

712

559

627

650

614

584

558

759

590

704

706

525

447

557

632

652

484

498

479

528

683

576

478

812

624

670

760

836

650

565

546

534

690

628

583

708

444

657

548

798

536

546

582

557

579

497

579

616

672

474

644

841

795

587

 

Weekly sales Of Apple Juice Concentrate

 

Factor B:

Factor A:

Factor A:

Factor A:

Advertising Medium

Convenience

Quality

Price

Television

491

677

575

712

627

614

558

590

706

447

632

484

479

683

478

624

760

650

546

690

583

444

548

536

582

579

579

672

644

795

Factor B:

Factor A:

Factor A:

Factor A:

Advertising Medium

Convenience

Quality

Price

Newspaper

464

689

803

559

650

584

759

704

525

557

652

498

528

576

812

670

836

565

534

628

708

657

798

546

557

497

616

474

841

587

 

If we assume that there are only 3 advertising approaches and only 2 advertising medium, we identify this experiment as fixed-effects.  We can proceed to solve this problem in the same way we did with Single-factor analysis of variance with independent samples.

 

HA = At least 2 means differ

 

Analysis of Variance for Sales

Source

DF

SS

MS

F

P

City

5

113620

22724

2.45

0.045

Error

54

501137

9280

 

 

Total

59

614757

 

 

 

 

Can we conclude that the differences in weekly sales among the cities are caused by the marketing approach or by the advertising medium? No, we must use a complete factorial experiment.

 

A complete factorial experiment is an experiment where the data for all possible combinations of the levels are gathered. 

 

Thus for the example above, we will use a complete 3x2 factorial experiment.  One factor will be referred to as A and the number of levels will be denoted as a. The other factor will be called B and its number of levels will be denoted as b.

 

A complete factorial experiment is also called a two-way classification experiment. 

 

The number of observations for each combination is called a replicate.  The number of replicates is denoted by r.  We will only address problems in which the number of replicates is the same for each treatment, which is called a balanced design. 

 

In our example:

a = 3

b = 2

r = 10

 

Thus we have 10 observations for each of the 6 treatments. 

 

If there are differences among the treatments means, we would like to know of both factors affect the response.  That is, are there differences among the levels of A and differences among the levels of B?

 

If only one factor affects the response, is it A or B?

 

If both A and B affects the response, do they do so independently, or do they interact (which means that some combinations of levels of factors A and B result in higher responses and some result in lower responses. 

 

Show Figures 15.10, 15.11, 15.12 and 15.13 from Keller p.615

 

To test for each possibility, we conduct several F-tests similar to the tests used in Single Factor (one-way) analysis of variance.

 

Partitioning SS(Total) in Single Factor and Two-factor Analysis of Variance

 

Single Factor Analysis

Two-Factor Analysis

SS(Total) : DF = n - 1

SST : DF = ab - 1

SS(A) : DF = a - 1

 

 

SS(B) : DF = b - 1

 

 

SS(AB) : DF = (a - 1)(b - 1)

 

SSE: DF = n - ab

SSE: DF = n - ab

 

We perform 3 F-tests to determine whether the differences among the treatment means are caused by differences among levels of A, levels of B, or interaction.  This analysis is called the Two-Factor or Two-way analysis of variance.

 

Sum of Squares in the Two-Factor Analysis of Variance

 

 

 

 

 

Where:

 = mean of the responses variables in the ith treatment (mean of the treatment when the factor A level is i and the factor B level is j)

 

 = mean of the observations when the factor A level is i

 

 = mean of the observations when the factor B level is j

 

 = mean of all the observations

 

a = number of factor A levels

 

b = number of factor B levels

 

r = number of replicates

 

Notation For Two-Factor Model

Factor A

Factor B

 

1

1

2

3

x111

x121

x1b1

x112

x122

x1b2

x11r

x12r

x1br

2

x211

x221

x2b1

x212

x222

x2b2

x21r

x22r

x2br

a

xa11

xa21

xab1

xa12

xa22

xab2

xa1r

xa2r

xabr

 

 

F-Tests Conducted In Two-Factor Analysis of Variance

Test for Differences Among the Levels of Factor A

H0: No difference among the means of the a levels of factor A

HA: At least two means differ

 

Test Statistic: F = MS(A)/MSE

 

Rejection Region: F > F a, a-1,n-ab

 

Test for Differences Among the Levels of Factor B

 

H0: No difference among the means of the b levels of factor B

HA: At least two means differ

 

Test Statistic: F = MS(B)/MSE

 

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

 

Test for Interaction Between Factors A and B

 

H0: Factors A and B do not interact to affect the mean response

HA: Factors A and B do interact to affect the mean response

 

Test Statistic: F = MS(AB)/MSE

 

Rejection Region: F > F a, (a-1)(b-1),n-ab

 

Required Conditions

  1. The distribution of the response is normally distributed
  2. The variance for each treatment is identical
  3. The samples are independent

 

ANOVA Table for the Two-Factorial Experiment with Fixed Effects and Independent Samples

Source of Variation

Degrees of Freedom

Sums of Squares

Mean Squares

F-Ratios

Factor A

a - 1

SS(A)

Factor B

b - 1

SS(B)

Interaction

(a - 1)(b - 1)

SS(AB)

Error

n - ab

SSE

 

Total

n - 1

SS(Total)

 

 

 

Example:

ANOVA for Sales

Source of Variation

Degrees of Freedom

Sums of Squares

Mean Squares

F-Ratios

Marketing

2

98839

49419

5.33

Medium

1

13172

13172

1.42

Interaction

2

1610

805

3.15

Error

54

501137

9280

.917

Total

59

614757

 

 

 

Test of Differences In Mean Weekly Sales Among Three Marketing Approaches

 

H0:  no difference among the means of the 3 levels of factor A

HA: At least two means differ

 

Test Statistic: F = MS(A)/MSE

 

F = 49,419/9,280 = 5.33

 

Rejection Region: F > F a, a-1,n-ab = F .05, 2, 54 ~ 3.15

 

5.33 > 3.15 thus reject H0

 

There is evidence at the 5% significance level to infer that differences in weekly sales exist among the different marketing levels.

 

Test of Differences In Mean Weekly Sales Between Two Advertising Media

 

H0:  no difference among the means of the 2 levels of factor B

HA: At least two means differ

 

Test Statistic: F = MS(B)/MSE

 

F = 13,172/9,280 = 1.42

 

Rejection Region: F > F a, b-1,n-ab = F .05, 1, 54 ~ 4.00

 

1.42 is not greater than 4.00, thus do not reject H0.

 

There is insufficient evidence at the 5% significance level to infer that differences in weekly sales exist between television and newspaper advertising.

 

Test for Interaction Between Factors A and B

 

H0:  Factors A and B do not interact to affect the mean response

HA: Factors A and B do interact to affect the mean response

 

Test Statistic: F = MS(AB)/MSE

 

F = 805/9,280 = .09

 

Rejection Region: F > F a, (a-1)(b-1),n-ab = F .05, 2, 54 ~ 3.15

 

.09 is not greater than 3.15, thus do not reject H0.

 

There is not enough evidence to conclude that there exists an interaction between marketing approach and advertising medium that affects mean weekly sales.

 

Mintab commands:

  1. Type or import the data.  The data must be in stacked form; column 1 contains the responses, column 2 contains the codes representing factor A, and column 3 stores the codes representing the levels of factor B.
  2. Click Stat, ANOVA, and Twoway
  3. Type the name of the response variable.
  4. Hit tab and type the name of the first factor
  5. Hit tab and type the name of the second factor. Click O.K.

 

Show Figure 15.15 in Keller, p.622

 

Example: Headaches

Recently a new treatment for headaches has been developed.  The treatment involves a series of injections of a local anesthetic to the occipital nerve (located in the back of the neck).  The current treatment procedure is to schedule the injections once a week for four weeks.  However, it has been suggested that another procedure may be better, one that features one injection every other day for a total of four injections.  Some physicians recommend other combinations of drugs that may increase the effectiveness of the injections.  To analyze the problem, an experiment was organized.  It was decided to test for a difference between the two schedules of injections and to determine whether there are differences among the four drug mixtures.  Because of the possibility of an interaction between the schedule and the drug, a complete factorial experiment was chosen.  Five headache patients were randomly selected for each combination of schedule and drug.  Forty patients were treated and each was asked to report the frequency, duration, and severity of his or her headache prior to treatment and for the 30 days following the first injection.  An index ranging from 0 to 100 was constructed for each patient, where 0 indicates no headache pain and 100 specifies the worst headache pain.  The improvement in the headache index for each patient was recorded and reproduced in the table below. (A negative value indicates a worsening condition).  We arbitrarily chose factor A to represent the drugs and factor B represents the injection schedules.

 

What conclusions can be drawn from these results?

 

Improvement in Headache Index

Schedule

Drug Mixture

1

2

3

4

One injection Every week (four weeks)

17

24

14

10

6

15

9

-1

10

10

12

0

12

16

0

3

14

14

6

-1

One Injection Every two days (four days)

18

-2

20

-2

9

0

16

7

17

17

12

10

21

2

17

6

15

6

18

7

 

How would the data look stacked?

 

Headache index

Drug mixture

Injection Schedule

17

1

1

6

1

1

10

1

1

12

1

1

14

1

1

24

2

1

15

2

1

10

2

1

16

2

1

14

2

1

14

3

1

9

3

1

12

3

1

0

3

1

6

3

1

10

4

1

-1

4

1

0

4

1

3

4

1

-1

4

1

18

1

2

9

1

2

17

1

2

21

1

2

15

1

2

-2

2

2

0

2

2

17

2

2

2

2

2

6

2

2

20

3

2

16

3

2

12

3

2

17

3

2

18

3

2

-2

4

2

7

4

2

10

4

2

6

4

2

7

4

2

 

What do we know?

Factor A = Drugs - which has 4 levels = a = 4

Factor B = Injection schedule - which has 2 levels = b = 2

 

r = 5 (number of replicates)

 

H0: Factors A and B do not interact to affect the mean headache index

HA: Factors A and B do interact to affect the mean headache index

 

Test Statistic:

F = MS(AB)/MSE

 

F = 182.9/25.1 = 7.29

 

Rejection region:

F > F a, (a-1)(b-1),n-ab = F .05, 3, 32 ~ 2.92

 

Conclusion:

Reject H0

 

Two-Way Analysis of Variance - ANOVA for Headaches

Source

Degree of Freedom

SS

MS

F

P

Drug

3

581.8

193.9

7.71

.001

Schedule

1

14.4

14.4

.57

.455

Interaction

3

548.6

182.9

7.27

.001

Error

32

804.8

25.1

 

 

Total

39

1949.6

 

 

 

 

Conducting the ANOVA for the Complete Factorial Experiment

Should we always conduct a single-factor analysis and the proceed to a two-factor analysis?  No, go straight to a two-factor analysis.

 

When conducting the 3 F-tests, do the test for interaction first.  Why?  If the test for interaction fails, then we do not have to conduct the other 2 tests.

 

Independent Samples Two-Factor Model Versus randomized Block Design

What is the difference between these two models?

The randomized block experiment, blocking is performed specifically to reduce variation, whereas in the two-factor model the effect of the factors on the response variable is of interest to us. 

 

The criteria that defines the blocks are always characteristics of the experimental units.  Thus the factors that are characteristics of the experimental units will be treated not as factors in a multifactor study but as blocks in a randomized block experiment.