ANALYSIS OF ANALYSIS OF VARIANCE VARIANCE (ANOVA) (ANOVA) BCT 2053 CHAPTER 5
Feb 11, 2016
ANALYSIS OF ANALYSIS OF VARIANCEVARIANCE(ANOVA)(ANOVA)BCT 2053CHAPTER 5
CONTENT
5.1 Introduction to ANOVA
5.2 One-Way ANOVA
5.3 Two-Way ANOVA
5.1 Introduction to ANOVA
OBJECTIVESAfter completing this chapter you should be able to:
1. Explain the purpose of ANOVA 2. Identify the assumptions that underlie the ANOVA technique 3. Describe the ANOVA hypothesis testing procedure
What is ANALYSIS OF VARIANCE (ANOVA)
the approach that allows us to use sample data to see if the values of three or more unknown population means are likely to be different
Also known as factorial experiments
this name is derived from the fact that in order to test for statistical significance between means, we are actually comparing (i.e., analyzing) variances. (so F-distribution will be used)
Example of problems Example of problems involving ANOVAinvolving ANOVA
A manager want to evaluate the performance of three (or more) employees to see if any performance different from others.
A marketing executive want to see if there’s a difference in sales productivity in the 5 company region.
A teacher wants to see if there’s a difference in student’s performance if he use 3 or more approach to teach.
The Procedural Steps for an ANOVA Test
1. State the Null and Alternative hypothesis2. Select the level of significance, α3. Determine the test distribution to use - Ftest
4. Compute the test statistic 5. Define rejection or critical region – Ftest > Fcritical
6. State the decision rule7. Make the statistical decision - conclusion
5.2 One-Way ANOVA
OBJECTIVEAfter completing this chapter you should be able to:
1. Use the one-way ANOVA technique to determine if there is a significance difference among three or more means
One-Way ANOVA Design Only one classification factor (variable) is
considered
Factor
Treatment12
i
(The level of the factor)
Response/ outcome/ dependent variable
(samples)
Replicates (1,… j) The object to a
given treatment
The resulting input grid of factorial experiment
where, i = 1, 2, … a is the number of levels being tested.j = 1, 2, … ni is the number of replicates at each level.
AssumptionsAssumptions
To use the one-way ANOVA test, the following assumptions must be true
The population under study have normal distribution.
The samples are drawn randomly, and each sample is independent of the other samples.
All the populations from which the samples values are obtained, have the same unknown population variances, that is for k number of populations,
2 2 21 2 k
The Null and Alternative hypothesis
1 2:o kH (All population means are equal)
1 : fori jH i j (Not all population means are equal)
2 2 21 2 1 2 and k k
If Ho is true we have k number of normal populations with
2 2 21 2 3 1 2 3 but if 3k
If H1 is true we may have k number of normal populations with
Or H1: At least one mean is different from others
Source of
Variation
Degrees of
Freedom (Df)
Sum of Squares (SS) Mean of Squares (MS) F Value
Between sample(Factor
Variation) k - 1
Within samples
(Error variation)
T - k
Total T - 1
The format of a general one-way ANOVA table
2 2..
1 1
1k n
iji j
SST x xN
2/ ( )
( )1
Treatment Factor MS TrSS Tr
k
2/
2
test
Treatment Factor
Error
F
2Error
SSEMSEN k
( )SSE SST SS Tr
2 2. ..
1
1 1( )k
ii
SS Tr x xn N
Reject Ho if , 1,test k T kF F T = k n
Example 1 The data shows the Math’s test score for 4 groups of
student with 3 different methods of study. Test the hypothesis that there is 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
Example 2 An experiment was performed to determine whether the annealing
temperature of ductile iron affects its tensile strength. Five specimens were annealed at each of four temperatures. The tensile strength (in ksi) was measured for each temperature. The results are presented in the following table. Can you conclude that there are differences among the mean strengths at α = 0.01?
Temperature(oC)
Sample Values
750 19.72 20.88 19.63 18.68 17.89
800 16.01 20.04 18.10 20.28 20.53
850 16.66 17.38 14.49 18.21 15.58
900 16.93 14.49 16.15 15.53 13.25
Example 3 Three random samples of times (in minutes) that commuters are
stuck in traffic are shown below. At α = 0.05, is there a difference in the mean times among the three cities?
Eastern Third Middle Third Western Third
48 95 29
57 52 40
24 64 68
10 64
38
Solve one-way ANOVA by EXCEL Excel – key in data (Example 1)
Solve one-way ANOVA by EXCEL
Tools – Add Ins – Analysis Toolpak – Data Analysis – ANOVA single factor – enter the data range – set a value for α - ok
Reject H0 if P-value ≤ α or F > F crit P-value < 0.05 so Reject H0
4.2 Two-Way ANOVA
OBJECTIVEAfter completing this chapter you should be able to:
1. Use the two-way ANOVA technique to determine if there is an effect of interaction between two factors experiment
Two-Way ANOVA Design Two classification factor is considered
Factor Bj = 1 2 b
Factor Ai = 1 k = 1,…n
2
a
Example A researcher whishes to test the effects of two different types of
plant food and two different types of soil on the growth of certain plant.
Some types of two way ANOVA design
B1 B2
B1 B2 B3 B1 B2 B3
B1 B2
A1
A2
A1
A2
A3
A1
A2
A3
A1
A2
A3
A4
AssumptionsAssumptions The standard two-way ANOVA tests are valid under the following
conditions:
The design must be complete • Observations are taken on every possible treatment
The design must be balanced• The number of replicates is the same for each treatment
The number of replicates per treatment, k must be at least 2
Within any treatment, the observations are a simple random sample from a normal population
The sample observations are independent of each other (the samples are not matched or paired in any way)
The population variance is the same for all treatments.
1, ,ij ijkx x
Null & Alternative Hypothesis
H0: there is no interaction effect between factor A and factor B.H1: there is an interaction effect between factor A and factor B.
H0: there is no difference in means of factor A.H1: there is a difference in means of factor A.
H0: there is no difference in means of factor B.H1: there is a difference in means of factor B.
interaction effect
Column effect
Row effect
H0: there is no effect from factor A.H1: there is effect from factor A.
H0: there is no effect from factor B.H1: there is effect from factor B.
or
or
Source (Df) Sum of Squares (SS) Mean of Squares (MS)
F Value
A(row effect)
a - 1
B(Column effect)
b - 1
Interaction(interaction
effect)(a-1)(b-1)
Error ab(n-1)
Total abn-1
The format of a general two-way ANOVA table
22 ....
1 1
1
a b
iji j
xSSAB xn abn
SSA SSB
22 .... .
1
1 b
jj
xSSB x
an abn
22 ...
1 1 1
a b n
ijki j k
xSST xabn
1 1SSABMSAB
a b
testMSAFMSE
1SSEMSE
ab n
SSE SST SSA
SSB SSAB
22 .....
1
1 a
ii
xSSA xbn abn
1
SSAMSAa
1SSBMSBb
test
MSBFMSE
testMSABFMSE
Reject if
, 1, 1
test
a ab n
FF
,( 1)( 1), 1
test
a b ab n
FF
, 1, 1
test
b ab n
FF
Procedure for Two-Way ANOVASTART
Test for an interaction between the two
factors
Is there an effect due to interaction between the
two factors?
Stop. Don’t consider the effects of either factor
without considering the effects of the other
Test for effect from column factor
Test for effect from row factor
Yes
(Reject Ho)
No (Accept Ho)
Ho: No interaction
between two factors
Ho: No effects from the column factor B (the column means are equal)
Ho: No effects from the row factor A (the row means are equal)
testMSAFMSE
testMSBFMSE
testMSABFMSE
Example 1 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. 2 runs of the process were made for each combination of 3 reagents and 4 catalysts.
CatalystReagent
1 2 3
A 86.8 82.4 93.4 85.2 77.9 89.6 B 71.9 72.1 74.5 87.1 87.5 82.7 C 65.5 72.4 66.7 77.1 72.7 77.8D 63.9 70.4 73.7 81.6 79.8 75.7
a) Construct an ANOVA table.b) Test is there an interaction effect between reagents and catalyst. Use α = 0.05.c) Do we need to test whether there is an effect that is due to reagents or
catalyst? Why? If Yes, test is there an effect from reagents or catalyst.
Example 2 A study was done to determine the effects of two factors on the lather
ability of soap. The two factors were type of water and glycerol. The outcome measured was the amount of foam produced in mL. The experiment was repeated 3 times for each combination of factors. The result are presented in the following table..
Water type Glycerol Foam (mL)De-ionized Absent 168 178 168
De-ionized Present 160 197 200
Tap Absent 152 142 142
Tap Present 139 160 160
Construct an ANOVA table and test is there an interaction effect between factors. Use α = 0.05.
Solve two-way ANOVA by EXCEL Excel – key in data
Solve two-way ANOVA by EXCEL
tools – Data Analysis – ANOVA two factor with replication – enter the data range – set a value for α - ok
Reject H0 if P-value ≤ α or F > F crit
Summary
The other name for ANOVA is experimental design.
ANOVA help researchers to design an experiment properly and analyzed the data it produces in correctly way.
Thank You