two way anova ©2005 dr. b. c. paul. anova application anova allows us to review data and determine...
TRANSCRIPT
ANOVA ApplicationANOVA Application
ANOVA allows us to review data and ANOVA allows us to review data and determine whether a particular effect is determine whether a particular effect is changing our resultschanging our results We tried the Red Rooster Carburetor on We tried the Red Rooster Carburetor on
different types of cars and found that the type of different types of cars and found that the type of car used made little difference compared to car used made little difference compared to other things.other things.
Sometimes we are interested in more than Sometimes we are interested in more than one possible causeone possible cause Remember too that we are only determining Remember too that we are only determining
whether an effect is important relative to other whether an effect is important relative to other thingsthings
A big unaccounted for variable can mask A big unaccounted for variable can mask everything elseeverything else
Fuel Economy Improvement of Fuel Economy Improvement of Red Rooster Does not appear to Red Rooster Does not appear to be car dependentbe car dependent How about Driver DependentHow about Driver Dependent
We could keep on going and testing one We could keep on going and testing one effect at a timeeffect at a time
That could get pretty longThat could get pretty long Remember too that any effect not Remember too that any effect not
accounted for is treated as a random accounted for is treated as a random variationvariation
Random variation goes in the denominator Random variation goes in the denominator of the F testof the F test
The larger the “random” variation the harder The larger the “random” variation the harder it is to see a major effectit is to see a major effect
One Solution is ANOVA on more One Solution is ANOVA on more than one variable at a timethan one variable at a time
Our CaseOur Case
Suppose we had our 10 drivers drive each Suppose we had our 10 drivers drive each of the first four cars four times, twice of the first four cars four times, twice without the RR carburetor and twice with.without the RR carburetor and twice with. Suppose we paired the results before and after Suppose we paired the results before and after
and calculated % improvementand calculated % improvement The scatter in the data can now be viewed The scatter in the data can now be viewed
asas Total Scatter = Difference by type of car + Total Scatter = Difference by type of car +
Difference by Driver + Difference due to Difference by Driver + Difference due to interactions of Driver and Car + Everything else interactions of Driver and Car + Everything else in the universe that we didn’t account for.in the universe that we didn’t account for.
Statistician’s LanguageStatistician’s Language SSSSTotalTotal=SS=SSTreatment 1Treatment 1+SS+SSTreatement 2Treatement 2+SS+SSInteractionInteraction+SS+SSerrorerror
Enter Our Data in SPSSEnter Our Data in SPSS
We have our Gas MileageImprovement Column
For each value we enter a numberTo tell which of the 4 cars wasTested and which of the 10 driversWas operating the vehicle.
Oh- By the Way How Did You Get Oh- By the Way How Did You Get Those Cute Variable Names Up Those Cute Variable Names Up Top?Top?
Click on the Variable View Tab at the bottom.
Oh Yes We Were About to Oh Yes We Were About to Run a Two Way ANOVARun a Two Way ANOVA
Go to Analyze and Click thePull down menu
Highlight General Linear ModelOn the pop down menu. A menuOpens to the side
Highlight Univariate and Click
The Two ANOVA Menu The Two ANOVA Menu Comes UpComes Up
Highlight Your Dependent Variable(ie – in this case improvement in gasMileage)
Prepare to click on theArrow to move it to theDependent variable box.
Identify Your Fixed FactorsIdentify Your Fixed Factors
Highlight Auto
Click the arrow to move toFixed factor.
Next do the same withDriver
We have now indicated that our gas mileageImprovement is believed to depend on the typeOf car and who is driving it.
Looking at My ResultsLooking at My Results
We have effects for Auto type, Driver, and InteractionBetween the auto and driver
As before the computer calculates As before the computer calculates the square of the values in each the square of the values in each cell, calculates degrees of cell, calculates degrees of freedom and then divides the sum freedom and then divides the sum of squares by the degrees of of squares by the degrees of freedom to get the mean squarefreedom to get the mean square
We Divide our Mean Square for We Divide our Mean Square for Treatments and interaction by the Treatments and interaction by the mean square error. The resulting mean square error. The resulting statistic has a F distribution.statistic has a F distribution.
Check the Significance of Our Check the Significance of Our ResultsResults
For Driver our F score is 1155.782 which is over 99.9%Significant – English Translation “There’s not a snowballsChance in Hell that the gas mileage improvement does notDepend on the driver.We will make sure our advertisement says “IndividualResults may vary”
Checking Up on AutoChecking Up on Auto
Auto effect is 17.3% significant – ie there is almostA 20% chance of producing these numbers whenThe type of car makes no difference.
Probably cannot reject the null hypothesis – we simply cannotConclude with confidence that the type of car made a difference.
What Happened to AutoWhat Happened to Auto
When we did our one way ANOVA When we did our one way ANOVA we had no significancewe had no significance F value was something like 0.11F value was something like 0.11 Now the number is making us wonder Now the number is making us wonder
even though we can’t prove anythingeven though we can’t prove anything Answer is we pulled other variables Answer is we pulled other variables
out of the “error” categoryout of the “error” category We know that the driver made a huge We know that the driver made a huge
difference and yet we were calling that difference and yet we were calling that randomrandom
Not accounting for other effects can Not accounting for other effects can mask things that might be significant mask things that might be significant otherwiseotherwise
InteractionInteraction
There is a definite car and driver effect, ie the same driver willAchieve different results in different types of cars.
Assumptions We MadeAssumptions We Made
Our results and random error Our results and random error distributions were all normaldistributions were all normal
The error variance The error variance (unaccounted for errors) were (unaccounted for errors) were the same for each category or the same for each category or car and drivercar and driver