Beruflich Dokumente
Kultur Dokumente
Analysis of Variance
(ANOVA)
Week 6 - Learning Objectives
Recognize situations in which to use Analysis of
Variance (ANOVA).
Understand different ANOVA designs
Perform a single-factor hypothesis test and interpret
the results
Conduct and interpret post-hoc multiple comparisons
procedures
Week 6-2
Parametric Hypothesis Testing
One sample
Week 6-3
Chapter Overview
One-Way
ANOVA
F-test
Tukey-
Kramer
test
Week 6-4
ANOVA
ANalysis Of VAriance
Not discussed in
this chapter
Week 6-6
Completely Randomized Design
Week 6-7
The Assumptions of One-Way
ANOVA Hypothesis Testing
Week 6-8
The Steps in One-Way ANOVA
Hypothesis Testing
Step 1: State the null and alternative hypothesis
Step 2: State the significance level.
Step 3: State the statement of decision rule to determine
the rejection region(s).
Step 4: Find the critical value of the test from the
statistical table.
Step 5: Determine the appropriate statistical technique
and the test statistic to use.
Step 6: Make the comparison between test statistics value
and critical value to make statistical decision.
Step 7: Making conclusion.
Week 6-9
The Steps in One-Way ANOVA
Hypothesis Testing (continue)
Week 6-10
Step 1: State the null and
alternative hypothesis
H0: m1 = m2 = m3 = … = mk
All population means are equal
There is no treatment effect (no variation in means among
groups)
Week 6-11
Step 1 (Continue)
H0: m1 = m2 = m3 = … = mk
All Population Means are NOT Different:
The Null Hypothesis is True
(No Treatment Effect)
μ1 μ2 μ3
Week 6-12
Step 1 (Continue)
H1: At least one of mi is different;
i = 1, 2, 3,…, k
At least one population mean is different:
The Null Hypothesis is NOT true
(Treatment Effect is present)
mi
or
μ1 μ2 μ3 μ1 μ2 μ3
Week 6-13
Step 2: State the significance
level
What is the significance level?
It is the criteria to be used for rejecting the null
hypothesis before the testing is implemented.
It is the probability of rejecting H0 given that H0 is
Decision Rule:
Reject H0 if F > FU, = .05
otherwise do not
reject H0 0 Do not Reject H0
reject H0
Upper critical
value Week 6-15
Step 4: Find critical value
There are two types of degree of freedom for each F
value
v1 = df 1 = k -1 (typically smaller)
v2 = df 2 = n - k (typically larger)
F , k 1, n k
Week 6-16
Step 5: Compute the test statistic
Week 6-17
Step 5 (continue)
One-Way ANOVA Table
Source of Sum of Degree of Mean F statistic
Variation Square Freedom Square
Among SSA MSA
SSA k-1 MSA = F=
Groups k-1 MSW
Within SSW
SSW n-k MSW =
Groups n-k
Test Statistic
Week 6-18
Step 5 (Continue)
Partition of Total Variation
Total Variation (SST)
Week 6-21
Step 5 (Continue)
Total Sum of
SST = SSA + SSW
Squares/ Total k nj
Variation SST ( X ij X ) 2
Where: j 1 i 1
Week 6-23
Step 5 (Continue)
Where: j 1
Week 6-24
Step 5 (Continue)
SSA n1 ( x1 x ) n2 ( x2 x ) ... nk ( xk x )
2 2 2
Response, X
X3
X2 X
X1
j 1 i 1
Where:
SSW = Sum of squares within groups
k = number of groups
nj = sample size from group j
Xj = sample mean from group j
Xij = ith observation in group j
Week 6-26
Step 5 (Continue)
Response, X
X3
X2
X1
Week 6-29
Step 6: State the decision making
Week 6-30
Step 7: Making conclusion
Week 6-31
Additional step: Find p-value
Week 6-32
Additional step: Find p-value
(Continue)
How to find the p-value?
Use
Computer Software Actual p-value
(Microsoft Excel)
Week 6-33
Additional Step: Tukey-Kramer Test
This test is more meaningful when we have sufficient evidence
to reject H0 in One-Way ANOVA hypothesis testing..
μ1= μ2 μ3 x
Week 6-34
The Steps in Tukey-Kramer
Hypothesis Testing
Step 1: State the null and alternative hypothesis
Step 2: State the significance level.
Step 3: State the statement of decision rule to determine
the rejection region(s).
Step 4: Find the critical value of the test from the
statistical table.
Step 5: Determine the appropriate statistical technique
and the test statistic to use.
Step 6: Make the comparison between test statistics value
and critical value to make statistical decision.
Step 7: Making conclusion.
Week 6-35
Additional Step: Tukey-Kramer
Test (Continue)
1. H0: mi m j
H1: mi m j ,where i j
2. Significance level:
3. Decision rule: We reject H0 when test
statistic is greater than critical value.
Week 6-36
Additional Step: Tukey-Kramer
Test (Continue)
4. Tukey-Kramer Critical Range
MSW 1 1
Critical Range Qu Q ,k ,n k
2 n i n j
where:
QU = Value from Studentized Range Distribution with k
and n - k degrees of freedom for the desired level
of (see appendix E.9 table)
MSW = Mean Square Within
ni and nj = Sample sizes from groups i and j
Week 6-37
Additional Step: Tukey-Kramer
Test (Continue)
5.Test Statistic
Absolute Different
Two Sample Means = Xi X j
where:
X i = Sample mean from group i.
X j = Sample mean from group j
Week 6-38
Additional Step: Tukey-Kramer
Test (Continue)
Week 6-39
One-Factor ANOVA
F Test Example
Week 6-40
One-Factor ANOVA Example:
Scatter Diagram
Distance
Club 1 Club 2 Club 3 270
254 234 200 260 •
263 218 222 ••
241 235 197
250 X1
240 •
237 227 206 • ••
251 216 204 230
• X
220
••
X2 •
210
x1 249.2 x 2 226.0 x 3 205.8
•• X3
200 ••
x 227.0 190
1 2 3
Club Week 6-41
One-Factor ANOVA Example
Computations SSA SSW Anova
Week 6-42
One-Factor ANOVA Example
Solution
H0: μ1 = μ2 = μ3 Step 1
Test Statistic: Step 5
H1: At least one of μi is not equal,
where i=1,2, and 3 MSA 2358.2
= 0.05 Step 2 F 25.275
df1= 2 df2 = 12
MSW 93.3
Decision Rule:
Reject H0 if F > FU, otherwise do not reject H0 Step 3
Critical
Value: Step 4
Decision:
Step 6 Reject H at = 0.05
FU = 3.89 0
Within
1119.6 12 93.3
Groups
Total 5836.0 14 Week 6-44
Question-Pairwise Comparison
At the 0.05 significance level, determine
which club differ in mean distance?
Week 6-45
The Tukey-Kramer Procedure:
Example Test statistics
QU 3.77
Week 6-46
The Tukey-Kramer Procedure:
Example MSW
(continued)
Compute Critical Range: Step 4
MSW 1 1 93.3 1 1
Critical Range QU 3.77 16.285
2 n j n j' 2 5 5
Compare:
Reject Ho for each pair of mean because
x1 x 2 23.2
all of the absolute mean differences are
greater than critical range. Step 6 x1 x 3 43.4
Conclusion: Therefore there is a
x 2 x 3 20.2
significant difference between each pair of
means at 5% level of significance. Step 7 Step 5
Week 6-47
Summary
Described one-way analysis of variance
The logic of ANOVA
ANOVA assumptions
F test for difference in c means
The Tukey-Kramer procedure for
multiple comparisons
Week 6-49
Week 6-50
Assignment
Week 6-51
select a combination of THREE (3) countries
and ONE (1) variable.
Week 6-52
CODE Countries
A Angola
B Botswana
C Chad
D Colombia
E El Salvador
F Germany
G Ireland
H Malaysia
I Moldova
J Slovenia
Week 6-53
Variables Tutors
1. Trade (% of GDP) Dr Au Yong Hui Nee
Week 6-54
Part A
Week 6-55
Part B
Week 6-56
Part C
Week 6-57