Factorial Annova2
-
Upload
aayush-agrawal -
Category
Documents
-
view
223 -
download
0
Transcript of Factorial Annova2
ANOVA:Full FactorialPrepared By:106 Pranav Jain151 Aayush Agarwal
167 Surbhi Koshal506 Harsh Gupta
Terminology Response variable
Measured output value Factors
Input variables that can be changed Levels/Treatments
Specific values of factors (inputs) Replication
Completely re-run experiment with same input levels Used to determine impact of measurement error
Interaction Effect of one input factor depends on level of another input
factor
ANOVA Statistical technique used to investigate and model relationship between a response variable and one or more independent variables
Each independent variable is called as factor Each factor has two or more levels
Hypothesis H0: Population means of each level are equal H1: At least one of the level means are not all equal
Why use ANOVA instead of t test? ANOVA and two sample t test give identical result for mean with one factor and two levels
But real world modeling require more than one factor
Thus, ANOVA can simultaneously test several factors each with several levels
Steps in design of experiments1. Identify factors of interest and response
variable2. Determine appropriate levels of each
explanatory variable3. Determine design structure4. Randomize the order in which each set
conditions is run and collect the result data5. Organise the results to draw appropriate
conclusions
Factorial Design : Full factorial design A full factorial design of experiments consists of the following: Vary one factor at a time Perform experiments for all levels of all factors Hence perform a large number of experiments that are
needed! All interactions are captured
Consider a simple design for the following case: Let the number of factors = k Let the number of levels for the ith factor = ni
The total number of experiments (N) that need to be performed is
K
iinN
1
Factorial Essentials Notation System E.g. 2x3, 2 IV, one with 2 level, one with 3 and 6
total conditions• Factorial Matrix
2x2 presentation rate 2-sec/word 4-sec/word
type of Imagerytraining Rote
* Dependent variable: Words remembered by viewer
Main Effects Overall effect of an Independent Variable (IV) on a dependent variable
Main Effect Calculation Main effect of training effect = 20-15 = 5 Imagery produces better results than rote by 5 words
Main effect of presentation rate = 14.5-20.5 = -6 2-sec/word produces a worse result than 4-sec/word by -6
Interactions Teaching Style
Lab Lectures
Science Humanity
*No main effect is present in the above case“the size or direction of the simple main effect on DV of IV1 changing at various levels of IV2”
80 70
70 80
InteractionsMajor at Lab 80 70 = -10Major at Lects 70 80 = 10 Major at Science 80 70 = -10 Major at Humanity 70 80 = 10
Science Humanity65
70
75
80
85
Interaction Effects
Lab Lectures Mean
Interaction effect Interaction effect occurs when one factor effects the results differently depending upon the second factor
No interaction between exercise and drugs
0
2
4
6
8
10
12
A B C DExercise
Inte
nsity
Drug 1 Drug 2 Drug 3 Drug 4
0.0
5.0
10.0
15.0
20.0
25.0
30.0
A B C D
Exercise
Inte
nsity
Drug 1 Drug 2 Drug 3 Drug 4
Subtle Effect
0.0
1.0
2.0
3.0
4.0
5.0
6.0
7.0
8.0
A B C DExercise
Inte
nsity
Drug 1 Drug 2 Drug 3 Drug 4
Dramatic Interaction
Experiment
Experiment Information on the earnings of men and women for different occupations was collected. Suppose that the aim of the experiment is to investigate whether there were any differences between the weekly salaries ($) of men and women employed as computer programmers, contractors and doctors.
A sample of 10 men and 10 women was selected from each of the three occupations, and the weekly salary for each individual in the sample was recorded.
Considering 0.05 level of significance, we need to test for any significant effect due to occupation, gender and interaction.
Terminology Response variable
Weekly Income ($) Factors
A) Gender B) Occupation Levels
A) Male | Female B) Comp Programmer | Contractor | Doctor
Replication 60/(2x3) = 10 replications
Interaction Dependency of effect of gender on different occupations or Dependency of effect of occupations on different gender
Hypothesis Gender H0: Average salary for males and females are same. H1: Average salary for males and females are different. Occupation H0: Average salary for doctors, contractors and
computer programmers is same. H1: Average salary for doctors, contractors and
computer programmers is different. Interaction H0: There is no interaction effect taking place. H1: There is some interaction effect taking place.
Data Set
Between-Subjects Factors N
OccupationComp Programmer 20Contractor 20Doctor 20
Gender Female 30Male 30
Microsoft Excel Worksheet
Data SummaryDescriptive Statistics
Dependent Variable: Weekly SalaryOccupation Gender Mean Std.
Deviation N
Comp Programmer
Female 741.30 78.942 10Male 796.00 86.340 10Total 768.65 85.267 20
ContractorFemale 634.70 109.283 10Male 979.40 104.198 10Total 807.05 205.104 20
DoctorFemale 930.90 100.507 10Male 1046.90 91.001 10Total 988.90 110.674 20
TotalFemale 768.97 155.878 30Male 940.77 140.991 30Total 854.87 170.932 60
AnalysisTests of Between-Subjects Effects
Dependent Variable: Weekly SalarySource Type III Sum
of Squaresdf Mean
SquareF Sig. Partial Eta
Squared
Corrected Model 1230024.533a 5 246004.907 26.901 .000 .714
Intercept 43847821.067 1 43847821.0
674794.80
5 .000 .989
Occupation 553693.633 2 276846.817 30.273 .000 .529Gender 442728.600 1 442728.600 48.413 .000 .473Occupation * Gender 233602.300 2 116801.150 12.772 .000 .321
Error 493822.400 54 9144.859 Total 45571668.0
00 60
Corrected Total 1723846.933 59
a. R Squared = .714 (Adjusted R Squared = .687)
Profile Plots: Interaction EffectThe slopes for each level of occupation are different from each other, hinting at existence of interaction effects.Crossing of 2 lines (Programmer and Contractor) indicate significant effect on wages due to gender in the occupations.This might be attributed to the job requirements of the occupation
Profile Plots: Interaction EffectThe slopes for each level of occupation are different from each other, hinting at existence of interaction effects.Inverse movement of 2 lines (Programmer and Contractor) indicate significant effect on wages due to gender in the occupations.This might be attributed to the job requirements of the occupation
Conclusion Gender Reject H0 -> Average salary for males and females are different Occupation Reject H0 -> Average salaries for doctors, contractors and
computer programmers are different Interaction Reject H0 -> There is some interaction effect taking place between
gender and occupation
Thank You