0% found this document useful (0 votes)
68 views33 pages

Analysis of Variance (ANOVA) : Part 1: One-Way ANOVA (Equal Sample Sizes) Part 2: One-Way ANOVA (Unequal Sample Sizes)

The document discusses analysis of variance (ANOVA) including one-way ANOVA with both equal and unequal sample sizes. It provides an overview of why ANOVA is used to compare means of more than two populations. It also includes examples of experimental designs, assumptions of one-way ANOVA, calculations of sum of squares, and how to perform one-way ANOVA in Excel.

Uploaded by

afifah masrom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views33 pages

Analysis of Variance (ANOVA) : Part 1: One-Way ANOVA (Equal Sample Sizes) Part 2: One-Way ANOVA (Unequal Sample Sizes)

The document discusses analysis of variance (ANOVA) including one-way ANOVA with both equal and unequal sample sizes. It provides an overview of why ANOVA is used to compare means of more than two populations. It also includes examples of experimental designs, assumptions of one-way ANOVA, calculations of sum of squares, and how to perform one-way ANOVA in Excel.

Uploaded by

afifah masrom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Analysis of Variance (ANOVA)

Part 1: One-Way ANOVA (Equal Sample Sizes)


Part 2: One-Way ANOVA (Unequal Sample Sizes)

1
Why ANOVA?
• Up to now you have learnt how to conduct
hypothesis testing for a single mean and to
compare two populations
• What if we wish to compare means of more than
two populations?
• Enter ANOVA; ANalysis Of VAriance

2
Design of Experiments
Design of experiments refers to the process of planning, designing, and
analyzing the experiment so that valid and objective conclusions can
be drawn effectively and efficiently.

Why do we need to perform experiments in organizations?


(a) Improved process yield
(b) Reduced variability in the process and closer conformance to
nominal or target requirements.
(c) Reduced design and development time
(d) Reduced cost of operation

3
Design of Experiments
The success of any industrially designed experiment depends on sound
planning, appropriate choice of design, statistical analysis of data, and
teamwork skills.
Every experiment involves a sequence of activities:

Conjecture The original hypothesis that motivates the experiment

Experiment The test performed to investigate the conjecture

Analysis The statistical analysis of the data from the experiment

Conclusion What has been learned bout the original conjecture from the experiment. Often
the experiment will lead to a revised conjecture, and a new experiment, and so
forth.
4
Design of Experiments
• A one-way ANOVA, single factor ANOVA or a completely randomized
design (CRD) is the simplest design for comparative experiments.
• One-way ANOVA models are used to compare the mean response
values at different levels of the factor. Each level of the factor is
investigated to see if the response is significantly different from the
response at other levels of the factor.

5
To illustrate the use of ANOVA models in the analysis of experiments,
consider a single factor experiment where the analyst wants to see if
the surface finish of certain parts is affected by the speed of a lathe
machine.
Data is collected for three speeds (or three treatments).
Each treatment is replicated four times.
Therefore, this experiment design is balanced. Surface finish values
recorded using randomization are shown in the following table.

Treatments

Surface finish values for three speeds of a lathe machine.


6
ANOVA: What are we testing?

7
Assumptions and Hypothesis of One-Way ANOVA
• Normality
The samples are obtained from populations that are normally
distributed
• Constant Variance
The variances of the populations are equal
• Independence
The samples drawn from different populations are random and
independent

8
Example

Twenty-one students at Universiti Teknikal Malaysia Melaka were


selected for an informal study about student study skills. 7 first year, 7
second year and 7 third year undergraduates were randomly selected.

The students were given a study-skills assessment having a maximum


score of 100%. As researchers, we are interested in whether or not a
difference exists somewhere between the three different year levels.

We will conduct this analysis using a One-Way ANOVA Technique.

9
Treatments

Observations

10
11
TYPICAL DATA STRUCTURE FOR ONE-WAY ANOVA
Treatment Observations Totals Averages
(Level)

1 𝒚𝟏𝟏 𝒚𝟏𝟐 . . 𝒚𝟏𝒏 𝒚𝟏. 𝒚𝟏.


2 𝒚𝟐𝟏 𝒚𝟐𝟐 . . 𝒚𝟐𝒏 𝒚𝟐. 𝒚𝟐.
. . . . . . . .
. . . . . . . .
k 𝒚𝒌𝟏 𝒚𝒌𝟐 . . 𝒚𝒌𝒏 𝒚𝒌. 𝒚𝒌.
𝒚.. 𝒚..

12
Assessment Observation
Score (%) Totals Averages
1 2 3 4 5 6 7
Year 1 82 93 61 74 69 70 53 502 71.71
Year 2 71 62 85 94 78 66 71 527 75.29
Year 3 64 73 87 91 56 78 87 536 76.57
𝑦.. = 1565 𝑦.. = 74.52

13
14
𝑘 𝑛
2 𝑦..2
𝑆𝑆𝑇 = 𝑦𝑖𝑗 −
𝑁
𝑖=1 𝑗=1
1565 2
= 82 2 + 93 2 + ⋯ + 78 2 + 87 2 − = 2901.238
21
𝑘
1 𝑦 2
..
𝑆𝑆𝐴 = 𝑦𝑖.2 −
𝑛 𝑁
𝑖=1

502 2 + 527 2 + 536 2 1565 2


= − = 88.667
7 21

SSE = SST – SSA = 2901.238 – 88.667 = 2812.571

k = Number of treatment or factor levels.

15
The ONE-WAY ANOVA table:
SOURCE OF VARIATION SUM OF SQUARES Degrees of freedom, MEAN F
(SS) df SQUARE
(SS/df) 𝑀𝑆𝐴
𝐹 =
Treatments 88.667 k-1 =2 44.333 𝑀𝑆𝐸
Error 2812.571 N-k =18 156.254
Total 2901.238 N-1 =20 0.284

𝐻0 : 𝜇1 = 𝜇2 = 𝜇3
𝐻1 : At least two of the means are not equal
𝛼 = 0.05

Test statistic: 0.284

Critical region:
Reject 𝐻0 if 𝐹 > 𝐹𝛼(𝜐1=𝑘−1 ,𝜐2=𝑁−𝑘 )
𝐹0.05(2,18) = 3.55
F = 0.284 > 3.55, thus do not reject 𝐻0
Decision: Failed to reject 𝐻0 and conclude that there is no difference in mean test score by year of16student
The F Distribution

Reject 𝐻0 if 𝐹 > 𝐹𝛼(𝜐1 ,𝜐2 )

Where 𝜐1 = 𝑘 – 1 and 𝜐2 =
𝑁– 𝑘
18
19
Using Excel for One-Way ANOVA
Step 1: Input your data into columns or rows in Excel. For example, if three groups of
students according to year are being tested, spread the data into three columns.

Step 2: Click the “Data” tab and then click “Data Analysis.” If you don’t see Data
Analysis, load the ‘Data Analysis Toolpak’ add-in.

Step 3: Click “ANOVA Single Factor” and then click “OK.”

Step 4: Type an input range into the Input Range box. For example, if the data is in cells A1
to C10, type “A1:C10” into the box. Check the “Labels in first row” if we have column
headers, and select the Rows radio button if the data is in rows.

Step 5: Select an output range. For example, click the “New Worksheet” radio button.

Step 6: Choose an alpha level. For most hypothesis tests, 0.05 is standard.

Step 7: Click “OK.” The results from ANOVA will appear in the worksheet.
20
A recent study claims that using music in a class enhances the concentration and
consequently helps students absorb more information. To test the claim, the
study was implemented on a smaller group of randomly selected students from
three different classes.
We take three different groups of ten randomly selected students (all of the same
age) from three different classrooms. Each classroom was provided with a
different environment for students to study. Classroom A had constant music
being played in the background, classroom B had variable music being played and
classroom C was a regular class with no music playing.
After one month, we conducted a test for all the three groups and collected their
test scores. The test scores that we obtained were as follows:

21
22
One-Way ANOVA (Unequal Sample Sizes)

The only practical issue in one-way ANOVA is that very unequal sample
sizes can affect the homogeneity of variance assumption. ANOVA is
considered robust to moderate departures from this assumption, but
the departure needs to stay smaller when the sample sizes are very
different.

Two important advantages when choosing a balanced design:


• The ANOVA is relatively insensitive to small departures from the
assumption of equality of variances if the sample sizes are equal.
• The power of the test is maximized if the samples are of equal size.

23
When the sample sizes between the populations
are unequal, the equations for the ANOVA are
slightly different.
𝑘 𝑛𝑖

𝑆𝑆𝑇 = (𝑦𝑖𝑗 − 𝑦𝑖. )2


𝑖=1 𝑗=1

𝑆𝑆𝐴 = 𝑛𝑖 (𝑦𝑖. − 𝑦.. )2


𝑖=1

𝑆𝑆𝐸 = 𝑆𝑆𝑇 − 𝑆𝑆𝐴

24
Example
The article “On the Development of a New Approach for the
Determination of Yield Strength in Mg-based Alloys” (Light Metal Age,
Oct. 1998: 51–53) presented the following data
on elastic modulus (GPa) obtained by a new ultrasonic method for
specimens of a certain alloy produced using three different casting
processes.
Example cont’d

• Let 1, 2, and 3 denote the true average elastic moduli for the three
different processes under the given circumstances.

• The relevant hypotheses are


H0: 1 = 2 = 3 versus
H1: at least two of the i’s are different.
27
𝑘 𝑛
2 𝑦..2
𝑆𝑆𝑇 = 𝑦𝑖𝑗 −
𝑁
𝑖=1 𝑗=1
983.7 2
= 45.5 2 + 45.3 2 + ⋯ + 45.1 2 + 45.5 2 − = 13.93
22
𝑘
𝑦𝑖.2 𝑦..2
𝑆𝑆𝐴 = −
𝑛𝑖 𝑁
𝑖=1

357.72 352.52 273.52 983.7 2


= + + − = 7.93
8 8 6 22

SSE = SST – SSA = 13.93 – 7.93 = 6.00

k = Number of treatment or factor levels.


Example cont’d

F= 12.56 > F.001,2,19 = 10.16


Thus the null hypothesis should be rejected at any reasonable
significance level; there is compelling evidence for concluding that a
true average elastic modulus somehow depends on which casting
process is used.
The F Distribution

Reject 𝐻0 if 𝐹 > 𝐹𝛼(𝜐1 ,𝜐2 )

Where 𝜐1 = 𝑘 – 1 and 𝜐2 =
𝑁– 𝑘
31
32
One-Way ANOVA- unequal sample size in Excel

33

You might also like