Top Banner
1 1 Advanced Research Methods Advanced Research Methods in Psychology in Psychology - lecture - - lecture - Matthew Rockloff Matthew Rockloff Oneway ANOVA Oneway ANOVA
31

1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

Jan 15, 2016

Download

Documents

Gervase Harrell
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

11

Advanced Research Methods in Advanced Research Methods in Psychology Psychology

- lecture -- lecture -

Matthew RockloffMatthew Rockloff

Oneway ANOVAOneway ANOVA

Page 2: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

22

When to use a Oneway ANOVA When to use a Oneway ANOVA 11

Oneway ANOVA is a generalization of Oneway ANOVA is a generalization of the the independent samples t-testindependent samples t-test. .

Recall that the independent samples t-Recall that the independent samples t-test is used to compare the mean test is used to compare the mean values of 2 different groups. values of 2 different groups.

A Oneway ANOVA does the same thing, A Oneway ANOVA does the same thing, but it has the advantage of allowing but it has the advantage of allowing comparisons between more than 2 comparisons between more than 2 groups. groups.

Page 3: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

33

When to use a Oneway ANOVA When to use a Oneway ANOVA 22

In psychology, for example, we often In psychology, for example, we often want to contrast want to contrast several conditionsseveral conditions in in an experiment; such as a control, a an experiment; such as a control, a standard treatment, and a newer standard treatment, and a newer “experimental” treatment.“experimental” treatment.

Because Oneway ANOVA is simply a Because Oneway ANOVA is simply a generalizationgeneralization of the independent of the independent samples t-test, we use this procedure samples t-test, we use this procedure (to follow) to recalculate our previous (to follow) to recalculate our previous 2 groups example. 2 groups example.

Later, we will do an example with more Later, we will do an example with more than 2 groups.than 2 groups.

Page 4: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

44

Example 7.1Example 7.1

Let’s return to our example Let’s return to our example of the pizza vs. beer diet. of the pizza vs. beer diet.

Our research question is: Our research question is:

““Is there any weight Is there any weight gain difference between gain difference between a 1-week exclusive diet a 1-week exclusive diet of either pizza or beer?”of either pizza or beer?”

Page 5: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

55

Example 7.1 Example 7.1 (cont.)(cont.)

X1 X2

1 3

2 4

2 4

2 4

3 5

Xj = 2 4

S2xj = 0.4 0.4

Page 6: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

66

Example 7.1 Example 7.1 (cont.)(cont.)

An Oneway-ANOVA is a An Oneway-ANOVA is a generalization generalization of the independent samples t-testof the independent samples t-test in in which we can specify more than 2 which we can specify more than 2 conditions. conditions.

If we only specify 2 conditions, If we only specify 2 conditions, however, the results will be exactly however, the results will be exactly the the same assame as the t-test. the t-test.

The calculations are somewhat The calculations are somewhat different, but the resulting “different, but the resulting “p-valuep-value” ” will be the same, and therefore the will be the same, and therefore the research conclusion will always be the research conclusion will always be the same.same.

Page 7: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

77

Example 7.1 Example 7.1 (cont.)(cont.)

ANOVA operates on the principle ANOVA operates on the principle of “of “partitioning the variancepartitioning the variance”. ”.

There is a total amount of variance There is a total amount of variance in the set of data previous. in the set of data previous.

This total variance is found by This total variance is found by subtracting each value (e.g., subtracting each value (e.g., 1,2,2…) from the mean for all 10 1,2,2…) from the mean for all 10 people ( ), squaring the result, people ( ), squaring the result, summing the squares, and dividing summing the squares, and dividing by the number of values (i.e., 10):by the number of values (i.e., 10):

3T

Page 8: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

88

Example 7.1 - FormulaExample 7.1 - Formula

NS Tt

22

)(

or

4.110

23)-(523)-(423)-(423)-(423)-(323)-(323)-(223)-(223)-(223)-(12

tS

Page 9: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

99

Example 7.1 Example 7.1 (cont.)(cont.)

This total variance (SThis total variance (S22tt=1.4) can =1.4) can

be partitioned, or divided, into 2 be partitioned, or divided, into 2 parts: parts: • the variance the variance withinwithin, and , and • the variance the variance betweenbetween. .

Page 10: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

1010

Example 7.1 Example 7.1 – – Variance withinVariance within

The variance within is calculated The variance within is calculated by averaging the by averaging the variances within variances within each conditioneach condition. . For the previous example For the previous example

Page 11: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

1111

Example 7.1 Example 7.1 – – Variance within Variance within (cont)(cont)

, where J = number of conditions, where J = number of conditions J

SS jx

within

2

2

4.02

4.04.02

withinS

Page 12: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

1212

Example 7.1 Example 7.1 – – Variance betweenVariance between

The variance between is The variance between is calculated by taking the calculated by taking the variance variance of the means of all conditionsof the means of all conditions. .

In our example, of course, we In our example, of course, we only have 2 means:only have 2 means:

),...,( 212

Jbetween XVarianceS

JS Tjbetween

22

)(

or

for a balanced study.

Page 13: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

1313

Example 7.1 Example 7.1 – – Variance between Variance between (cont.)(cont.)

In our example:In our example:

12

)34()32( 222

betweenS

Page 14: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

1414

Example 7.1 Example 7.1 (cont.)(cont.)

Now we can write a formula for the Now we can write a formula for the partition of the variancepartition of the variance into its into its components:components:

SS22total total = S= S22

betweenbetween+S+S22withinwithin , or , or

1.4 = 1 + 0.41.4 = 1 + 0.4

The formula above will allow you to check The formula above will allow you to check your hand calculations.your hand calculations.

If you’ve done everything right, all If you’ve done everything right, all variances should “add up” to the total variances should “add up” to the total variance. variance.

Page 15: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

1515

Example 7.1 Example 7.1 – – ANOVA tableANOVA table

Next, we need to fill-in the so-called Next, we need to fill-in the so-called ANOVA table:ANOVA table:

Source of

Variance(SV)

Source of

Squares(SS)

Degrees of

Freedom(df)

Mean Squares

(MS)

F-ratio(F)

Critical Value(CV)

Reject Decision(Reject?)

Between N-S2between J-1 SSb/dfb MSb/MSw See back

of table of Stats

Text

Is F-ratio > CV ?

Within N-S2within J(n-1) SSw/dfw

Total N-S2total N-1

Page 16: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

1616

Example 7.1 Example 7.1 – – ANOVA table ANOVA table (cont.)(cont.)

Here’s what we know so far:Here’s what we know so far:

• S2S2betweenbetween = 1 = 1

• S2S2withinwithin = 0.4 = 0.4

• S2S2total total =1.4 =1.4

• J=2 J=2 (because there are 2 conditions)(because there are 2 conditions)

• n=5 n=5 (because there are 5 people in each condition)(because there are 5 people in each condition)

• N=10 N=10 (because there are 10 subjects in total)(because there are 10 subjects in total)

Page 17: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

1717

Example 7.1 Example 7.1 – – ANOVA table ANOVA table (cont.)(cont.)

Now we can fill-in the table:Now we can fill-in the table:

Source of

Variance(SV)

Source of

Squares(SS)

Degrees of

Freedom(df)

Mean Squares

(MS)

F-ratio(F)

Critical Value(CV)

Reject Decision(Reject?)

Between 10(1)= 10 2-1= 1 10/1= 10 10/0.5= 20

5.32 Is F-ratio > CV ?

YES

Within 10(0.4)= 4

2(5-1)= 8 4/8= 0.5

Total 10(1.4)=14

10-1= 9

Page 18: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

1818

Example 7.1 Example 7.1 (cont.)(cont.)

This is a This is a 2-tailed test2-tailed test because we had no because we had no notion of which diet should have greater notion of which diet should have greater weight gain. weight gain.

In the back of a Statistic text we find the In the back of a Statistic text we find the critical valuecritical value of this “F” is 5.32, by looking of this “F” is 5.32, by looking for a 2-tailed F with 1 and 8 degrees of for a 2-tailed F with 1 and 8 degrees of freedom. freedom.

The first, or The first, or numeratornumerator, degrees of freedom , degrees of freedom are the degrees of freedom associated with are the degrees of freedom associated with the Mean Squaredthe Mean Squared Between Between (df=1). (df=1).

The second, or The second, or denominatordenominator, degrees of , degrees of freedom are associated with the Means freedom are associated with the Means Squared Squared WithinWithin (df=8). (df=8).

Page 19: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

1919

Example 7.1 Example 7.1 – Conclusion …– Conclusion …

Our calculated F = 20 is higher Our calculated F = 20 is higher than the critical value, therefore than the critical value, therefore we we reject the null hypothesisreject the null hypothesis and and conclude that:conclude that:

there is a significant there is a significant difference in weight difference in weight gain between the 2 diets.gain between the 2 diets.

Page 20: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

2020

Example 7.1 Example 7.1 – Conclusion (cont.)– Conclusion (cont.)

More specifically, we can look at the More specifically, we can look at the mean weight gain in each condition mean weight gain in each condition ((MMpizzapizza = 2 and = 2 and MMbeerbeer = 4), and conclude = 4), and conclude that:that:

The beer diet (The beer diet (MM = 4.00) = 4.00) has significantly higher has significantly higher

weight gain than the weight gain than the pizza diet (pizza diet (MM = 2.00), = 2.00),

FF(1,8) = 20.00, (1,8) = 20.00, pp < .05 (two-tailed). < .05 (two-tailed).

Page 21: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

2121

Example 7.1 - Using SPSSExample 7.1 - Using SPSS

First, we need to add First, we need to add 2 variables2 variables to to the SPSS variable view:the SPSS variable view:• IndependentVariableIndependentVariable = diet (coded as = diet (coded as

1=Pizza and 2=Beer)1=Pizza and 2=Beer)• DependentVariableDependentVariable = wtgain (or “weight = wtgain (or “weight

gain”)gain”) As before, As before, personid personid is added a is added a

convenient – although not critical - convenient – although not critical - additional variable.additional variable.

Page 22: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

2222

Example 7.1 - Using SPSS Example 7.1 - Using SPSS (cont.)(cont.)

In addition, we must code for the In addition, we must code for the “diet” variable“diet” variable (per above): (per above):

Page 23: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

2323

Example 7.1 - Using SPSS Example 7.1 - Using SPSS (cont.)(cont.)

Page 24: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

2424

Example 7.1 - Using SPSS Example 7.1 - Using SPSS (cont.)(cont.)

In the same In the same manner as the manner as the independent independent samples t-samples t-test, we enter test, we enter the the datadata in the in the SPSS data SPSS data view:view:

Page 25: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

2525

Example 7.1 - Using SPSS Example 7.1 - Using SPSS (cont.)(cont.)

The only “change” in performing the ANOVA The only “change” in performing the ANOVA procedure is the procedure is the new syntaxnew syntax::

Oneway Oneway DependentVariableDependentVariable by by IndependentVariableIndependentVariable /ranges = scheffe./ranges = scheffe.

In our example, the following In our example, the following syntaxsyntax is is entered:entered:

Page 26: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

2626

Example 7.1 Example 7.1 – SPSS output viewer– SPSS output viewer

Running this syntax produces the Running this syntax produces the following in the SPSS output viewer:following in the SPSS output viewer:

Page 27: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

2727

Example 7.1 – SPSSExample 7.1 – SPSS (cont.)(cont.) A warning is given which states that the sub-A warning is given which states that the sub-

command “/ranges = scheffe” was not command “/ranges = scheffe” was not executed. executed.

This procedure is only necessary when there This procedure is only necessary when there are more than 2 groups, because it helps to are more than 2 groups, because it helps to test all possible pairs of means between test all possible pairs of means between groups. groups.

In our example, we can simply interpret the In our example, we can simply interpret the ANOVA table to determine significant ANOVA table to determine significant difference between our 2 means for Pizza difference between our 2 means for Pizza and Beer. and Beer.

The warning can be safely ignored.The warning can be safely ignored.

Page 28: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

2828

Example 7.1 – SPSSExample 7.1 – SPSS (cont.)(cont.)

The ANOVA table is simply a The ANOVA table is simply a reproduction of the table that reproduction of the table that was computed by hand. was computed by hand.

Unlike the hand calculated Unlike the hand calculated results, results, SPSS provides an exact SPSS provides an exact probabilityprobability value associated with value associated with the F-value. the F-value.

Page 29: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

2929

Example 7.1 – ConclusionExample 7.1 – Conclusion The conclusion can therefore be The conclusion can therefore be

modified as follows:modified as follows:

The beer diet (The beer diet (MM = 4.00) has = 4.00) has significantly higher weight gain significantly higher weight gain than the pizza diet (than the pizza diet (MM = 2.00), = 2.00), FF(1,8) = 20.00, (1,8) = 20.00, pp < < .01.01 (two- (two-tailed).tailed).

Page 30: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

3030

Example 7.1 – NB: APA styleExample 7.1 – NB: APA style

Notice that the probability given by Notice that the probability given by SPSS was p = .002. SPSS was p = .002.

Per Per APA styleAPA style, rounded to 2 significant , rounded to 2 significant digits the probability becomes p=.00. digits the probability becomes p=.00.

Probabilities, however, are Probabilities, however, are never zeronever zero, , so we must modify this result to the so we must modify this result to the smallest p-value normally expressed in smallest p-value normally expressed in APA style, p < .01.APA style, p < .01.

Page 31: 1 Advanced Research Methods in Psychology - lecture - Matthew Rockloff Oneway ANOVA.

3131

Thus concludes Thus concludes

Advanced Research Methods in Advanced Research Methods in Psychology Psychology

- Week 6 lecture -- Week 6 lecture -

Matthew RockloffMatthew Rockloff

Oneway ANOVAOneway ANOVA