Week 6 Lecture-1
Week 6 Lecture-1
Week 6 Lecture
One-Way ANOVA
One-Way Analysis of Variance
Purpose of ANOVA
1. Determines whether the differences between the means of the groups are due to chance (sampling error).
2. Can be used with both experimental and ex post facto designs.
Experimental Research Designs
Researcher manipulates levels of Independent Variable to determine its effect on a Dependent Variable
Example
Dr. Sophie studies the effect of different dosages of a new drug on impulsivity among children at-risk of
becoming delinquent.
Example of an Experimental Research Design Using ANOVA -- continued
1. Independent Variable
A. Different dosages of new drug
a. 0 mg (placebo)
b. 100 mg
c. 200 mg
d. Measure impulsivity in each group, compare groups
Ex Post Facto Research Designs
Example
Dr. Horace wants to determine whether political party affiliation influences attitudes toward the death
penalty using a scale assessing attitudes.
Example of an Ex Post Facto Research Design Using ANOVA --
continued
1. Independent Variable
A. Political Party Affiliation
1. Democrat
2. Independent
3. Republican
4. Measure attitudes toward the death penalty in each group
5. No manipulation
Null and Alternative
Hypothesis in ANOVA
1. Dr. Mildred wants to determine whether birth order influences the number of self-reported delinquent
acts.
2. Independent Variable
A. Birth Order
1. First Born (or only child)
2. Middle Born (if three or more children)
3. Last Born
Example of Pairwise Comparisons -- continued
1. Dependent Variable
1. Number of self-reported delinquent acts
2. Possible pairwise comparisons
1. FB ≠ MB
2. FB ≠ LB
3. MB ≠ LB
3. It is possible for this analysis that:
1. Any one of the pairwise comparisons could be statistically significant
2. Any two of the pairwise comparisons could be statistically significant
3. All three of the pairwise comparisons could be statistically significant
Types of ANOVA
One-Way ANOVA
1. One Independent Variable
2. Groups are independent
Repeated-Measures ANOVA
1. Groups are dependent
2. Measure the dependent variable at more than two points in time
One-Way ANOVA
The one-way analysis of variance is used to test the claim that three or more population means are
equal.
This is an extension of the two independent samples t-test.
One-Way ANOVA
Conditions or Assumptions
The data are randomly sampled.
The variances of each sample are assumed equal.
The residuals are normally distributed.
One-Way ANOVA
H :
0 1 2 3 k
The null hypothesis is that the means are all equal
Total variability of the dependent variable (DV) can be analyzed by dividing it into its component parts.
This is done between groups (BG) and its aim is to measure the overall differences between treatment
conditions (groups, samples).
The variable between the groups is called the Treatment Effect (TE).
Within-Group (WG) Variability
Example
For race, there is more within group variability than between group variability (more genetic variation
among white, or Asians, etc, than between the races).
ANOVA Partitions Total Variation
Total variation
The statistics classroom is divided into three rows: front, middle, and back.
The instructor noticed that the further the students were from him, the more likely they were to miss
class or use an instant messenger during class.
He wanted to see if the students further away did worse on the exams.
One-Way ANOVA
H :
0 F M B
The ANOVA doesn’t test that one mean is less than another, only whether they’re all equal or at
least one is different.
One-Way ANOVA
Variation
Variation is the sum of the squares of the deviations between a value and the mean of the value.
Sum of Squares is abbreviated by SS and often followed by a variable in parentheses such as SS(B) or
SS(W) so we know which sum of squares we’re talking about.
One-Way ANOVA
The variation between the groups, SS(B), or the variation due to the factor.
The variation within the groups, SS(W), or the variation that can’t be explained by the factor so it’s called the error
variation.
One-Way ANOVA
Here is the basic one-way ANOVA table
Source SS df MS F p
Between
Within
Total
One-Way ANOVA
Grand Mean
The grand mean is the average of all the values when the factor is ignored.
It is a weighted average of the individual sample means.
The between group variation is the variation between each sample mean and the grand mean.
Each individual variation is weighted by the sample size.
SS B n x x n x x n x x
2 2 2
1 1 2 2 k k
SS B n x x
k 2
i i
i 1
One-Way ANOVA
After filling in the sum of squares, we have …
Source SS df MS F p
Between 1902
Within 3386
Total 5288
One-Way ANOVA
Degrees of Freedom, df
A degree of freedom occurs for each value that can vary before the rest of the values are predetermined.
For example, if you had six numbers that had an average of 40, you would know that the total had to be
240. Five of the six numbers could be anything, but once the first five are known, the last one is fixed so
the sum is 240. The df would be 6-1=5.
The df is often one less than the number of values.
One-Way ANOVA
Source SS df MS F p
Between 1902 2
Within 3386 21
Total 5288 23
One-Way ANOVA
Variances
The variances are also called the Mean of the Squares and abbreviated by MS, often with an accompanying variable
MS(B) or MS(W).
They are an average squared deviation from the mean and are found by dividing the variation by the degrees of
freedom
MS = SS / df.
Variation
Variance
df
One-Way ANOVA
Source SS df MS F p
Special Variances
The MS(Within) is also known as the pooled estimate of the variance since it is a
weighted average of the individual variances
Sometimes abbreviated
F test statistic
An F test statistic is the ratio of two sample variances
The MS(B) and MS(W) are two sample variances and that’s what we divide to find F.
F = MS(B) / MS(W)
For our data, F = 951.0 / 161.2 = 5.9
One-Way ANOVA
Adding F to the table …
Source SS df MS F p
Source SS df MS F p
The p-value is 0.009, which is less than the significance level of 0.05, so we reject the null
hypothesis.
The null hypothesis is that the means of the three rows in class were the same, but we reject that,
so at least one row has a different mean.
One-Way ANOVA
There is enough evidence to support the claim that there is a difference in the mean scores of the
front, middle, and back rows in class.
The ANOVA doesn’t tell which row is different, you would need to look at confidence intervals or run
post hoc tests to determine that.