You are on page 1of 17
Analysis of Variance (ANOVA)
Analysis of Variance (ANOVA)
Analysis of Variance (ANOVA)

Analysis of Variance (ANOVA)

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

25

28

29

27

29

Variation within each group

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

29

   

28

30

29

31

27

31

30

29

29

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

25

28

29

27

29

Variation between the groups

SITUATION

Case 1

Case 1 10 11 17 26 39 11 14 18 27 38 13 14 19 28
 

10

11

17

26

39

Case 1 10 11 17 26 39 11 14 18 27 38 13 14 19 28
Case 1 10 11 17 26 39 11 14 18 27 38 13 14 19 28
11 14 18 27 38
11
14
18
27
38
Case 1 10 11 17 26 39 11 14 18 27 38 13 14 19 28
Case 1 10 11 17 26 39 11 14 18 27 38 13 14 19 28
 

13

14

19

28

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 H o hypothesis

Case 2

Case 2 26 27 31 32 32 17 18 20 21 22 10 12 13 14
 

26

27

31

32

32

Case 2 26 27 31 32 32 17 18 20 21 22 10 12 13 14
Case 2 26 27 31 32 32 17 18 20 21 22 10 12 13 14
17 18 20 21 22
17
18
20
21
22
Case 2 26 27 31 32 32 17 18 20 21 22 10 12 13 14
Case 2 26 27 31 32 32 17 18 20 21 22 10 12 13 14
 

10

12

13

14

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 H o 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 H o )

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 F critical

  • 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

H o = μ A = μ B = μ C H 1 = 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

df between = number of group (k) -1

df within

df total

= total number of data (N) - k

= df between + df within

= 3-1 =2 = 9-3 =6 = 8

Example 1

 

Group A

Group B

Group C

Score

1

  • 2 2

 

(quiz)

2

  • 4 3

 

5

  • 2 4

 

Step 4 – Calculate F critical

Use F table

= Table 9

v 1 = df between = 2

v 2 = df within F critical

= 6

= 5.14 (with α = 0.05)

Example 1

  • x 1 = 2.67

  • x 2 = 2.67

  • x 3 = 3.00

 

Group A

Group B

Group C

Score

 
  • 1 2

2

(quiz)

  • 2 4

 

3

  • 5 2

 

4

Mean

2.67

2.67

3.00

Step 5 – Calculate test statistic

MS between = SS between df between
MS between =
SS between
df between
F = MS between MS within SS within = MS within df within
F =
MS between
MS within
SS within
=
MS within
df within

Grand mean (x)

= ∑ of data

N = 25 / 9 = 2.78

 

Group A

Group B

Group C

Score

 
  • 1 2

2

(quiz)

  • 2 4

 

3

  • 5 2

 

4

Mean

2.67

2.67

3.00

Grand mean (x)

= 2.78

In order to find out MS between and Ms within you need to know SS total

SS total = ∑ (x – x) 2

= (1-2.78) 2 + (2-2.78) 2 + (5-2.78) 2 + (2-2.78) 2 + (4-2.78) 2 + (2-2.78) 2 + (2-2.78) 2 + (3-2.78) 2 + (4-2.78) 2

= 13.6

SS within = ∑ (x – x) 2

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

= 13.34

SS between = SS total - SS within

= 13.60 – 13.34 = 0.26

Example 1

 

Group A

Group B

Group C

Score

1

  • 2 2

 

(quiz)

2

  • 4 3

 

5

  • 2 4

 

Step 5 – Calculate test statistic

df between = 2

df within

= 6

MS between = SS between df between F = MS between MS within SS within =
MS between =
SS between
df between
F =
MS between
MS within
SS within
=
MS within
df within
= 0.26 / 2 13.34 / 6 F = 0.058
=
0.26 / 2
13.34 / 6
F =
0.058

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

Example 2