Presentation is loading. Please wait.

Presentation is loading. Please wait.

What if. . . You were asked to determine if psychology and sociology majors have significantly different class attendance (i.e., the number of days a person.

Similar presentations


Presentation on theme: "What if. . . You were asked to determine if psychology and sociology majors have significantly different class attendance (i.e., the number of days a person."— Presentation transcript:

1

2 What if. . . You were asked to determine if psychology and sociology majors have significantly different class attendance (i.e., the number of days a person misses class) You would simply do a two-sample t-test two-tailed Easy!

3 But, what if. . . You were asked to determine if psychology, sociology, and biology majors have significantly different class attendance You would do a one-way ANOVA

4 But, what if. . . You were asked to determine if psychology majors had significantly different class attendance than sociology and biology majors. You would do an ANOVA with contrast codes

5 But, what if. . . You were asked to determine the effects of both college major (psychology, sociology, and biology) and gender (male and female) on class attendance You now have 2 IVs and 1 DV You could do two separate analyses Problem: “Throw away” information that could explain some of the “error” Problem: Will not be able to determine if there is an interaction

6 Factorial Analysis of Variance
Factor = IV Factorial design is when every level of every factor is paired with every level of every other factor Psychology Sociology Biology Male X Female

7 Factorial Analysis of Variance
Currently Different people in each cell Equal n in each cell Psychology Sociology Biology Male X Female

8 Factorial Analysis of Variance
2 X 3 Factorial “2” is because one IV has 2 levels (male and female) “3” because one IV has 3 levels (psychology, biology, sociology) Psychology Sociology Biology Male X Female

9 Factorial Analysis of Variance
2 X 3 4 X 5 2 X 2 X 7

10 Notation One factor is A and the other is B Psychology Sociology
Biology Male Female

11 Notation One factor is A and the other is B B B1 B2 B3 A1 A2 A

12 Notation One factor is A and the other is B
Any combination of A and B is called a cell B B1 B2 B3 A1 A2 A

13 Notation One factor is A and the other is B
Any combination of A and B is called a cell The number of subjects in each cell = n B B1 B2 B3 A1 A2 A

14 Notation One factor is A and the other is B
Any combination of A and B is called a cell The number of subjects in each cell = n Each subject in a cell = Xij i = level of A; j = level of B B B1 B2 B3 A1 A2 A

15 Notation One factor is A and the other is B
Any combination of A and B is called a cell The number of subjects in each cell = n Each subject in a cell = Xij i = level of A; j = level of B B B1 B2 B3 A1 A2 A

16 Notation One factor is A and the other is B
Any combination of A and B is called a cell The number of subjects in each cell = n Each subject in a cell = Xijk i = level of A; j = level of B; k = observation in that cell B B1 B2 B3 A1 X111,X112 X113 X121,X122 X123 X131,X132 X133 A2 X211,X212 X213 X221,X222 X223 X231,X232 X233 A

17 Notation n = 3; N = nab = 18 The means for each of the cells are: B1
X111,X112 X113 X121,X122 X123 X131,X132 X133 A2 X211,X212 X213 X221,X222 X223 X231,X232 X233 A

18 Notation n = 3; N = nab = 18 The means for each of the cells are: B1
X11 X12 X13 A2 X21 X22 X23 A

19 Notation n = 3; N = nab = 18 The means for row (level of A): B1 B2 B3
X11 X12 X13 X1. A2 X21 X22 X23 X2.

20 Notation n = 3; N = nab = 18 The means for column (level of B): B1 B2
X11 X12 X13 X1. A2 X21 X22 X23 X2. X.1 X.2 X.3

21 Notation n = 3; N = nab = 18 The grand mean: B1 B2 B3 A1 X11 X12 X13

22 Sociology Psychology Biology Female 2.00 1.00 3.00 .00 Males 4.00
n = 3 N = 18

23 Sociology Psychology Biology Female 2.00 1.00 3.00 .00 Males 4.00
n = 3 N = 18

24 Sociology Psychology Biology Female 2.00 1.00 3.00 .00 Mean1j 2.67 1.67 Males 4.00 Mean2j 3.67 0.33

25 Sociology Psychology Biology Female 2.00 1.00 3.00 .00 Mean1j 2.67 1.67 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33

26 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j 2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33

27 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j 2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06

28 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 Main effect of gender

29 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 Main effect of major

30 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 Interaction between gender and major

31 Sum of Squares SS Total Computed the same way as before
The total deviation in the observed scores Computed the same way as before

32 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SStotal = (2-2.06)2+ (3-2.06) (1-2.06)2 = 30.94 *What makes this value get larger?

33 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SStotal = (2-2.06)2+ (3-2.06) (1-2.06)2 = 30.94 *What makes this value get larger? *The variability of the scores!

34 Sum of Squares SS A Represents the SS deviations of the treatment means around the grand mean Its multiplied by nb to give an estimate of the population variance (Central limit theorem) Same formula as SSbetween in the one-way

35 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SSA = (3*3) (( )2+ ( )2)=1.36 *Note: it is multiplied by nb because that is the number of scores each mean is based on

36 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SSA = (3*3) (( )2+ ( )2)=1.36 *What makes these means differ? *Error and the effect of A

37 Sum of Squares SS B Represents the SS deviations of the treatment means around the grand mean Its multiplied by na to give an estimate of the population variance (Central limit theorem) Same formula as SSbetween in the one-way

38 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SSB = (3*2) (( )2+ ( )2+ ( )2)= 14.16 *Note: it is multiplied by na because that is the number of scores each mean is based on

39 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SSB = (3*2) (( )2+ ( )2+ ( )2)= 14.16 *What makes these means differ? *Error and the effect of B

40 Sum of Squares SS Cells Represents the SS deviations of the cell means around the grand mean Its multiplied by n to give an estimate of the population variance (Central limit theorem)

41 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SSCells = (3) (( )2+ ( ) ( )2)= 24.35

42 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SSCells = (3) (( )2+ ( ) ( )2)= 24.35 What makes the cell means differ?

43 Sum of Squares SS Cells What makes the cell means differ? 1) error
2) the effect of A (gender) 3) the effect of B (major) 4) an interaction between A and B

44 Sum of Squares Have a measure of how much cells differ
SScells Have a measure of how much this difference is due to A SSA Have a measure of how much this difference is due to B SSB What is left in SScells must be due to error and the interaction between A and B

45 Sum of Squares SSAB = SScells - SSA – SSB 8.83 =

46 Sum of Squares SSWithin SSWithin = SSTotal – (SSA + SSB + SSAB)
The total deviation in the scores not caused by 1) the main effect of A 2) the main effect of B 3) the interaction of A and B SSWithin = SSTotal – (SSA + SSB + SSAB) 6.59 = – ( )

47 Sum of Squares SSWithin

48 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SSWithin = ((2-2.67)2+(3-2.67)2+(3-2.67)2) ((1-.33)2 + (0-.33)2 + ( )2 = 6.667

49 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SSWithin = ((2-2.67)2+(3-2.67)2+(3-2.67)2) ((1-.33)2 + (0-.33)2 + ( )2 = 6.667 *What makes these values differ from the cell means? *Error

50 Compute df Source df SS A 1.36 B 14.16 AB 8.83 Within 6.59 Total 30.94

51 Source df SS A 1.36 B 14.16 AB 8.83 Within 6.59 Total 17 30.94
dftotal = N - 1

52 Source df SS A 1 1.36 B 2 14.16 AB 8.83 Within 6.59 Total 17 30.94
dftotal = N – 1 dfA = a – 1 dfB = b - 1

53 Source df SS A 1 1.36 B 2 14.16 AB 8.83 Within 6.59 Total 17 30.94
dftotal = N – 1 dfA = a – 1 dfB = b – 1 dfAB = dfa * dfb

54 Source df SS A 1 1.36 B 2 14.16 AB 8.83 Within 12 6.59 Total 17 30.94
dftotal = N – 1 dfA = a – 1 dfB = b – 1 dfAB = dfa * dfb dfwithin= ab(n – 1)

55 Compute MS Source df SS A 1 1.36 B 2 14.16 AB 8.83 Within 12 6.59
Total 17 30.94

56 Compute MS Source df SS MS A 1 1.36 B 2 14.16 7.08 AB 8.83 4.42 Within
12 6.59 .55 Total 17 30.94

57 Compute F Source df SS MS A 1 1.36 B 2 14.16 7.08 AB 8.83 4.42 Within
12 6.59 .55 Total 17 30.94

58 Test each F value for significance
Source df SS MS F A 1 1.36 2.47 B 2 14.16 7.08 12.87 AB 8.83 4.42 8.03 Within 12 6.59 .55 Total 17 30.94 F critical values (may be different for each F test) Use df for that factor and the df within.

59 Test each F value for significance
Source df SS MS F A 1 1.36 2.47 B 2 14.16 7.08 12.87 AB 8.83 4.42 8.03 Within 12 6.59 .55 Total 17 30.94 F critical A (1, 12) = 4.75 F critical B (2, 12) = 3.89 F critical AB (2, 12) = 3.89

60 Test each F value for significance
Source df SS MS F A 1 1.36 2.47 B 2 14.16 7.08 12.87* AB 8.83 4.42 8.03* Within 12 6.59 .55 Total 17 30.94 F critical A (1, 12) = 4.75 F critical B (2, 12) = 3.89 F critical AB (2, 12) = 3.89

61 In SPSS

62 In SPSS Main Effects Easy – just like a one-way ANOVA

63 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j 2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06

64 In SPSS Interaction Does the effect of one IV on the DV depend on the level of another IV?

65 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 Want to plot out the cell means

66 Sociology Psychology Biology

67

68

69 Practice 2 x 2 Factorial Determine if 1) there is a main effect of A
2) there is a main effect of B 3) if there is an interaction between AB

70 Practice A: NO B: NO AB: NO

71 Practice A: YES B: NO AB: NO

72 Practice A: NO B: YES AB: NO

73 Practice A: YES B: YES AB: NO

74 Practice A: YES B: YES AB: YES

75 Practice A: YES B: NO AB: YES

76 Practice A: NO B: YES AB: YES

77 Practice A: NO B: NO AB: YES

78

79 Practice These are sample data from Diener et. al (1999). Participants were asked their marital status and how often they engaged in religious behavior. They also indicated how happy they were on a scale of 1 to 10. Examine the data

80 Frequency of religious behavior
Never Occasionally Often Married 6 3 7 2 8 4 5 9 Unmarried 1

81

82

83

84

85 Remember You were asked to determine the effects of both college major (psychology, sociology, and biology) and gender (male and female) on class attendance

86

87 Sociology Psychology Biology

88 Simple Effects The effect of one factor at one level on the other factor. Use to “tease apart” a significant interaction You wonder if college major has an effect on class attendance for just females? You wonder if male and female psychology students differ in their class attendance?

89 Sociology Psychology Biology

90 Sociology Psychology Biology

91 Sociology Psychology Biology

92 Sociology Psychology Biology

93 Sociology Psychology Biology

94 Sociology Psychology Biology

95 Simple Effects Why not just do 5 new analyses You will lose df!
2 ANOVAs 3 Independent Samples t-tests You will lose df! Type I error problem still exists

96 Sociology Psychology Biology

97 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 Are these means different?

98 Simple Effects SS Major at Female
Represents the SS deviations of the treatment means around the Female mean Its multiplied by n to give an estimate of the population variance (Central limit theorem) Same formula as SSbetween in the one-way

99 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SS M at Female = 3*((2.67 – 1.78)2 + (1.00 – 1.78)2 + (1.67 – 1.78)2 = 4.23

100 Note

101 Sociology Psychology Biology

102 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 Are these means different?

103 Simple Effects SS Major at Male
Same formula as SSbetween in the one-way

104 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SS M at Male = 3*((3.67 – 2.33)2 + (3.00 – 2.33)2 + (0.33 – 2.33)2 = 18.71

105

106 Sociology Psychology Biology

107 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 Are these means different?

108 Simple Effects SS Gender at Socio
Same formula as SSbetween in the one-way

109 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SS G at Socio = 3*((2.67 – 3.17)2 + (3.67 – 3.17)2 = 1.5

110

111 Sociology Psychology Biology

112 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 Are these means different?

113 Simple Effects SS Gender at Psych
Same formula as SSbetween in the one-way

114 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SS G at Psych = 3*((1.00 – 2.00)2 + (3.00 – 2.00)2 = 6.00

115

116 Sociology Psychology Biology

117 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 Are these means different?

118 Simple Effects SS Gender at Bio
Same formula as SSbetween in the one-way

119 Sociology Psychology Biology Mean Female 2.00 1.00 3.00 .00 Mean1j
2.67 1.67 1.78 Males 4.00 Mean2j Mean.j 3.67 3.17 0.33 2.33 2.06 SS G at Bio = 3*((1.67 – 1.00)2 + (0.33 – 1.00)2 = 2.69

120

121 Overall ANOVA Source df SS MS F Gender 1 1.36 2.47 Major 2 14.16 7.08
12.87* G x M 8.83 4.42 8.03* Within 12 6.59 .55 Total 17 30.94

122 Simple Effects Source df SS MS F Gender G at Socio G at Psych G at Bio
Major M at Female M at Male Within 12 6.59 .55

123 Simple Effects Source df SS MS F Gender G at Socio G at Psych G at Bio
1.50 6.00 2.69 Major M at Female M at Male 4.23 18.71 Within 12 6.59 .55

124 Simple Effects Source df SS MS F Gender G at Socio G at Psych G at Bio
dfA (Gender) = a – 1 dfB (Major) = b – 1 Simple Effects Source df SS MS F Gender G at Socio G at Psych G at Bio 1 1.50 6.00 2.69 Major M at Female M at Male 2 4.23 18.71 Within 12 6.59 .55

125 Simple Effects Source df SS MS F Gender G at Socio G at Psych G at Bio
Compute MS Simple Effects Source df SS MS F Gender G at Socio G at Psych G at Bio 1 1.50 6.00 2.69 Major M at Female M at Male 2 4.23 18.71 2.12 9.36 Within 12 6.59 .55

126 Simple Effects Source df SS MS F Gender G at Socio G at Psych G at Bio
Compute F Simple Effects Source df SS MS F Gender G at Socio G at Psych G at Bio 1 1.50 6.00 2.69 2.72 10.91 4.89 Major M at Female M at Male 2 4.23 18.71 2.12 9.36 3.85 17.02 Within 12 6.59 .55

127 Simple Effects Source df SS MS F Gender G at Socio G at Psych G at Bio
F critical (1, 12) = 4.75 F critical B (2, 12) = 3.89 Simple Effects Source df SS MS F Gender G at Socio G at Psych G at Bio 1 1.50 6.00 2.69 2.72 10.91* 4.89* Major M at Female M at Male 2 4.23 18.71 2.12 9.36 3.85 17.02* Within 12 6.59 .55

128 Sociology Psychology Biology

129

130 Practice ANOVA is from exercise 13.5 1) Interpret the ANOVA results
2) Plot the cell means 3) Compute an entire set of simple effects

131

132

133

134

135

136

137 Source df SS MS F Delay D at Neutral D at Area A D at Area B 2 1.20 254.80 304.53 0.60 127.40 152.26 .02 4.34* 5.19* Area A at D 50 A at D 100 A at D 150 357.74 363.33 6.93 178.87 181.67 3.47 6.10* 6.19* .12 Within 36 29.31


Download ppt "What if. . . You were asked to determine if psychology and sociology majors have significantly different class attendance (i.e., the number of days a person."

Similar presentations


Ads by Google