0% found this document useful (0 votes)
7 views38 pages

ANOVA

The document provides an overview of ANOVA (Analysis of Variance), detailing its purpose in hypothesis testing, the computation of F-statistics, and decision-making based on p-values. It outlines the requirements for one-way and two-way ANOVA, including assumptions and procedures for conducting the tests, along with examples and post-hoc analysis methods. Additionally, it discusses repeated measures ANOVA and its advantages in controlling for extraneous variation among subjects.

Uploaded by

RODERICK BALCE
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)
7 views38 pages

ANOVA

The document provides an overview of ANOVA (Analysis of Variance), detailing its purpose in hypothesis testing, the computation of F-statistics, and decision-making based on p-values. It outlines the requirements for one-way and two-way ANOVA, including assumptions and procedures for conducting the tests, along with examples and post-hoc analysis methods. Additionally, it discusses repeated measures ANOVA and its advantages in controlling for extraneous variation among subjects.

Uploaded by

RODERICK BALCE
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/ 38

Inferential Statistics:

ANOVA
Roderick D. Balce
Learning Outcomes
At the end of the lesson, the students should
be able to:
1. explain the use of ANOVA in hypothesis
testing;
2. compute for F-statistic;
3. make decision about the null hypothesis
based on computed F statistic and p-value;
4. perform post-hoc analysis when indicated
Basic Statistical Tests
Two Groups Three or More Groups
One Correlation
Measure Related/ Related/
Sample Independent Independent analysis
Matched Matched
Interval/ z test Independent Paired One-way Repeated Pearson
Ratio samples samples ANOVA measures correlation
t-test t-test t-test Factorial ANOVA
ANOVA
Ordinal Kolmorov- Kolmorov- Wilcoxon Kruskal- Friedman Spearman
Smirnov Smirnov test signed Wallis one- two-way
test Mann- ranks test way ANOVA ANOVA by
Whitney U ranks
test
Nominal Chi-square Chi-square McNemar Chi-square Cochran Q Phi
test test change test for m x k test
Goodness k x 2 tables test tables
of fit
One-way analysis of variance
(ANOVA)
A method of testing the equality of three or
more population means by analyzing sample
variances.

Tests the hypothesis that three or more


population means are equal:
H0: µ1 = µ2 = µ3 = . . . µk
One-Way ANOVA (Between Subjects)
Requirements
1. The populations have approximately normal
distributions.
2. The populations have the same variance 
2

(or standard deviation  ).


3. The samples are simple random samples.
4. The samples are independent of each other.
5. The different samples are from populations
that are categorized with only one factor (or
treatment).
Procedure
Step 1: Hypotheses
H0: µ1 = µ2 = µ3 = . . . µk
H1: At least one mean is different
Step 2: Significance level
Step 3: Assumption checks
Normality
Homogeneity of variance
Step 4: Hypothesis test
Test statistic (F)
Critical value
P-value
Procedure
Step 5: Decision
If the P-value   or the F statistic ≥
critical value, reject the H0.
If the P-value >  or the F statistic <
critical value, do not reject the H0.

Step 6: Conclusion
When we reject the H0 we conclude that
not all population means are equal.
When we do not reject the H0 we
conclude that the population means
may all be equal.
Example:
Use the chest deceleration measurements
listed in the table below and a significance
level of  = 0.05 to test the claim that the three
samples come from populations with means
that are all equal.
Procedure
Step 1: Hypotheses
H0: µS = µM = µL
H1: At least one mean is different

Step 2: Significance level:  = 0.05

Step 3: Assumptions: QQ plot _________


Levene’s _____________
Step 4: Critical value:__________
Test statistic: ____________
p-value: ____________
Assumption Checks
QQ plot:

Test for Equality of Variances (Levene's)


F df1 df2 p
0.255 2.000 27.000 0.777
One-Way ANOVA Table
Source of SS df MS F ratio
Variation (Variance)
Between SSB
SSB k-1 MSB =
Groups k-1 MSB
F=
Within N - k or MS = SSW MSW
SSW W
Groups k(n - 1) N-k
SST =
Total N-1
SSB+SSW
MS Excel
ANOVA
Source of Variation SS df MS F P-value F crit
Between Groups 162.867 2 81.433 4.094 0.028 3.354
Within Groups 537 27 19.889
Total 699.867 29

JASP
ANOVA - Deceleration
Cases Sum of Squares df Mean Square F p
Car size 162.867 2 81.433 4.094 0.028
Residuals 537.000 27 19.889
Step 5: Decision: _______________________
Step 6: Conclusion:
There is __________ evidence to
_________ the claim that the three
samples come from populations with
means that are all equal.
Post Hoc Analysis:
Identifying Means That Are Different
Tukey’s HSD Test
Mean
SE t p tukey
Difference
Small Medium 2.600 1.994 1.304 0.405
Large 5.700 1.994 2.858 0.021
Medium Large 3.100 1.994 1.554 0.282
Example:
The display shows that the mean for Sample 1
(small cars) is significantly different from the
mean for Sample 3 (large cars). Based on
post hoc analysis, it appears that the
measurements from small cars have a mean
that is significantly different from the mean
for large cars.
Fundamental Concepts
Assuming that the populations have the same
variance 2 (as required for the test), the F test
statistic is the ratio of these two estimates of 2:
(1) variance between samples (based on
variation among sample means); and
(2) variance within samples (based on the
sample variances).
Fundamental Concepts

Test Statistic for One-Way ANOVA

variance between samples


F= variance within samples
Fundamental Concepts
F-Distribution

An excessively
large F test statistic
is evidence against
equal population
means.
F Test Statistic and P-Value
Sample Calculations
Two-Way
Analysis of Variance
Involves two factors and the data are partitioned
into subcategories called cells.

There is an interaction between two factors if


the effect of one of the factors changes for
different categories of the other factor.
Same requirements as one-way except that this
time, the sample values are categorized two
ways.
Procedure
Step 1: Hypotheses
H0 (interaction effect):

H0 (row factor effect):

H0 (column factor effect):

Step 2: Significance level


Step 3: Assumption checks
Step 4: Test statistic (F)
P-value
Step 5: Decision and Conclusion
Example:
Given the chest deceleration measurements
below, use two-way ANOVA to test for an
interaction effect, an effect from the row factor
of type of car, and an effect from the column
factor of car size. Use a 0.05 significance level.
Step 1: Interaction Effect

 No interaction:  Interaction:
line segments are line segments
approximately parallel intersect

Block Level 1
Block Level 1
Mean Response

Mean Response
Block Level 3

Block Level 2
Block Level 2
Block Level 3

A B C A B C
Groups Groups
Step 1: Interaction Effect

MS(interaction) 7.389
F   0.34
MS(error) 21.611

Critical value: ________ p-value = _______


Decision: ______________________________
Step 2: Row/Column Effects
MS(type) 117.556
Row Factor: F   5.44
MS(error) 21.611
Critical value: ________ p-value = _______
Decision: ______________________________

MS(size) 77.389
Column Factor: F   3.58
MS(error) 21.611

Critical value: ________ p-value = _______


Decision: ______________________________
Two-Way ANOVA
Summary Table

Source of Sum of Degrees of Mean F


Variation Squares Freedom Squares Statistic

Between MSB
SSB h–1 MSB = SSB / (h – 1)
blocks MSE
Between MSG
SSG k–1 MSG = SSG / (k – 1)
groups MSE
MSI
Interaction SSI (k – 1)(h – 1) MSI = SSI / (k – 1)(h – 1)
MSE
Error SSE kh(l – 1) MSE = SSE / kh(l – 1)

Total SST n–1


Sum of Mean
Cases df F p
Squares Square
Car_type 117.556 1 117.556 5.440 0.038
Car_size 154.778 2 77.389 3.581 0.060
Car_type ✻ Car_size 14.778 2 7.389 0.342 0.717
Residuals 259.333 12 21.611

Step 3: Conclusion
We conclude that chest deceleration
measurements appear to be affected by
whether the car is foreign or domestic, but
those measurements do not appear to be
affected by the size of the car.
Repeated Measures
Analysis of Variance
A paired comparisons design in which
measurements of the same variable are made
on each subject on two or more different
occasions.

Has major advantage of being able to control


for extraneous variation among subjects.
One-way Repeated Measures
ANOVA
Requirements
1. The subjects under study constitute a simple
random sample.
2. The distribution of the dependent variable in
the related groups should be approximately
normally distributed.
3. The order in which the subjects are exposed to
the treatments is random, and randomization is
carried out independently for each subject.
4. The related groups must display sphericity.
Example:
In a study of 18 subjects with chronic, non-
specific low back pain, a survey questionnaire
was used to assess physical functioning at
baseline, and after 1, 3, and 6 months. Higher
values indicate better physical functioning.
The goal of the experiment was to determine if
subjects would report improvement over time
even though the treatment they received would
provide minimal improvement. We wish to
know if there is a difference in the mean survey
values among the four points in time.
Repeated Measures ANOVA
Summary Table
Source of Sum of Degrees of Mean F
Variation Squares Freedom Squares Statistic
Between MSG
SSG k–1 MSG = SSG / (k – 1)
groups MSE

Error SSE (k – 1)(N – 1) MSE = SSE / (k – 1)(N – 1)

Cases Sum of Squares df Mean Square F p

Time 2395.833 3 798.611 5.501 0.002

Residuals 7404.167 51 145.180


Repeated Measures ANOVA with Sphericity Correction

Sphericity Sum of Mean


Cases df F p
Correction Squares Square
Time None 2395.833ᵃ 3ᵃ 798.611ᵃ 5.501ᵃ 0.002ᵃ

Huynh-Feldt 2395.833 2.563 934.701 5.501 0.004


Residuals None 7404.167 51 145.180

Huynh-Feldt 7404.167 43.575 169.919

ᵃ Mauchly's test of sphericity indicates that the assumption of


sphericity is violated (p < .05).
Procedure
Step 1: Hypotheses
H0: µB = µM1 = µM3 = µM6
H1: At least one mean is different
Step 2: Significance level: _______
Step 3: Assumption checks
Step 4: Critical value: ________
Test statistic: ________
p-value: ________
Step 5: Decision and Conclusion
Reject the null hypothesis and conclude
that there is a difference in the four
population means.
Post Hoc Comparisons

Mean Difference SE t p bonf


Baseline Month.1 2.500 4.016 0.622 1.000
Month.3 -11.667 4.016 -2.905 0.033
Month.6 -8.056 4.016 -2.006 0.301
Month.1 Month.3 -14.167 4.016 -3.527 0.005
Month.6 -10.556 4.016 -2.628 0.068
Month.3 Month.6 3.611 4.016 0.899 1.000

You might also like