0% found this document useful (0 votes)
69 views46 pages

Lecture14 OneWayANOVA

The document describes how to use a one-way ANOVA to compare the effectiveness of three therapy types (general counseling, systematic desensitization, and counter conditioning) in treating phobias. A one-way ANOVA allows comparison of more than two groups with one independent variable. It partitions the total variance into variance between groups and variance within groups to determine if the group means differ more than would be expected by chance. The example calculates sums of squares, degrees of freedom, mean squares, and F-ratio to conduct the one-way ANOVA analysis.

Uploaded by

Mutai Victor
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views46 pages

Lecture14 OneWayANOVA

The document describes how to use a one-way ANOVA to compare the effectiveness of three therapy types (general counseling, systematic desensitization, and counter conditioning) in treating phobias. A one-way ANOVA allows comparison of more than two groups with one independent variable. It partitions the total variance into variance between groups and variance within groups to determine if the group means differ more than would be expected by chance. The example calculates sums of squares, degrees of freedom, mean squares, and F-ratio to conduct the one-way ANOVA analysis.

Uploaded by

Mutai Victor
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 46

One-way ANOVA

Research Question
• What type of therapy is most
effective in curing phobias?
– General counseling
– Systematic desensitization
– Counter conditioning
Comparing 3 (or more) groups
• The IV is nominal (3 categories)
– Regression requires an ordered (ordinal) IV
so we can’t use that
Comparing 3 (or more) groups
• The IV is nominal (3 categories)
– Regression requires an ordered (ordinal) IV
so we can’t use that
– If we used a t-test, we would have to do
three comparisons:
• General counseling vs. Systematic
desensitization
• General counseling vs. Counter conditioning
• Systematic desensitization vs. counter
conditioning
– What’s the problem with this?
Comparing 3 (or more) groups:
Problem with t-test approach
• Whenever you do more than one
comparison in an experiment, you increase
the chance of a Type I error
– If we used the t-test approach, we would
compare
• μ1 & μ2 with α = .05
• μ2 & μ3 with α = .05
• μ1 & μ3 with α = .05
– So you would end up with an experiment-wise
error rate of .05*3 = .15
– Increasing the number of groups makes this
much worse
One-way ANOVA
• A “one-way ANOVA” is an
experimental design with one
independent variable that represents
more than 2 levels of groups
One-way ANOVA
• A “one-way ANOVA” is an experimental
design with one independent variable
that represents more than 2 levels or
groups
One-way ANOVA
• A “one-way ANOVA” is an experimental
design with one independent variable
that represents more than 2 levels or
groups
– The IV in an ANOVA is called a factor
• E.g., Type of therapy, grade level in school (2nd,
3rd, or 4th), dosage of a drug (0mg, 100mg, 500
mg)
One-way ANOVA
• A “one-way ANOVA” is an experimental
design with one independent variable
that represents more than 2 levels or
groups
– The IV in an ANOVA is called a factor
• E.g., Type of therapy, grade level in school (2nd,
3rd, or 4th), dosage of a drug (0mg, 100mg, 500
mg)
• “ANOVA” stands for “analysis of variance”
Analysis of Variance
• When you break up people into groups
(e.g., types of therapy), there are two
sources of variance that are important
Analysis of Variance
• When you break up people into groups
(e.g., types of therapy), there are two
sources of variance that are important
– Variance within each group
• Even in the same type of therapy, people will
differ on how much improvement they make (for
reasons we don’t know about)
• This is the noise
Analysis of Variance
• When you break up people into groups
(e.g., types of therapy), there are two
sources of variance that are important
– Variance within each group
• Even in the same type of therapy, people will differ on
how much improvement they make (for reasons we
don’t know about)
• This is the noise
– Variance between each group
• We are really interested in the differences between the
groups– does one group improve more than the other
two?
• The variance between the groups is our “signal”
Analysis of Variance
• In some ways, ANOVA should be called
“analysis of sums of squares”
– SStotal = Ssbetween-groups + SSwithin-groups
• The point is to parse out how much of the
variance is happening between the
groups (signal that the group is making a
difference), and how much is happening
within the group (random error, or noise)
The ANOVA Table
Source SS df MS F p
Between
group
Within
group
Total
• What type of therapy is most effective in
curing phobias?
– We randomly assigned 15 people to 3 groups
– After therapy, they take a phobia assessment

Counseling Desensitization Counter conditioning

11 7 4

13 5 5

10 5 6

8 5 7

13 8 3
Counseling Desensitization Counter conditioning
11 7 4
13 5 5
10 5 6
8 5 7
13 8 3

• The mean of the total sample (all 3


groups) is called the “grand mean”
– Mgrand = 7.33
• The sum of all the scores in the total
sample (ΣX) is denoted TT
– TT = 110
Total variance
• We can start by quantifying all
variance, ignoring the group
– We can find the total sum of squares by
looking at how each score deviates from
the grand mean….
GROUP SCORE X-Xgrand (X-Xgrand)2
C 11
13
10
8
13
D 7
5
5
5
8
CC 4
5
6
7
3
SUM 110
GROUP SCORE X-Xgrand (X-Xgrand)2
C 11 11-7.33 = 3.67
13
10
8
13
D 7
5
5
5
8
CC 4
5
6
7
3
SUM 110
GROUP SCORE X-Xgrand (X-Xgrand)2
C 11 11-7.33 = 3.67 3.67*3.67=13.47
13
10
8
13
D 7
5
5
5
8
CC 4
5
6
7
3
SUM 110
GROUP SCORE X-Xgrand (X-Xgrand)2
C 11 11-7.33 = 3.67 3.67*3.67=13.47
13 5.67 32.15
10 2.67 7.13
8 0.67 0.45
13 5.67 32.15
D 7 -0.33 0.11
5 -2.33 5.43
5 -2.33 5.43
5 -2.33 5.43
8 0.67 0.45
CC 4 -3.33 11.09
5 -2.33 5.43
6 -1.33 1.77
7 -0.33 0.11
3 -4.33 18.75
SUM 110 0 139.33
GROUP SCORE X-Xgrand (X-Xgrand)2
C 11 11-7.33 = 3.67 3.67*3.67=13.47
13 5.67 32.15
10 2.67 7.13
8 0.67 0.45
13 5.67 32.15
D 7 -0.33 0.11
5 -2.33 5.43
5 -2.33 5.43
5 -2.33 5.43
8 0.67 0.45
CC 4 -3.33 11.09
5 This is
-2.33 5.43 called
6 -1.33 1.77 the
7 total
-0.33 0.11
sum of
3 -4.33 18.75 squares
SUM 110 139.33
SStotal = SSbetween-groups + SSwithin-groups
And now we know…
139.33 = SSbetween-groups + SSwithin-groups
The ANOVA Table
Source SS df MS F p
Between
group
Within
group
Total 139.33
SStotal = SSbetween-groups + SSwithin-groups
And now we know…
110 = SSbetween-groups + SSwithin-groups

Next, we can find the between-group sum of


squares…
It is how much the mean of each group
deviates from the grand mean:

SSb = Σni(Mi –Mgrand)2


Counseling Desensitization Counter conditioning

11 7 4

13 5 5

10 5 6

8 5 7

13 8 3
Mean 11 6 5

Grand mean = 7.33

Group 1 deviation from grand mean: 11-7.33 = 3.67


Group 2 deviation from grand mean: 6-7.33 = -1.33
Group 3 deviation from grand mean: 5-7.33 = -2.33

SSb = 5(3.67)2 + 5(-1.33)2 + 5(-2.33)2 = 103.33


SStotal = SSbetween-groups + SSwithin-groups

And now we know…


139.33 = SSbetween-groups + SSwithin-groups

And now we know…


139.33 = 103.33 + SSwithin-groups
The ANOVA Table
Source SS df MS F p
Between 103.33
group
Within
group
Total 139.33
SStotal = SSbetween-groups + SSwithin-groups

And now we know…


139.33 = SSbetween-groups + SSwithin-groups

And now we know…


139.33 = 103.33 + SSwithin-groups

So SSwithin-groups= 139.33 – 103.33 = 36


The ANOVA Table
Source SS df MS F p
Between 103.33
group
Within 36
group
Total 139.33
Degrees of freedom
• Let’s keep thinking in terms of “between
group” and “within group”
• For the degrees of freedom
– Between the groups, it is the number of
groups minus 1
• k – 1 where k is the number of groups
– Within the groups, we lose one df for each
group
• It is the total number of people minus the
number of groups
• NT – k, where NT is the total number of people
The ANOVA Table
Source SS df MS F p
Between 103.33 k-1 = 3-1 = 2
group
Within 36 NT – k = 15-3 = 12
group
Total 139.33 NT – 1 = 15-1 = 14
The ANOVA Table
Source SS df MS F p
Between 103.33 k-1 = 3-1 = 2
group
Within 36 NT – k = 15-3 = 12
group
Total 139.33 NT – 1 = 15-1 = 14

SS_total = SS_between + SS_within

df_total = df_between + df_within


Mean Square
• The mean square is just the variance
– Unbiased, which means we use the
degrees of freedom to divide the sum of
squares by
• Again we have a mean square for the
between group and for the within
group
The ANOVA Table
Source SS df MS F p
Between 103.33 2 SSbet/df_bet =
group 103.33/2 =
51.67
Within 36 12 SSw/df-w =
group 36/12 = 3
Total 139.33 14
The ANOVA Table
Source SS df MS F p
Between 103.33 2 103.33/2 =
group 51.67
Within 36 12 36/12 = 3
group
Total 139.33 14 ---

Note that we don’t compute the “mean square


total”... The variances are not additive here. If we
SS-total/df-total, that would be an estimate of the
total variance in the sample (ignoring group), but it
is not important
The F-Statistic
• The test statistic for an ANOVA is
called an “F-statistic”
– It comes from a distribution that is the
squared t-distribution
• It can never be negative
• The F-statistic is the ratio of the
variance from the between groups to
the variance from within the groups
• F = MSb/MSw
The ANOVA Table
Source SS df MS F p
Between 103.33 2 51.67 MSb/MSw =
group 51.67/3 =
17.22
Within 36 12 3
group
Total 139.33 14
The F-table
• The rows and columns of the F-table
are separated by degrees of freedom
between (or number of groups) and
degrees of freedom within (or total
people minus number of groups)
The ANOVA Table
Source SS df MS F p
Between 103.33 2 51.67 51.67/3 =
group 17.22
Within 36 12 3
group
Total 139.33 14

To test for significance, we need to find the


critical value of F(2,12)

Looking in the table, we find F(2,12) = 3.89


Test for significance
• We obtained F(2,12) = 17.22
• The critical F (alpha = .05) is 3.89

• Because our F is bigger than the


critical F, we can reject the null
hypothesis that there are no
differences between the groups
The ANOVA Table
Source SS df MS F p
Between 103.33 2 51.67 17.22 < .05
group
Within 36 12 3
group
Total 139.33 14
We rejected the null
• The null is: μ1 = μ2 = μ3
• What does it mean to reject it?
– All it means is that the 3 groups are not
exactly the same…
– It means that there is some difference
• But we don’t know which groups differ from
each other (yet)
Counseling Desensitization Counter conditioning

11 7 4

13 5 5

10 5 6

8 5 7

13 8 3
Mean 11 6 5

It seems likely that the counseling group is different and that


the other two are not… but we need new methods to formally
test this…
We need to learn about multiple
comparisons to find out which groups are
different…

You might also like