F formula F = Variance (differences) between sample means Variance (differences) expected from...
description
Transcript of F formula F = Variance (differences) between sample means Variance (differences) expected from...
F = Variance (differences) between sample means
Variance (differences) expected from sampling error
No Audience AudienceX = 5 X = 7
Self-Esteem
Low HighX = 9 X = 3
No Audienc
eAudienc
e
High
Low
No Audienc
eAudienc
e
High X = 3 X = 3
Low X = 7 X = 11
No Audienc
eAudienc
e
High X = 3 X = 3
Low X = 7 X = 11
X = 5 X = 7
No Audienc
eAudienc
e
High X = 3 X = 3 X = 3
Low X = 7 X = 11 X = 9
X = 5 X = 7
High Low
10
8
6
4
2
Mean
Num
ber
of E
rror
s
No Audience
Audience
Single Independent VariableDependent Variable
Single Factor - One-way ANOVA
Now:
Two Independent Variables Dependent Variable
Two Factor ANOVA
Factor B (class size)18-student
class24-student
class30-student
class
Factor A
(program)
Program I
Scores for n = 15
subjects taught by program I in a class
of 18
Scores for n = 15
subjects taught by program I in a class
of 24
Scores for n = 15
subjects taught by program I in a class
of 30
Program II
Scores for n = 15
subjects taught by program II in a class
of 18
Scores for n = 15
subjects taught by program II in a class
of 24
Scores for n = 15
subjects taught by program II in a class
of 30
Two-factor analysis of variance permits us to
test:1. Mean difference between the
2 teaching programs
2. Mean differences between the 3 class sizes
3. Combinations of teaching program and class size
Three separate hypothesis tests in
one ANOVAThree F-ratios:
F = Variance (differences) between sample means
Variance (differences) expected from sampling error
18-student class
24-student class
30-student class
Program I X = 85 X = 77 X = 75 X = 79
Program II X = 75 X = 67 X = 65 X = 69
X = 80 X = 72 X = 70
Factor A Teaching Program
€
Ho : μ A1 = μ A2
€
H1 : μ A1 ≠ μ A2
(Teaching program has no effect on math scores)(Teaching program has an effect on math scores)
F =
Variance (differences) between treatment means
for Factor AVariance (differences) expected from sampling
error
18-student class
24-student class
30-student class
Program I X = 85 X = 77 X = 75 X = 79
Program II X = 75 X = 67 X = 65 X = 69
X = 80 X = 72 X = 70
Factor B Class Size
€
Ho : μ B1 = μ B2 = μ B3
€
H1 :
(Class size has no effect on math scores)(Class size has an effect on math scores)
F =
Variance (differences) between treatment means
for Factor BVariance (differences) expected from sampling
error
At least one population mean is different
18-student class
24-student class
30-student class
Program I X = 85 X = 77 X = 75 X = 79
Program II X = 75 X = 67 X = 65 X = 69
X = 80 X = 72 X = 70
18-student class
24-student class
30-student class
Program I X = 80 X = 77 X = 80 X = 79
Program II X = 80 X = 67 X = 60 X = 69
X = 80 X = 72 X = 70
18
Students
9085807570
Mean
mat
h te
st s
core
s
24 Students
30 Students
6560
Program I
Program II
18 Students
24 Students
30 Students
9085807570
Mean
mat
h te
st s
core
s
6560
Program I
Program II
Thus two-factor AVOVA composed of 3 distinct
hypothesis tests:1. The main effect of A (called the A-
effect)
2. The main effect of B (called the B-
effect)
3. The interaction (called the AxB
interaction)
(a) Data showing a main effect for factor A, but no B-effect and no
interaction
B1 B2
A1 20 20 A1 mean = 20
A2 10 10 A2 mean = 10
B1 mean = 15
B2 mean = 15
No difference
10-point difference
(b) Data showing a main effects for both factor A and factor B, but
no interaction
B1 B2
A1 10 30 A1 mean = 20
A2 20 40 A2 mean = 30
B1 mean = 15
B2 mean = 35
20-point difference
10-point difference
(c) Data showing no main effect for either factor A or factor B,
but an interaction
B1 B2
A1 10 20 A1 mean = 15
A2 20 10 A2 mean = 15
B1 mean = 15
B2 mean = 15
No difference
No difference
Interaction
H0 : There is no interaction between factors A and B.
H1 : There is an interaction between factors A and B.
OR
H0 : The effect of factor A does not depend on the levels of factor B (and B does not depend on A).H1 : The effect of one factor does depend on the levels of
the other factor (and B does not depend on A).
F = Variance (differences) not explained by main effects
Variance (differences) expected from sampling error
Between Treatment Variability1. Treatment (factor A, B, or AxB
interaction)2. Individual differences (difference
of SS in each treatment condition)3. Experimental error
Variability Within Treatments (Chance)1. Individual differences2. Experimental error
F = Treatment effect + Individual Differences + Experimental Error
Individual Differences + Experimental Error
Treatment (Cell) Combinations
Factor BLevel B1 Level B2 Level B3
Factor A
Level A1
Treatment (cell)A1B1
Treatment (cell)A1B2
Treatment (cell)A1B3
Level A2
Treatment (cell)A2B1
Treatment (cell)A2B2
Treatment (cell)A2B3
Total Variability
Within-treatments Variability
Between-treatments Variability
Factor AVariability
Factor BVariability
InteractionVariability
Stage 2
Stage 1
Factor B
B1 B2 B3
Factor A
A1
16111
AB = 10SS = 20
771146
AB = 35SS = 26
31164
AB = 15SS = 18
A1 = 60
A2
03755
AB = 20SS = 28
00050
AB = 5SS = 20
02003
AB = 5SS = 8
A2 = 30
B1 = 30 B2 = 40 B3 = 20N = 30G = 90
∑x2 = 520
Factor B
B1 B2 B3
Factor A
A1
16111
AB = 10SS = 20
771146
AB = 35SS = 26
31164
AB = 15SS = 18
A1 = 60
A2
03755
AB = 20SS = 28
00050
AB = 5SS = 20
02003
AB = 5SS = 8
A2 = 30
B1 = 30 B2 = 40 B3 = 20N = 30G = 90
∑x2 = 520
€
X = 2
€
X = 7
€
X = 3
€
X = 4
€
X =1
€
X =1
2 - Factor Data Table w/ Cell Means & Marginal Means
Factor B
B1 B2 B3
Factor A
A1
16111
AB = 10SS = 20
771146
AB = 35SS = 26
31164
AB = 15SS = 18
A1 = 60
A2
03755
AB = 20SS = 28
00050
AB = 5SS = 20
02003
AB = 5SS = 8
A2 = 30
B1 = 30 B2 = 40 B3 = 20N = 30G = 90
∑x2 = 520
€
X = 2
€
X = 7
€
X = 3
€
X = 4
€
X =1
€
X =1
€
X A1 = 4
€
X A2 = 2
€
X B1 = 2
€
X B3 = 2
€
X B2 = 4
Breakdown of Variability Sources
and Formulas
InteractionSS found by subtraction
= 80
Stage 2
Stage 1
Total
€
SS = X 2∑ −G2
N = 250
Between Treatments
€
SS = AB2
n∑ −G
2
N =130
Within Treatments
€
SS = SSeach cell∑ =120
Factor A
€
SS = A2
bn∑ −G
2
N = 30
Factor B
€
SS = B2
an∑ −G
2
N = 20
Breakdown of Degrees of Freedom and
Formulas
Interactiondf = dfA x dfB
= 2
Stage 2
Stage 1
Totaldf = N - 1
= 29
Between Treatmentsdf = ab - 1
= 5
Within Treatmentsdf = N - ab
= 24
Factor Adf = a - 1
= 1
Factor Bdf = b - 1
= 2
Breakdown of both Degrees of Freedom and
SS Formulas
InteractionSS is found bysubtraction
df = (a - 1)(b - 1)
Stage 2
Stage 1
Total
df = N - 1
Between Treatments
df = ab - 1
Within Treatments
df = N - ab
Factor A
df = a - 1
Factor B
df = b - 1
€
SS = X 2∑ −G2
N
€
SS = AB2
n∑ −G
2
N
€
SS = SSeach cell∑
€
SS = A2
bn∑ −G
2
N
€
SS = B2
an∑ −G
2
N
0 1 2 3 4 5 6
0 1 2 3 4 5 6
4.26
3.40
Distribution of F-ratiosdf = 2.24
Distribution of F-ratiosdf = 1.24
Source SS df MS F p < .05
Between Treatments 130 5
Factor A (program)
30 1 30 F(1,24)= 6.0
√
Factor B (class size)
20 2 10 F(1,24)= 2.0
n.s.
AxB Interaction
80 2 40 F(1,24)= 8.0
√
Within Treatments 120 24 5
Total 250 29
Plot of the mean scores of Factor A and
B
7
6
5
4
3
2
1
0B1 B2 B3
Factor B
Mean
sco
re
A2
A1
Schacter (1968)Obesity and Eating Behavior
• Hypothesis: obese individuals do not respond to internal biological signals of hunger
Variables• 2 Independent Variables or Factors– Weight (obese vs. normal)– Fullness (full stomach vs. empty stomach)
• Dependent Variable– Number of crackers eaten by each subject
Factor B (fullness)
Empty Full
Factor A
(weight)
Normal n = 20 n = 20
Obese n = 20 n = 20
Factor B (fullness)
EmptyStomach
Full Stomach
Factor A
(weight)
Normal
n = 20X = 22
AB = 440SS = 1540
n = 20X = 15
AB = 300SS = 1270
A1 = 740
Obese
n = 20X = 17
AB = 340SS = 1320
n = 20X = 18
AB = 360SS = 1266
A2 = 700
B1 = 780 B2 = 660
G = 1440x2 = 31,836N = 80
Source SS df MS F p < .05
Between Treatments
520 3
Factor A (weight)
20 1 20 F(1,76)= 0.28
n.s.
Factor B (fullness)
180 1 180 F(1,76)= 2.54
n.s.
AxB Interaction
320 1 320 F(1,76)= 4.51
√
Within Treatments 5396 76 71
Total 5916 79
Plot of mean number of crackers eaten for
each group
Empty Full
Normal 22 15
Obese 17 18
Mean Number of Crackers Eaten
14151617181920212223
Mean Number of Crackers
Eaten
EmptyStomach
FullStomach
Obese
Normal
Graph of Schacter 1
Mean Number of Crackers Eaten as Function of Weight anf Fullness
0
5
10
15
20
25
Empty FullFullness
Mean Number of Crackers Eaten
NormalObese
Empty FullNormal 22 15Obese 17 18
Schacter Graph 2
Mean Number of Crackers Eaten as a Function of Weight and Fullness
0
5
10
15
20
25
Normal ObeseWeight
Mean Number of Crackers Eaten
EmptyFull
Normal ObeseEmpty 22 17Full 15 18
The means and standard deviations are presented in Table 1. The two-factor analysis of variance showed no significant main effect for the weight factor, F(1,76) = 0.28, p > .05; no significant main effect for the fullness factor, F(1,76) = 2.54, p > .05; but the interaction between weight and fullness was significant, F(1,76) = 4.51, p < .05.Mean number of crackers eaten in each
treatment conditionFullness
Empty Stomach
Full Stomach
WeightNormal
M = 22.0SD = 9.00
M = 15.0SD = 8.18
ObeseM = 17.0SD = 8.34
M = 18.0SD = 8.16
TABLE 1
Treatment 1
Treatment 2
3 53 41 32 51 Males 37 Females 77 75 86 95 9
T1 = 40 T2 = 60SS1 = 48 SS2 = 48
Data table for Treatment 1 vs. 2 & M
vs. FFactor A (Treatment)
Treatment 1 Treatment 2
Factor B
(Sex)
Males
33121
AB = 10SS = 4
54353
AB = 20SS = 4
B1 = 30
Females
77565
AB = 30SS = 4
77899
AB = 40SS = 4
B2 = 70
A1 = 40 A2 = 60
Assumptions for the 2-factor ANOVA:
(Independent Measures)1. Observations within each sample are
independent
2. Populations from which the samples are drawn are normal
3. Populations from which the samples are selected must have equal variances (homogeneity of variance)