Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Chapter 14: Analysis of Variance

(ANOVA)

14-3 Two-Way Analysis of Variance: Using the two-way


ANOVA technique to determine if there is a
significant difference in the main effects or
interaction.
14-3 Two-Way Analysis of Variance
• In doing a study that involves a two-way analysis
of variance, the researcher is able to test the
effects of two independent variables or factors on
one dependent variable.
• In addition, the interaction effect of the two
variables can be tested.
• The groups for a two-way ANOVA are sometimes
called treatment groups.
• A two-way ANOVA has several null hypotheses.
There is one for each independent variable and
one for the interaction.
Assumptions for Two-Way ANOVA
1. The populations from which the samples were
obtained must be normally or approximately
normally distributed.
2. The samples must be independent.
3. The variances of the populations from which the
samples were selected must be equal.
4. The groups must be equal in sample size.
A company sells three items: Swimming pools, spas, and
saunas. The owner decides to see whether the age of the
sales representative and the type of item affect monthly sales.
At α = 0.05, analyze the data shown, using a two-way ANOVA.
Sales are given in hundreds of dollars for a randomly selected
month, and five salespeople were selected for each group. Column
Headings
Pool Spa Sauna
Over 30 56 43 47
23 25 43
52 16 52
Row
28 27 61
Headings
35 32 74
30 or under 16 58 15
14 62 14
18 68 22
27 72 16
31 83 27
Hypothesis Test
A few differences in the 5 step process compared to the two-way ANOVA:

The hypotheses are longer than you are used too.


There will be 3 sets of Hypotheses:
1) Difference in means with respect to the ROW HEADINGS
H0: There is no difference in means with respect to RH 1 and RH2
H1: There is a difference in means with respect to RH 1 and RH2
2) Difference in means with respect to COLUMN HEADINGS
H0: There is no difference in means with respect to CH1 and CH2
H1: There is a difference in means with respect to CH 1 and CH2
3) Interaction between the ROW headings (RH)/COLUMN headings(CH)
H0: There is no interaction effect between RH/CH
H1: There is an interaction effect between RH/CH
Difference in the means between ROW Headings

Step 1: State the hypotheses.

Age of
Salesperson Pool Spa Sauna
H0: There is no difference in means of the monthly
Over 30 56 43 47
23 25 43
52 16 52 sales with respect to the two age groups.
28 27 61
35 32 74
30 or under 16 58 15 H1: There is a difference in means of the monthly
14 62 14 sales with respect to the two age groups.
18 68 22
27 72 16
31 83 27
Difference in the means between COLUMN Headings

Step 1: State the hypotheses.

Age of
Salesperson Pool Spa Sauna
H0: There is no difference in means of the monthly
Over 30 56 43 47
23 25 43
52 16 52 sales with respect to the type of product.
28 27 61
35 32 74
30 or under 16 58 15 H1: There is a difference in means of the monthly
14 62 14 sales with respect to the type of product.
18 68 22
27 72 16
31 83 27
Interaction between ROW Headings and COLUMN Headings

Step 1: State the hypotheses.

Age of
Salesperson Pool Spa Sauna
H0: There is no interaction effect between the age
Over 30 56 43 47
23 25 43
52 16 52 groups and the products sold on the monthly sales
28 27 61
35 32 74
30 or under 16 58 15 H1: There is an interaction effect between the age
14 62 14 groups and the products sold on the monthly sales
18 68 22
27 72 16
31 83 27
EXCEL will calculate the
Critical Value and Test Value
In order to use Excel’s statistics package, we must add it.

Follow the instructions provided.


Type the Data with
Row headings and Column headings
Pool Spa Sauna
Over 30 56 43 47
23 25 43
52 16 52
28 27 61
35 32 74
30 or under 16 58 15
14 62 14
18 68 22
27 72 16
31 83 27
Highlight the data (including labels) and select
Data Analysis on the top ribbon of your Excel
sheet
Input the entire table
5

Pool Spa Sauna


Over 30 56 43 47
23 25 43
52 16 52
28 27 61
Rows per sample 35 32 74
30 or 16 58 15
--Count the samples under
for each. In this
14 62 14
case there are 5 18 68 22
5

Check OUTPUT RANGE then select which cell to display the results.
THEN CLICK “OK”
Anova: Two-Factor With Replication

SUMMARY Pool Spa Sauna Total


Over 30
Count 5 5 5 15
Sum 194 143 277 614
Average 38.8 28.6 55.4 40.93333
Variance 212.7 98.3 153.3 263.3524

30 or under
Count 5 5 5 15
Sum 106 343 94 543
The results will look like this
Average 21.2 68.6 18.8 36.2 But we will need just the
Variance 54.7 93.8 30.7 614.6
Bottom portion
Total
Count 10 10 10
Sum 300 486 371
Average 30 48.6 37.1
Variance 204.8889 529.8222 453.8778

ANOVA
Source of Variation SS df MS F P-value F crit
Sample 168.0333 1 168.0333 1.566744 0.222743 4.259677
Columns 1762.067 2 881.0333 8.214763 0.001915 3.402826
Interaction 7955.267 2 3977.633 37.08749 4.56E-08 3.402826
Within 2574 24 107.25

Total 12459.37 29
ANOVA
Source of Variation SS df MS F P-value F crit
Sample 168.0333 1 168.0333 1.566744 0.222743 4.259677
Columns 1762.067 2 881.0333 8.214763 0.001915 3.402826
(Rows)
Interaction 7955.267 2 3977.633 37.08749 4.56E-08 3.402826
Within 2574 24 107.25

Total 12459.37 29

Step 2: critical Step 3: Test values Step 4: Decisions


value(s) (for (for each) (for each)
Recall that this is a right-tailed
each) test.

Rows (Sample)
(Two age groups)

Columns
(Products)

Interaction
(Two age groups/ Products)
To summarize our results,
Simply rewrite your hypotheses according to your decisions.
Not H0: There is no difference between the means of the monthly sales with repect
Rejected to the two age groups.
H0 H1: There is a between the means of the monthly sales with respect to the two
age groups.

Rejected H0: There is no difference between the means of the monthly sales for the
H0 different products.
H1: There is a difference between the means of the monthly sales for the
different products

Rejected H0: There is no interaction effect on the monthly sales between the ages of the
H0 salespeople and the products they sell.
H1: There is an interaction effect on the monthly sales between the ages of the
salespeople and the products they sell.
Step 5: Summarize the results.

There is no difference among the mean sales between the two age
groups.

There is a difference among the mean sales of between the different


products.

There is an interaction effect between the ages of the salespeople and


the products they sell. The combination between the age group of
the sales person and the type of product they sell does affect
monthly sales.
Example: Gasoline Consumption
A researcher wishes to see whether the type of gasoline used
and the type of automobile driven have any effect on gasoline
consumption. Two types of gasoline, regular and high-octane,
will be used, and two types of automobiles, two-wheel- and
four-wheel-drive, will be used in each group. There will be two
automobiles in each group, for a total of eight automobiles
used. Use a two-way analysis of variance at α = 0.05.
Example: Gasoline Consumption
Step 0: Assumptions

Step 1: State the hypotheses.


The hypotheses for the gasoline types are:

The hypotheses for the types of automobile driven are:

The hypotheses for the interaction are:


Example: Gasoline Consumption
1. Input the table information into Excel and request the Two-Way ANOVA with Replication.

Two Wheel Drive Four Wheel Drive


Regular 26.7 28.6
25.2 29.3
High-
Octane 32.3 26.1
32.8 24.2

2. Fill out the input boxes appropriately – double check the alpha value is correct.
3. Select Output – AND CLICK IN THE INPUT BOX first – then select an empty cell location
for the report.
Example: Gasoline Consumption
Two-Way ANOVA Summary Table:
ANOVA

Source of
Variation SS df MS F P-value F crit
Sample (Rows) 3.92 1 3.92 4.751515 0.094766 7.708647
Columns 9.68 1 9.68 11.73333 0.026648 7.708647
Interaction 54.08 1 54.08 65.55152 0.001265 7.708647
Within 3.3 4 0.825

Total 70.98 7 Step 4: Decisions


Step 2: critical Step 3: Test values (for each)
value(s) (for each) (for each) Recall that an F-test is a right-tailed
test.

Rows (Sample)
(Gas Type)

Columns
(Automobile Type)

Interaction
(Gas Type/Automobile
type)
H0: There is no difference in mean gas mileage with respect to type of gasoline
H1:There is a difference in mean gas mileage with respect to type of gasoline

H0: There is no difference in mean gas mileage with respect to type of automobile
H1:There is a difference in mean gas mileage with respect to type of automobile

H0: There is no interaction effect between type of gasoline used and type of automobile a
person drives on gasoline consumption.
H1: There is an interaction effect between type of gasoline used and type of automobile a
person drives on gasoline consumption.
Step 5: Summarize the results.
Important note about formatting the data for Excel:

for 0.01

Excel will not understand the commas between the numbers.


For the above data set – your data values must be separated into their own rows:

You might also like