Professional Documents
Culture Documents
BKU2032
One-Way ANOVA
Two-Way ANOVA
1
4.1: Introduction
The approach that allow us to use sample data to see if the values of
three or more unknown population means are likely to be different.
Examples:
i) Will three different levels of a chemical concentration have
different effect on an electroplating process? ( H 0 : the mean
plating thickness is the same for all three concentration levels )
one-way ANOVA
3
4.3
One-way ANOVA
1 factor (variable) is
considered.
LEARNING OBJECTIVE:
Use the one-way ANOVA
technique to determine if there
is a significant difference among
three or more means.
4
4.3.1: Data
Factor Total
where
yij : the jth observation from the ith treatment
: the overall mean
i : the ith treatment effect
ij : the random error
k : number of populations (treatments)
ni : sample size from population i 6
4.3.3: Assumptions of Data
To use the one-way ANOVA test, the following assumptions
must be true
All the populations from which the samples values are obtained,
have the same unknown population variances, that is for k number
of populations,
12 22 k2
7
4.3.4: Partitioning of Variation
The total variation can be partioned into 2 components:
ij ..
( y y
i 1 j 1
) 2
n i. .. ij i.
( y y )
i 1
2
( y y ) 2
i 1 j 1
where
ni
k
Y 2 k
Yi.2 Y..2
SST yij 2 .. SSTrt
i 1 j 1 N i 1 ni N
SSE = SST - SSTrt
8
Total Variation (SST)
9
4.3.5: Hypothesis of One-Way ANOVA
H 0 : 1 2 3 k
All population means are equal
i.e., no treatment effect (no variation in means among groups)
μ1 μ2 μ3
o
r
μ1 μ2 μ3 μ1 μ2 μ3 11
4.3.6: ANOVA Table
Source Degrees Sum of Squares (SS) Mean of Squares (MS)
of
fCalculated
of
Freedom
Variation
(Df)
SS (Tr ) ftest
k
Yi.2 Y..2
Treatment k-1 SSTrt MSTrt
i 1 ni N k 1
MSTrt
MSE
Error SSE
N-k SSE SST SSTrt MSE
N k
ni
k
Y..2
SST y 2
ij
Total N- 1 i 1 j 1 N
b) Perform the analysis of variance and test the hypothesis at 0.05 level of
significance that the mean data provided by the chemical reaction is
the same for all four temperatures. Discuss the results.
13
Example 4.2
Four catalysts that may affect the concentration of one component in a
three-component liquid mixture are being investigated. The following
concentrations are obtained.
Catalysts
1 2 3 4
58.2 56.3 50.1 52.9
57.2 54.5 54.2 49.9
58.4 57.0 55.4 50.0
55.8 55.3 51.7
54.9
a) Write down the model, assumption and restriction for the data above.
b) Is there any difference of the effect of catalysts on the concentration of
one component in a three-component liquid mixture? Test at 1%
significance level. 14
4.3.7(i): One-Way ANOVA using EXCEL
The data shows the Math’s test score for 4 groups of student with 3
different methods of study. Test the hypothesis that there’s no
difference between the Math’s score for 4 groups of student at
significance level 0.05
Score
Individually &
Group study 80 70 85 89
Group study 60 55 58 62
Individually 65 60 62 58
15
4.3.7(ii): One-Way ANOVA using EXCEL
Excel – key in data
16
4.3.7(iii): One-Way ANOVA using EXCEL
Tools – Add Ins – Analysis Toolpak – Data Analysis – ANOVA
single factor – enter the data range – set a value for α - ok
LEARNING OBJECTIVE:
Use the two-way ANOVA
technique to determine if
there is an effect of
interaction between two
factors experiment.
18
4.4.1: Data a x b design
Factor Total
B
1 2 … b
1 yijk … Y1…
A 2 … Y2…
… …
a … Ya..
Total Y.1. Y.2. … Y.b. Y…
a :Number of levels of factor A b: Number of levels of factor B
where
yijk : the kth observation from the (ij)th cell
Yi .. : the total of all observations from the ith level of factor A
Y. j . : the total of all observations from the jth level of factor B
Y... : the total of all observations
19
4.4.2: Model of Two-Way ANOVA
Model: yijk i j ij ijk
a b a
Restriction:
i 1
i 0 j 0
i 1
ij
0
j 1
ij
0
j 1
where
yijk : the kth observation from the (ij)th cell
: the overall mean
i : the effect of the ith level of factor A
j : the effect of the jth level of factor B
ij : the interaction effect of the ith level of factor A and the jth level of factor B
ijk : the random error 20
4.4.3: Assumptions of Data
To use the two-way ANOVA test, the following assumptions
must be true:
The design must be complete
Observations are taken on every possible treatment
All the populations from which the samples values are obtained,
have the same unknown population variances.
21
4.4.4: Partitioning of Variation
Degrees of
SST = SSA + SSB + SS(AB) + SSE Freedom:
SSA a–1
Variation due to factor A
22
4.4.5: Hypothesis of Two-Way ANOVA
Row Effect
H 0 A : There is no difference in means of factor A
H1A : There is a difference in means of factor A
Column Effect
Interaction Effect
H 0 AB : There is no interaction effect between factor A and factor B
H1AB : There is an interaction effect between factor A and factor B
23
4.4.6: Two-Way ANOVA Table
Source (DoF) Sum of Squares (SS) Mean of Squares (MS) ftest Reject H 0 if
MS AB ftest
1 a b 2 Y...2
AB SS AB Yij . SS AB
(interaction (a-1)(b-1) r i 1 j 1 abr MS AB ftest
effect) SSA SSB a 1 b 1 MSE f ,( a 1)(b1),ab r 1
N k
a b r
Y...2
Total abr-1 SST y 2
ijk
i 1 j 1 k 1 abr
24
Procedure for Two-Way ANOVA
START
No (Accept Ho)
Ho: No effects from the row Test for effect from MSA
factor A (the row means are row factor Ftest
equal) MSE
Design A B C D A B C D
1 58 35 72 61 49 24 60 64
Region
2 40 18 54 38 38 22 64 50
3 63 44 81 52 59 16 60 48
4 36 9 47 30 29 13 52 41
Test at the 0.01 level of significance whether the differences among the designs and
for regions are significant and for the significance of the interaction between
compressor designs and regions. 26
Solution:
A B C D Total
27
Example 4.4
A chemical engineer is studying the effects of various reagents and catalyst on
the yield of a certain process. Yield is expressed as a percentage of a theoretical
maximum. 4 runs of the process were made for each combination of 3 reagents
and 4 catalysts. Construct an ANOVA table and test is there an interaction
effect between reagents and catalyst. Use α = 0.05
Reagent
Catalyst
1 2 3
A 86.8 82.4 93.4 85.2 77.9 89.6
86.7 83.5 94.8 83.1 89.9 83.7
B 71.9 72.1 74.5 87.1 87.5 82.7
80.0 77.4 71.9 84.1 78.3 90.1
C 65.5 72.4 66.7 77.1 72.7 77.8
76.6 66.7 76.7 86.1 83.5 78.8
D 63.9 70.4 73.7 81.6 79.8 75.7
77.2 81.2 84.2 84.9 80.5 72.9
28
4.4.7(i): Solve Two-Way ANOVA using EXCEL
Excel – key in data
29
4.4.7(ii):Solve Two-Way ANOVA using EXCEL
tools – Data Analysis – ANOVA two factor with
replication – enter the data range – set a value for α - ok
3. For each type of data set, the writing must have the following
characteristics:
i) description/explaination of data
ii)the data must satisfy the assumptions for ANOVA.
- show that the data follows normal distribution
iii)analysis the data manually and using excel
iv)interpret the result of the analysis
31