You are on page 1of 11

INTRODUCTION TO ANOVA

What is ANOVA?
 ANOVA stands for Analysis of Variance.
 Founded by Ronald Fisher in 1918.
 Is a strong statistical technique that is used to show difference between two or
more means or components through significance tests.
 It also shows us a way to make multiple comparisons of several population means.
 The Anova test is performed by comparing two types of variation, the variation
between the sample means, as well as the variation within each of the samples
 An extension of the T-Test.

Why use ANOVA when you can have multiple T-Test?

 We use ANOVA to prevent inflation of the Type 1 error.


 Conducting multiple t-tests on a single data makes the error skyrocket.
 T-test can only be used in comparing 2 groups while ANOVA can be used with
more than 3 groups.
 Having multiple t-test and rejecting the null hypothesis may lead to confusion as
to what group has the type 1 error.
TWO TYPES OF ANOVA

ONE WAY ANOVA


- Use in testing two groups to see if there’s a difference between them.
TWO WAY ANOVA
- Compares the mean differences between groups that have been split on two
independent variables.
Difference between One Way and Two Way Anova
- One Way Anova
o Has One (1) Dependent Variable and One(1) Independent Variables
- Two Way Anova
o Has One (1) Dependent Variable and Two (2) Independent Variables

Situational Example of One Way Anova


Dependent Variable : Feelings about the sent drunk text the morning after
Independent Variable : Type of person who was drunk texted
Conditions of the Independent Variable : Past Partner, Current Partner
Measurement : To measure feelings about drunk texts the morning after

"How would you feel the morning after, if you texted "Come snuggle in my bed" to your Past
and Current Partner? "
Range your answer from 1-5:
1=Regret or Embarrassed
5=Proud or Satisfied

RESULT:
Person being asked Past Partner Current Partner
Mark 2 4
Neil 3 5

Therefore, if you're going to drunk text anybody make sure you drunk text your current
partner over your ex.

ANOVA Coefficient (F) and ANOVA both explain how the independent variable
explains the variation in the dependent variable. The computed fc will be then compared to ft or
tabular F so that we could know the significant difference between two or more means.
DEFINITION OF TERMS

TERM DEFINITION
INDEPENDENT VARIABLE It is a variable that stands alone and isn’t
changed by the other variables you are
trying to measure.

DEPENDENT VARIABLE It is something that depends on other factors

NULL HYPOTHESIS It is a hypothesis that says there is no


statistical significance between the 2
variables in the hypothesis.

ALTERNATE HYPOTHESIS Simply is the inverse or opposite of the null


hypothesis.

TYPE 1 ERROR Rejecting the null hypothesis Ho when it is


true.

TYPE 2 ERROR Failing to reject the null hypothesis when it


is false.
ONE WAY ANOVA

Anova Formula

Below mentioned formula represents one way Anova test statistics:

𝑀𝑆𝑇
F=
𝑀𝑆𝐸
WHERE:
F = ANOVA COEEFICIENT
MST = MEAN SUM OF SQUARES DUE TO TREATMENT
MSE = SUM OF SQUARES DUE TO ERROR

FORMULA FOR MST IS GIVEN BELOW:

𝑆𝑆𝑇
𝑀𝑆𝑇 =
𝑝−1
𝑆𝑆𝑇 = ∑ 𝑁(𝑥 + 𝑥)2

WHERE:
SST = SUM OF SQUARES DUE TO ERROR
p = TOTAL NUMBER OF POPULATIONS
n = TOTAL NUMBER OF SAMPLE IN A POPULATION

FORMULA FOR MSE IS GIVEN BELOW:

𝑆𝑆𝐸
𝑀𝑆𝐸 =
𝑁− 𝑝
𝑆𝑆𝐸 = ∑ (𝑁 − 1)𝑆 2

WHERE:
SSE =SUM OF SQUARES DUE TO ERROR
S = STANDARD DEVIATION OF THE SAMPLES
N = TOTAL NUMBER OF OBSERVATIO

EXAMPLE :
FOLLOWING DATA IS GIVEN ABOUT CRICKET TEAMS IF THREE
COUNTRIES.

COUNTRIES NUMBERS OF AVERAGE RUNS STANDARD


PLAYERS DEVIATION
INDIA 11 60 15

NEW ZEALAND 11 50 10

SOUTH AFRICA 11 70 12

FIND THE ANOVA COEFFICIENT:

SOLUTION:

CONSTRUCT THE FOLLOWING TABLE

CRICKET N X S S2
TEAS
INDIA 11 60 15 225

NEW 11 50 10 100
ZEALAND
SOUTH 11 70 12 144
AFRICA

N = 11

P=3

N = 33
60+50+70
𝒙= = 60
3

𝑺𝑺𝑻 = ∑ 𝑁(𝑥 + 𝑥)2


𝑺𝑺𝑻 = 11(60 − 60)2 + 11(50 − 60)2 + 11(70 − 60)2 = 2200
SST
𝐌𝐒𝐓 =
p−1
2200
𝐌𝐒𝐓 = = 1100
3−1
𝐒𝐒𝐄 = ∑ (N − 1)S 2
𝐒𝐒𝐄 = (10)(225) + (10)(100) + (10)(144) = 4690

SSE
𝐌𝐒𝐄 =
N− p
4690
𝐌𝐒𝐄 = = 156.33
33−3

MST
𝐅=
MSE
1100
𝐅= = 7. 036
156.33

Example of Two-Way Anova


a1 a1 a2 a2 a3 a3
b1 b2 b1 b2 b1 b2
Marti Marti Juan Juan Tami Tami
Training No Training Training No Training Training No Training
12 8 10 10 14 8
11 7 11 11 13 9
13 10 12 9 13 9
12 11 10 10 13 10
11 9 12 8 15 10

Assign:
a= 3 (Managers; Marti, Juan & Tami)
b= 2 (No training/ training)
n= 5

∑ 𝐴2 (a1)2 + (a2)2 + (a3) 2 (104)2 + (103)2 + (114)2


[A] = = = = 3442
𝑏𝑛 𝑏𝑛 (2)(5)

∑ 𝐵2 (𝑏1)2 +(𝑏2)2 (182)2 +(139)2


[B] = = = = 3496
𝑎𝑛 𝑎𝑛 (3)(5)

∑ 𝐴𝐵2 (𝑎1𝑏1)2 + (𝑎1𝑏2)2 +⋯+(𝑎3𝑏2)2 (59)2 +(45)2 +(55)2 +(48)2 +(68)2 +(46)2
[AB] = = = = 3515
𝑛 𝑛 5

(12)2 +(11)2 +…+(10)2


[Y] = ∑ 𝑌 2 = = 3543
1
𝑇2 (12+11+13+⋯+10+10)2
[T] = 𝑎𝑏𝑛 = = 3435
(3)(2)(5)

Formulas:

Source SS df MS F Critical
Value
Between [A] - [T] a-1 SSA/dfA MSA/MSS/AB Lock it up in
Groups (A) the F table
Between [B] - [T] b-1 SSB/dfB MSB/MSS/AB Lock it up in
Groups (B) the F table
Interaction [AB] - [A] - (a-1)(b-1) SSAB/dfAB MSAB/MSS/AB Lock it up in
(A x B) [B] + [T] the F table
Within Groups [Y] – [AB] ab(a-1) SSS/AB/dfS/AB
(S/AB)
Total [Y] – [T] abn - 1

Solution:

Source SS df MS F (computed) Critical Value


Between 7 2 3.5 3.2 (2,24) Locate (2,24 in the table)
Groups 3.4
(A)
Between 61 1 61 55 (1,24) Locate (1,24 in the table)
Groups (B) 4.6
Interaction 12 2 6 5.5 (2,24) Locate (2,24 in the table)
(A x B) 3.4
Within 28 24 1.1
Groups
(S/AB)
Total 108 29

Between Groups (A)


Since F< F (critical value)
3.2<3.4
Thus, there is no significant difference between groups A.

Between Groups (B)


Since F> F (critical value)
55 >4.6
Thus, there is a significant difference between groups B.
Interaction (AxB)
Since F> F (critical value)
5.5>3.4
Thus, there is a significant difference on the interaction of
groups A and B.

You might also like