You are on page 1of 17

Analysis of Variance (ANOVA)

29 28 25
30 29 28
31 27 29
31 30 27
29 29 29

Variation within each group


29 28 25
30 29 28
31 27 29
31 30 27
29 29 29

Variation between the groups


SITUATION
Case 1

10 11 13
11 14 14
17 18 19
26 27 28
39 38 37
There’s a lot of variation in each group
… but each group looks pretty much the same
Conclusion : It’s the people that make the difference, not the drink
----> Accept Ho hypothesis
Case 2

26 17 10
27 18 12
31 20 13
32 21 14
32 22 14
There’s not much variation in each group…
… but the groups look very different.
Conclusion : It’s the drink that makes the difference, not the people
----> Reject Ho hypothesis
Figure out how much of the total variance comes
from :
- The variance between the groups
- The variance within the groups
Calculate the ratio :

F = between groups
within groups
The larger the ratio, the more likely it is that the
groups have different means (reject Ho)
One – Way ANOVA
One- Way ANOVA

One factor with at least two levels, levels are


independent.

1. Define null and alternative hypotheses


2. State alpha
3. Calculate Degree of Freedom (df)
4. Calculate Fcritical
5. Calculate Test statistic
6. State results
7. State conclusion
Example 1

Group A Group B Group C


Score 1 2 2
(quiz) 2 4 3
5 2 4

Step 1 - Define null and alternative hypotheses


Ho = μ A = μ B = μ C
H1 = At least 1 difference among the means
Step 2 – State alpha (α)
α = 0.05
Example 1

Group A Group B Group C


Score 1 2 2
(quiz) 2 4 3
5 2 4

Step 3 – Calculate degree of freedom

dfbetween = number of group (k) -1 = 3-1 =2


dfwithin = total number of data (N) - k = 9-3 =6
dftotal = dfbetween + dfwithin =8
Example 1

Group A Group B Group C


Score 1 2 2
(quiz) 2 4 3
5 2 4

Step 4 – Calculate Fcritical


Use F table = Table 9
v1 = dfbetween = 2
v2 = dfwithin = 6
Fcritical = 5.14 (with α = 0.05)
Example 1

Group A Group B Group C


x1 = 2.67 Score 1 2 2
x2 = 2.67 (quiz) 2 4 3
x3 = 3.00
5 2 4
Mean 2.67 2.67 3.00
Step 5 – Calculate test statistic SSbetween
MSbetween =
Grand mean (x) dfbetween
MSbetween
= ∑ of data F=
MSwithin SSwithin
N
MSwithin =
= 25 / 9 = 2.78 dfwithin
Group A Group B Group C
Score 1 2 2 Grand mean (x)
(quiz) 2 4 3 = 2.78
5 2 4
Mean 2.67 2.67 3.00
In order to find out MSbetween and Mswithin you need to know SStotal

SStotal = ∑ (x – x)2 SSwithin = ∑ (x – x)2


= (1-2.67)2 + (2-2.67)2 + (5-2.67)2 +
= (1-2.78)2 + (2-2.78)2 + (5-2.78)2 + (2-2.67)2 + (4-2.67)2 + (2-2.67)2 +
(2-2.78)2 + (4-2.78)2 + (2-2.78)2 + (2-3.00)2 + (3-3.00)2 + (4-3.00)2
(2-2.78)2 + (3-2.78)2 + (4-2.78)2 = 13.34

= 13.6 SSbetween = SStotal - SSwithin


= 13.60 – 13.34 = 0.26
Example 1

Group A Group B Group C


Score 1 2 2
(quiz) dfbetween = 2
2 4 3 dfwithin = 6
5 2 4
Step 5 – Calculate test statistic
SSbetween
MSbetween =
dfbetween 0.26 / 2
MSbetween
F= = 13.34 / 6
MSwithin SSwithin
MSwithin = F = 0.058
dfwithin
Example 1

Group A Group B Group C


Score 1 2 2
(quiz) 2 4 3
5 2 4
Step 6 – State results
If F is greater than 5.14, reject the null hypothesis
F = 0.058
Result : Accept the null hypothesis
Step 7 – State conclusion
There three score (quiz) are not differed with F (2,6)
Example 2

You might also like