You are on page 1of 13

STA301

Safa
Mohamed

One way
ANOVA Applied Statistics
Basic Framework of
ANOVA
Assumptions
Mathematical Model
Analysis of Variance
Hypothesis Safa Mohamed
ANOVA table
Example
Department of Statistics
Faculty of mathematical sciences and Informatics
University of Khartoum
Lecture 6

1 / 13
Lecture Outline

STA301

Safa
Mohamed

One way
ANOVA 1 One way ANOVA
Basic Framework of
ANOVA Basic Framework of ANOVA
Assumptions
Mathematical Model Assumptions
Analysis of Variance
Hypothesis Mathematical Model
ANOVA table
Example
Analysis of Variance
Hypothesis
ANOVA table
Example

2 / 13
ANOVA(Analysis of Variance)

STA301

Safa
Mohamed

One way
ANOVA
Basic Framework of
ANOVA Want to study the effect of one or more qualitative
Assumptions
Mathematical Model variables on a quantitative outcome variable.
Analysis of Variance
Hypothesis Qualitative variables are referred to as factors.
ANOVA table
Example
Characteristics that differentiates factors are referred to as
levels.

3 / 13
ANOVA(Analysis of Variance)

STA301

Safa
Mohamed
Assumptions:
One way
ANOVA 1 Population are normally distributed.
Basic Framework of
ANOVA
Assumptions
2 Population variances are equals.
Mathematical Model
Analysis of Variance
3 Samples are random and independents.
Hypothesis
ANOVA table Example:
Example
Suppose you have data of different observations on different
groups of one factor, and you want to study the effect of the
factor on the different observation, i.e. the effect of three way
of irrigating on the harvest of the Potato, this factor also called
treatment.

4 / 13
ANOVA(Analysis of Variance)

STA301

Safa
Mohamed

One way
ANOVA Simplest case is for One-Way (Single Factor) ANOVA
Basic Framework of
ANOVA
Assumptions
The outcome variable is the variable you’re comparing.
Mathematical Model
Analysis of Variance
The factor variable is the categorical variable being used
Hypothesis
ANOVA table
to define the groups.
Example
The one-way is because each value is classified in exactly
one way.
ANOVA easily generalizes to more factors

5 / 13
ANOVA(Analysis of Variance)

STA301

Safa
Mohamed

One way
ANOVA
Basic Framework of
ANOVA
Assumptions
Mathematical Model
Analysis of Variance
Hypothesis
ANOVA table
Example

Xi. = nj=1 xij


P

X.. = ki=1 nj=1 xij


P P

6 / 13
ANOVA(Analysis of Variance)

STA301

Safa
Mohamed
Mathematical Model:

One way Xij = µ + αi + eij


ANOVA
Basic Framework of
ANOVA
Assumptions
Where:
Mathematical Model
Analysis of Variance
Xij Observations denote the data from the i th level
Hypothesis
ANOVA table
and j th observation
Example
µ The total mean
αi the effect on the treatment i of the factor A
eij error ∼ N(0, σ 2 )
i 1,2,...,k
j 1,2,...,n

7 / 13
ANOVA(Analysis of Variance)

STA301 Analysis of Variance:


Safa
Mohamed The null hypothesis is that the means are all equal
H0 : µ1 = µ2 = ... = µk
One way
ANOVA Vs.
Basic Framework of
ANOVA The alternative hypothesis is that at least one of the means is
Assumptions
Mathematical Model different
Analysis of Variance
Hypothesis Ha : µ1 6= µ2 6= ... 6= µk (atleast)
ANOVA table
Example
Sum Squares:
1. Sum Squares Total:
Pk Pn
SST = i=1 j=1 (Xij − X¯.. )2
OR
( ki=1 nj=1 Xij )2
P P
Pk Pn 2
SST = i=1 j=1 Xij − nk
Pk Pn 2
( i=1 j=1 Xij )
nk This quantity called Correction Factor (CF)
df = nk − 1
8 / 13
ANOVA(Analysis of Variance)

STA301

Safa
Mohamed

One way 2.Sum Square Between groups(sum square treatment) :


ANOVA
Pk
Xi.2
Basic Framework of
ANOVA
Assumptions
SSAorSSTr = i=1ni − CF
Mathematical Model
Analysis of Variance
df = k − 1
Hypothesis
ANOVA table
Example
3.Sum Square Within groups(sum square error) :

SSE = SST − SSA


df = kn − k = k(n − 1)

9 / 13
ANOVA(Analysis of Variance)

STA301
ANOVA table:
Safa
Mohamed

One way
ANOVA
Basic Framework of
ANOVA
Assumptions
Mathematical Model
Analysis of Variance
Hypothesis
ANOVA table
Example

Compare the F value calculated above with a tabulated value


from F table (F (v 1, v 2)orF( k − 1, kn − k))
where v1: degrees of freedom of the nominator and v2:degrees
of freedom of the denominator
10 / 13
ANOVA(Analysis of Variance)

STA301 Example:
Safa Three methods used to train some producers to produce
Mohamed
carpets, 5 had been trained with method 1, 5 had been trained
One way
ANOVA
with method 2 and 3 had been trained with method 3, number
Basic Framework of
ANOVA
of carpet produced had been recorded:
Assumptions
Mathematical Model
Analysis of Variance
Hypothesis
ANOVA table
Example

11 / 13
ANOVA(Analysis of Variance)

STA301 Example:
Safa Suppose those sample are randomly distributed and are
Mohamed
independents, test if the three methods are different in means
One way
ANOVA
at α = 0.01
Basic Framework of
ANOVA
Solution:
Assumptions
Mathematical Model H 0 : µ1 = µ2 = µ3
Analysis of Variance
Hypothesis Vs.
ANOVA table
Example Ha : µ1 6= µ2 6= µ3 (atleast)
Math Model:
Xij = µ + αi + eij
( k
Pn
Xij )2
P
Pk Pn
SST = i=1 j=1 Xij2 − i=1 nkj=1
SST = ki=1 nj=1 Xij2 − CF
P P
(65)2
SST = 42 + 52 + ... + 42 + 32 − 13 = 349 − 325 = 24
12 / 13
ANOVA(Analysis of Variance)

STA301 Solution:
Pk
Safa X2
Mohamed SSA = i=1ni
i.
− CF
152 302 202
One way SSA = 3 + 5 + 5 − 325 = 10
ANOVA
Basic Framework of SSE = SST − SSA = 24 − 10 = 14
ANOVA
Assumptions
Mathematical Model
Analysis of Variance
Hypothesis
ANOVA table
Example

F0.01 (2, 12) = 7.5


calculated value≤ tabulated value, therefore we won’t reject
H0 , hence there are no differences in mean production of
carpets among three methods.
13 / 13

You might also like