Download as pdf or txt
Download as pdf or txt
You are on page 1of 61

ONE– WAY AND

TWO – WAY
CLASSIFICATION
ANALYSIS OF
VARIANCE (ANOVA)
Adam Julian L. Che
Ph.D. Math Ed. Student
WHAT IS ANOVA?
• AnoVa stands for analysis of
variance.
• Statistical Analysis of at least two
population means can be performed
by conducting an ANOVA.
• This method partitions the total
variance of the variables of interest
into several components of sources.
UNDERSTANDING ANOVA IN EXCEL

The ANOVA function in Excel is the analytical


tool used for variance analysis. A form of hypothesis
testing, it will determine whether two or more factors
have the same mean. Currently, it has three different
variations depending on the test you want to perform:
Single factor, two-factor with replication and two factor
without replication.
ANOVA: Single Factor
A single factor or one-way ANOVA is used to
test the null hypothesis that the means of
several populations are all equal.
ANOVA: Two Factor without Replication

Use this option when variance


depends on two factors and you
are collecting a single data point
for a specified condition
ANOVA: Two Factor with Replication
Use this option when you have
two factors on which the variance
depends and you are collecting
multiple data points for a
specified condition
PROCEDURES FOR ONE-WAY ANOVA
PROCEDURES:
1. Ho: μ1= μ2=…= μp , That the p population means
are equal
Ha: μi ≠ μk , At least two means are not equal.

2. Test-Statistic: Use F-Test at α level of


significance.
PROCEDURES:
3. Decision Criterion:
Reject Ho if Fc  F [( p1),( n p )]
4. Computations:
Notations:
yij = the ith observation in the jth group
y i. =total of the observations in the ith group
y.. = the grand total
y.. = the grand mean
RUNNING THE ANOVA FUNCTION IN EXCEL
To start with the ANOVA function, open the workbook
containing the data you want to run the test on. Then, follow these
steps:
1. Click in a cell on your spreadsheet where your output will begin. The
results, of course, will cover a range of cells.
2. Click on the Data tab from the main ribbon and select data analysis,
which should be in the analysis menu on the right.
3. Select the appropriate ANOVA test from the options in the Data
Analysis menu.
RUNNING THE ANOVA FUNCTION IN EXCEL

4. The function’s menu will pop up. Start by putting in


the range containing the data to be analyzed. If you click
the button to the right of the text box (containing a red
arrow) you can select your cell range by clicking and
dragging.
5. Select the number of rows each sample contains.
6. Specify the alpha (the default 0.05 represents a 95%
confidence interval.
RUNNING THE ANOVA FUNCTION IN EXCEL

7. Specify the output range. Again, you can click


the button to the right of the text box to click and
drag. All you really need to consider here is where
the first cell of the results will be located. You do
not need to indicate the exact number of rows and
columns for the result. Note that the output will be
contained in a range of 7 columns by 30 rows.
The ANOVA Table
Source of Degrees of Sum of Mean Computed
Variation Freedom Squares Square F or F-
(SV) (DF) (SS) (MS) Ratio
Between Groups p–1 BSS MSB Fc
Within Groups n–p WSS MSW
Total n-1 TSS

ns= not significant * = significant at α level


PROCEDURES
5. State your decision based on the
decision criterion and computed F.

6. State your conclusion based on


your decision.
ILLUSTRATIVE EXAMPLE FOR
THE ONE-WAY ANOVA
PROBLEM
Three sections of the same
Tertiary Mathematics Subjects
are taught by three different
teachers. The final grades
were recorded as follows:
Final Grades
Students
Adonis Bong Carlito
Is there
A 73 88 68
B 89 78 79 significant
C 82 48 56 difference in the
D 43 91 91
E 80 51 71 average grades
F 73 85 71 given by the three
G 66 74 87
H 60 77 41 teachers? Use
I 45 31 59 0.01 level of
J 93 73 68
K 36 62 53 significance.
L 77 76 79
M 96 15
N 80
O 56
SOLUTION:

1. Ho: μA= μB= μC , That the average grades given by


the three teachers do not differ significantly
Ha: μi ≠ μk , At least two of the average grades given
by the three teachers differ significantly.
SOLUTION:

2. Test-Statistic: Use F-Test at 1% level of significance.

3. Decision Criterion:

Fc  F0.01[(31),( 403)]  5.18


a. Reject Ho if:
Final Grades
Students TOTAL
SOLUTION: Adonis Bong Carlito
A 73 88 68
B 89 78 79
4. Computation: C
D
82
43
48
91
56
91
E 80 51 71
F 73 85 71
G 66 74 87
H 60 77 41
I 45 31 59
J 93 73 68
K 36 62 53
L 77 76 79
M 96 15
N 80
O 56
n 12 15 13 40
Y 817 1071 838 2726
Y
2
59407 81061 58994 199462
Y 68.08 71.40 64.46 68.15
RUNNING THE ANOVA FUNCTION IN EXCEL
To start with the ANOVA function, open the workbook
containing the data you want to run the test on. Then, follow these
steps:
1. Click in a cell on your spreadsheet where your output will begin. The
results, of course, will cover a range of cells.
2. Click on the Data tab from the main ribbon and select data analysis,
which should be in the analysis menu on the right.
3. Select the appropriate ANOVA test from the options in the Data
Analysis menu.
RUNNING THE ANOVA FUNCTION IN EXCEL

4. The function’s menu will pop up. Start by putting in


the range containing the data to be analyzed. If you click
the button to the right of the text box (containing a red
arrow) you can select your cell range by clicking and
dragging.
5. Select the number of rows each sample contains.
6. Specify the alpha (the default 0.05 represents a 95%
confidence interval.
RUNNING THE ANOVA FUNCTION IN EXCEL

7. Specify the output range. Again, you can click


the button to the right of the text box to click and
drag. All you really need to consider here is where
the first cell of the results will be located. You do
not need to indicate the exact number of rows and
columns for the result. Note that the output will be
contained in a range of 7 columns by 30 rows.
The ANOVA Table
Source of Degrees of Sum of Mean Computed
Variation Freedom Squares Square F or F-
(SV) (DF) (SS) (MS) Ratio
Between Groups p–1 BSS MSB Fc
Within Groups n–p WSS MSW
Total n-1 TSS

ns= not significant * = significant at α level


The ANOVA Table
Source of Degrees of Sum of Mean Computed
Variation Freedom Squares Square F or F-
(SV) (DF) (SS) (MS) Ratio
Between Groups 2 335.3526 167.6763 0.46ns
Within Groups 37 13349.7474 360.8040
Total 39 13685.1000

ns= not significant * = significant at α level


SOLUTION:
5. Decision:
a. Since
Fc  0.4647  F0.01[ 2,37 ]  5.18, we fail to reject Ho .
6. Conclusion:
The average grades given by the three teachers do not differ
significantly.
Problem
Roger is a pilot and he does extensive bad weather
flying. He decides to buy a battery-powered radio as an

Set # 7/
independent back-up for his regular radios which
depend on the airplane’s electrical system. He has a

Output #4–
choice of three brands of rechargeable batteries that
vary in cost. He randomly selects four batteries for
“One-Way each brand, tests them for operating time (in hours)
Classification ANOVA” before recharging is necessary. He obtains the sample
data in the following table.

BRAND OPERATING TIME (In Hours) Do the three brands have


the same mean usable
A 20.7 21.9 20.9 22.2
time before recharging is
B 21.0 25.6 24.7 24.5 required at level of
C 26.5 26.7 25.0 24.6 significance 𝜶 = 0.01?
HYPOTHESIS TESTING
PROCEDURES FOR 2-WAY ANOVA
WITHOUT REPLICATION
PROCEDURES:
1. Ho’: α1=α2=…=αr , That the row means are equal
Ha’: At least two of the αi’s differ significantly
Ho’’: β1=β2=…=βc , That the column means are equal
Ha’’: At least two of the βj’s differ significantly

2. Test-Statistic: Use F-Test at α level of


significance.
PROCEDURES:

3. Decision Criterion:
a. Reject Ho if Fc( row ) ³ Fa [(r-1),(r-1)(c-1)]
b. Reject Ho if Fc(column) ³ Fa [(c-1),( r-1)(c-1)]
4. COMPUTATION IN EXCEL
To start with the ANOVA function, open the workbook
containing the data you want to run the test on. Then, follow these
steps:
1. Click in a cell on your spreadsheet where your output will begin. The
results, of course, will cover a range of cells.
2. Click on the Data tab from the main ribbon and select data analysis,
which should be in the analysis menu on the right.
3. Select the appropriate ANOVA test from the options in the Data
Analysis menu.
RUNNING THE ANOVA FUNCTION IN EXCEL

4. The function’s menu will pop up. Start by putting in


the range containing the data to be analyzed. If you click
the button to the right of the text box (containing a red
arrow) you can select your cell range by clicking and
dragging.
5. Select the number of rows each sample contains.
6. Specify the alpha (the default 0.05 represents a 95%
confidence interval.
RUNNING THE ANOVA FUNCTION IN EXCEL

7. Specify the output range. Again, you can click


the button to the right of the text box to click and
drag. All you really need to consider here is where
the first cell of the results will be located. You do
not need to indicate the exact number of rows and
columns for the result. Note that the output will be
contained in a range of 7 columns by 30 rows.
The ANOVA Table
Source of Degrees of Sum of Mean Computed
Variation Freedom Squares Square F
Row r–1 SSRow MSRow Fc(row)
Column c–1 SSColumn MSColumn Fc(column)
Error (r – 1)(c – 1) SSError MSError

Total rc - 1 SSTotal

ns= not significant * = significant at 5% level


PROCEDURES
5. State your decision based on the decision
criterion and computed F.

6. State your conclusion based on your


decision.
ILLUSTRATIVE EXAMPLE FOR
THE TWO-WAY ANOVA
PROBLEM
A study is made to determine
the force required to pull apart
pieces of glued plastic. Three
types of plastics were tested
using four different levels of
humidity. The results, in
kilogram, are given as follows:
Plastic Humidity
Type 30% 50% 70% 90%
A 38.2 32.5 34.2 33.0
B 30.9 27.8 28.4 30.5
C 27.3 30.4 27.3 31.6

Use a 0.05 level of significance to test the hypothesis


that there is no difference in the mean force required to
pull the glued plastic apart:
a. When different types of plastic are used;
b. For different humidity conditions.
SOLUTION:
1. Ho’: αA=αB=αC, that there is no difference in the mean
forced required to pull the glued plastic apart when
different types of plastic are used.
Ha’: At least two of the plastic types differ significantly
in terms of the mean force required to pull the
glued plastic apart.
SOLUTION:

1. Ho’’: β30%=β50%=β70%=β90%, that there is no significant


difference in the mean force required to pull the
glued plastic apart among humidity conditions.

Ha’’: At least two of the humidity conditions differ


significantly in terms of the mean force required to
pull the glued plastic apart.
SOLUTION:

2. Test –Statistic: Use F-Test at α=0.05 level of


significance
3. Decision Criterion:
a. Reject Ho if: F
c( plastic )
³ F0.05[(3-1),(3-1)(4-1)] = 5.14
b. Reject Ho if: Fc(humidity ) ³ F0.05[(4-1),(3-1)(4-1)] = 4.76
4. COMPUTATION USING EXCEL:

Plastic Humidity
Total Mean
Type 30% 50% 70% 90%
A 38.2 32.5 34.2 33.0 137.9 34.48
B 30.9 27.8 28.4 30.5 117.6 29.40
C 27.3 30.4 27.3 31.6 116.6 29.15
Total 96.4 90.7 89.9 95.1 372.1
Mean 32.13 30.23 29.97 31.7 31.01
RUNNING THE ANOVA FUNCTION IN EXCEL
To start with the ANOVA function, open the workbook
containing the data you want to run the test on. Then, follow these
steps:
1. Click in a cell on your spreadsheet where your output will begin. The
results, of course, will cover a range of cells.
2. Click on the Data tab from the main ribbon and select data analysis,
which should be in the analysis menu on the right.
3. Select the appropriate ANOVA test from the options in the Data
Analysis menu.
RUNNING THE ANOVA FUNCTION IN EXCEL

4. The function’s menu will pop up. Start by putting in


the range containing the data to be analyzed. If you click
the button to the right of the text box (containing a red
arrow) you can select your cell range by clicking and
dragging.
5. Select the number of rows each sample contains.
6. Specify the alpha (the default 0.05 represents a 95%
confidence interval.
RUNNING THE ANOVA FUNCTION IN EXCEL

7. Specify the output range. Again, you can click


the button to the right of the text box to click and
drag. All you really need to consider here is where
the first cell of the results will be located. You do
not need to indicate the exact number of rows and
columns for the result. Note that the output will be
contained in a range of 7 columns by 30 rows.
The ANOVA Table
Source of Degrees of Sum of Mean Computed
Variation Freedom Squares Square F
Plastic Type 2 72.2317 36.1159 6.95*
Humidity 3 10.2892 3.4297 0.66ns
Error 6 31.1683 5.1947

Total 11 113.6892

ns= not significant * = significant at 5% level


SOLUTION:

5. Decision
a. Since Fc(plastic ) = 6.95 ³ F0.05[(3-1),(3-1)(4-1)] = 5.14 , reject Ho’.

b. Since Fc(humidity ) = 0.66 < F0.05[(4-1),(3-1)(4-1)] = 4.76 , we fail to


reject Ho’’
SOLUTION:

6. Conclusion:
a. At least two of the plastic types differ significantly at 5% level in
terms of the mean force required to pull glued plastic apart.
b. The mean force required to pull the glued plastic apart do not
differ significantly at 5% level of significance among humidity
conditions.
Problem
The following data represents the final grades obtained
by five students in Mathematics, English, ESP, and

Set # 8 /
Science:
SUBJECTS

Output #5–
STUDENTS Math English ESP Science
1 80 78 85 79

“Two-Way 2 86 90 93 91

Classification 3 75 78 83 79
4 78 80 84 76
ANOVA w/o 5 83 87 85 87
Replication”
Use 0.05 level of significance to test the ff. hypotheses:
a. Students have equal ability;
b. Subjects are of equal difficulty.
HYPOTHESIS TESTING
PROCEDURES FOR 2-WAY ANOVA
WITH REPLICATION
PROCEDURES:
1. Ho’’’: There is no interaction between the two factors
Ha’’’: There is interaction between the two factors
Ho’: α1=α2=…=αr , That the row means are equal
Ha’: At least two of the αi’s differ significantly
Ho’’: β1=β2=…=βc , That the column means are equal
Ha’’: At least two of the βj’s differ significantly

2. Test-Statistic: Use F-Test at α level of


significance.
PROCEDURES:

3. Decision Criterion:
a. Reject Ho’ if 𝐹𝑐(𝑖𝑛𝑡𝑒𝑟𝑎𝑐𝑡𝑖𝑜𝑛) ≥ 𝐹𝛼[ 𝑟−1 ,(𝑟−1)(𝑐−1]
b. Reject Ho’ if Fc ( row ) ³ Fa [( r -1),( r -1)(c-1)]
c. Reject Ho’’ if Fc (column ) ³ Fa [(c-1),( r -1)(c-1)]
4. COMPUTATION IN EXCEL
To start with the ANOVA function, open the workbook
containing the data you want to run the test on. Then, follow these
steps:
1. Click in a cell on your spreadsheet where your output will begin. The
results, of course, will cover a range of cells.
2. Click on the Data tab from the main ribbon and select data analysis,
which should be in the analysis menu on the right.
3. Select the appropriate ANOVA test from the options in the Data
Analysis menu.
RUNNING THE ANOVA FUNCTION IN EXCEL

4. The function’s menu will pop up. Start by putting in


the range containing the data to be analyzed. If you click
the button to the right of the text box (containing a red
arrow) you can select your cell range by clicking and
dragging.
5. Select the number of rows each sample contains.
6. Specify the alpha (the default 0.05 represents a 95%
confidence interval.
RUNNING THE ANOVA FUNCTION IN EXCEL

7. Specify the output range. Again, you can click


the button to the right of the text box to click and
drag. All you really need to consider here is where
the first cell of the results will be located. You do
not need to indicate the exact number of rows and
columns for the result. Note that the output will be
contained in a range of 7 columns by 30 rows.
PROCEDURES
5. State your decision based on the decision
criterion and computed F.

6. State your conclusion based on your


decision.
SAMPLE PROBLEM:
SOLUTION:
Problem
Marathon Times. Listed below are New York Marathon
running times (in seconds) for randomly selected
runners who completed the marathon. Are the running
Set #9 times affected by an interaction between gender and
age bracket? Are running times affected by gender?
Output Are running times affected by age bracket?

#6– “Two-
Way
Classification
ANOVA with
Replication”
REFERENCES

• Statistics Made Easy by Dr. Consuelo A. Tagaro


and Engr. Alipio T. Tagaro
• Statistics for Managers by Levine, et. al
• Slides by Dr. Joel E. Genzon
Thank you for
listening!


You might also like