Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Lecture 13

ANALYSIS OF VARIANCE

Fall 2021 DR. MAHA A. HASSANEIN 1


Analysis of variance ANOVA
Used in Experimental Design Example: to compare the performance of
several materials in manufacturing depending on several factors. In
which known sources of variability are varied over a wide range .
There are k samples from k populations. A common procedure used to
deal with testing population means is called the Analysis of Variance
(ANOVA).
Example ANOVA
An engineer is interested in how the mean absorption of moisture in
concrete varies among 5 different concrete aggregates. The samples
are exposed to moisture for 48 hours. A sample of size n = 6
observations from each k = 5 = number of populations is to be tested
for each aggregate. We want to test 𝜇1 , 𝜇2 , . . , 𝜇5 are the same .
Hypothesis test

The goal of ANOVA is to determine if the differences among the 5


sample means are due to
- random variation alone or
- variation beyond merely random effects, i.e., differences in the
chemical composition of the aggregates.
The k=5 different populations are classified on the basis of
a single treatment (here different aggregates)=⇒ One-Way ANOVA.

Fall 2021 DR. MAHA A. HASSANEIN 4


Analysis of Variance

Fall 2021 DR. MAHA A. HASSANEIN 5


Total Variability

Fall 2021 DR. MAHA A. HASSANEIN 6


Resolution of total variability

Fall 2021 DR. MAHA A. HASSANEIN 7


Fall 2021 DR. MAHA A. HASSANEIN 8
Fall 2021 DR. MAHA A. HASSANEIN 9
Fall 2021 DR. MAHA A. HASSANEIN 10
Fall 2021 DR. MAHA A. HASSANEIN 11
Fall 2021 DR. MAHA A. HASSANEIN 12
Fall 2021 DR. MAHA A. HASSANEIN 13
Fall 2021 DR. MAHA A. HASSANEIN 14
Example
The students split into three
groups, in each group are
randomly assigned to use one of
the three exam prep programs for
the next three weeks to prepare
for an exam. At the end of the
three weeks, all of the students
take the same exam.
The exam scores for each group
are shown in table. Perform a one-
way ANOVA by hand to determine
if the mean exam score is different
between the three groups

Fall 2021 DR. MAHA A. HASSANEIN 15


Step 1
First, we will calculate the mean
for all three groups along with the
overall mean:

Fall 2021 DR. MAHA A. HASSANEIN 16


Step 2
Step 2: Calculate SSA. SSA= = 10(83.4-85.8)2 + 10(89.3-
85.8)2 + 10(84.7-85.8)2 = 192.2
Next, we will calculate the
regression sum of squares (SSA)
using the following formula:

Fall 2021 DR. MAHA A. HASSANEIN 17


Step 3
Next, we will calculate the error Group 1: (85-83.4)2 + (86-83.4)2 + (88-
sum of squares (SSE) using the 83.4)2 + (75-83.4)2 + (78-83.4)2 + (94-
following formula: 83.4)2 + (98-83.4)2 + (79-83.4)2 + (71-
83.4)2 + (80-83.4)2 = 640.4
Group 2: (91-89.3)2 + (92-89.3)2 + (93-
89.3)2 + (85-89.3)2 + (87-89.3)2 + (84-
89.3)2 + (82-89.3)2 + (88-89.3)2 + (95-
89.3)2 + (96-89.3)2 = 208.1
SSE: 640.4 + 208.1 + 252.1
= 1100.6 Group 3: (79-84.7)2 + (78-84.7)2 + (88-
84.7)2 + (94-84.7)2 + (92-84.7)2 + (85-
84.7)2 + (83-84.7)2 + (85-84.7)2 + (82-
84.7)2 + (81-84.7)2 = 252.1

Fall 2021 DR. MAHA A. HASSANEIN 18


Step 4
Calculate the total sum df treatment: k-1 = 3-1 = 2
of squares (SST) using df error: n-k = 30-3 = 27
the following formula: df total: n-1 = 30-1 = 29
SST = SSA + SSE MS treatment: SST / df treatment
= 192.2 / 2 = 96.1
MS error: SSE / df error = 1100.6 /
27 = 40.8
SST = 192.2 + 1100.6
= 1292.8 F: MS treatment / MS error = 96.1
/ 40.8 = 2.358

Fall 2021 DR. MAHA A. HASSANEIN 19


Step 5
Fill in the ANOVA table.
Now that we have SSA, SSE, and SST, we can fill in the ANOVA table:

Fall 2021 DR. MAHA A. HASSANEIN 20


Step 6
Interpret the results.
α (significance level) = 0.05
DF1 (numerator degrees of freedom) = df treatment = 2
DF2 (denominator degrees of freedom) = df error = 27
The F test statistic for this one-way ANOVA is 2.358
F critical value is 3.3541.
𝐹𝛼 < 𝐹𝑐
Decision: we fail to reject the null hypothesis. This means we don’t have
sufficient evidence to say that there is a statistically significant
difference between the mean exam scores of the three groups.

Fall 2021 DR. MAHA A. HASSANEIN 21


Text book
Chapter 12
Sec. 12.2

Reference

Fall 2021 DR. MAHA A. HASSANEIN 22


Thank you for your attention

Maha

Fall 2021 DR. MAHA A. HASSANEIN 23

You might also like