Science 7 - LAND and SEA BREEZE and its Characteristics
Ch 14 Part 3 additional section Two-Way ANOVA with.pptx
1. 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.
2. 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.
3. 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.
4. 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.
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
Column
Headings
Row
Headings
5. Hypothesis Test
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 RH1 and RH2
H1: There is a difference in means with respect to RH1 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 CH1 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
A few differences in the 5 step process compared to the two-way ANOVA:
6. Step 1: State the hypotheses.
H0: There is no difference in means of the monthly
sales with respect to the two age groups.
H1: There is a difference in means of the monthly
sales with respect to the two age groups.
Difference in the means between ROW Headings
Age of
Salesperson 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
7. Step 1: State the hypotheses.
H0: There is nodifference in means of the monthly
sales with respect to the type of product.
H1: There is a difference in means of the monthly
sales with respect to the type of product.
Difference in the means between COLUMN Headings
Age of
Salesperson 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
8. Step 1: State the hypotheses.
H0: There is nointeraction effect between the age
groups and the products sold on the monthly sales
H1: There is an interaction effect between the age
groups and the products sold on the monthly sales
Interaction between ROW Headings and COLUMN Headings
Age of
Salesperson 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
9. 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.
10. 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
11. Highlight the data (including labels) and select
Data Analysis on the top ribbon of your Excel
sheet
12. Input the entire table
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
Rows per sample
--Count the samples
for each. In this
case there are 5
5
13. 5
Check OUTPUT RANGE then select which cell to display the results.
THEN CLICK “OK”
14. 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
Average 21.2 68.6 18.8 36.2
Variance 54.7 93.8 30.7 614.6
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
The results will look like this
But we will need just the
Bottom portion
15. 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
(Rows)
Step 2: critical
value(s) (for
each)
Step 3: Test values
(for each)
Step 4: Decisions
(for each)
Recall that this is a right-tailed
test.
Rows (Sample)
(Two age groups)
Columns
(Products)
Interaction
(Two age groups/ Products)
16. H0: There is no difference between the means of the monthly sales with repect
to the two age groups.
H1: There is a between the means of the monthly sales with respect to the two
age groups.
H0: There is no difference between the means of the monthly sales for the
different products.
H1: There is a difference between the means of the monthly sales for the
different products
H0: There is no interaction effect on the monthly sales between the ages of the
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.
To summarize our results,
Simply rewrite your hypotheses according to your decisions.
Not
Rejected
H0
Rejected
H0
Rejected
H0
17. 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.
18. 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.
19. Example: Gasoline Consumption
Step 1: State the hypotheses.
The hypotheses for the gasoline types are:
The hypotheses for the interaction are:
The hypotheses for the types of automobile driven are:
Step 0: Assumptions
20. 1. Input the table information into Excel and request the Two-Way ANOVA with Replication.
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 Wheel Drive Four Wheel Drive
Regular 26.7 28.6
25.2 29.3
High-
Octane 32.3 26.1
32.8 24.2
21. 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 2: critical
value(s) (for each)
Step 3: Test values
(for each)
Step 4: Decisions
(for each)
Recall that an F-test is a right-tailed
test.
Rows (Sample)
(Gas Type)
Columns
(Automobile Type)
Interaction
(Gas Type/Automobile
type)
22. Step 5: Summarize the results.
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.
23. Important note about formatting the data for Excel:
For the above data set – your data values must be separated into their own rows:
Excel will not understand the commas between the numbers.
for 𝜶 =0.01
Editor's Notes
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 2: Find the critical value for each.
Since α = 0.05, d.f.N. = 1, and d.f.D. = 4 for each of the factors, the critical values are the same, obtained from Table H as
Step 3: Find the test values.
Since the computation is quite lengthy, we will use the summary table information obtained using statistics software such as Minitab.