2 how to compare the difference on >2 groups on one or more variables if it is only one...

26
Social Statistics: ANOVA

Upload: henry-hoes

Post on 15-Dec-2015

229 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Social Statistics: ANOVA

Page 2: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Review

2

Page 3: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

How to compare the difference on >2 groups on one or more variables If it is only one variable, we could compare

three groups with multiple ttests: M1 vs. M2, M1 vs. M3, M2 vs. M3

>2 variables? For example, how two teaching methods

are different for three different sizes of classes.

ANOVA allows you to see if there is any difference between groups on some variables.

The problem with t-tests…

3

Page 4: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

“Analysis of Variance” A hypothesis-testing procedure used to

evaluate mean differences between two or more treatments (or populations) on different variables.

ANOVA is available for both parametric (score data) and non-parametric (ranking) data.

Advantages: 1) Can work with more than two samples. 2) Can work with more than one independent

variable

What is ANOVA?

4

Page 5: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Assume that you have data on student performance in non-assessed tutorial exercises as well as their final grading. You are interested in seeing if tutorial performance is related to final grade. ANOVA allows you to break up the group according to the grade and then see if performance is different across these grades.

One example

5

Page 6: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

One-way between groups Differences between the groups The groups are categorized in one way,

such as groups were divided by age, or grade.

This is the simplest version of ANOVA It allows us to compare variable

between different groups, for example, to compare tutorial performance from different students grouped by grade.

Types of ANOVA?

6

Page 7: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

One-way repeated measures A single group has been measured by a

variable for a few times Example 1: one group of patients were

tested by a new drug in different times: before taking the drug, after taking the drug

Example 2: student performance on the tutorial over time.

Types of ANOVA?

7

Page 8: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Two-way between groups For example: the grades by tutorial analysis could

be extended to see if overseas students performed differently to local students. What you would have from this form of ANOVA is: The effect of final grade The effect of overseas versus local The interaction between final grade and

overseas/local Each of the main effects are one-way tests.

The interaction effect is simply asking "is there any significant difference in performance when you take final grade and overseas/local acting together".

Types of ANOVA?

8

Page 9: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Two-way repeated measures Use the repeated measures Include an interaction effect For example, we want to see the

performance of tutorial about gender and time of testing. We have the same two groups (male, and female groups) and test them in different times to compare the difference.

Types of ANOVA?

9

Page 10: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

In ANOVA an independent or quasi-independent variable is called a factor.

Factor = independent (or quasi-independent) variable.

Levels = number of values used for the independent variable.

One factor → “single-factor design” More than one factor → “factorial

design”

What is ANOVA?

10

Page 11: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

An example of a single-factor design

A example of a two-factor design

What is ANOVA?

11

Page 12: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

ANOVA calculates the mean for each of the final grading groups on the tutorial exercise figure - the Group Means.

It calculates the mean for all the groups combined - the Overall Mean.

Then it calculates, within each group, the total deviation of each individual's score from the Group Mean - Within Group Variation.

Next, it calculates the deviation of each Group Mean from the Overall Mean - Between Group Variation.

Finally, ANOVA produces the F statistic which is the ratio Between Group Variation to the Within Group Variation.

If the Between Group Variation is significantly greater than the Within Group Variation, then it is likely that there is a statistically significant difference between the groups.

The statistical package will tell you if the F ratio is significant or not.

All versions of ANOVA follow these basic principles but the sources of Variation get more complex as the number of groups and the interaction effects increase.

How ANOVA works?

12

Page 13: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Variance between treatments can have two interpretations: Variance is due to differences between

treatments. Variance is due to chance alone. This

may be due to individual differences or experimental error.

F value

13

Page 14: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Data Analysis—Analysis Tools—three different ANOVA:

Anova: Single Factor (one-way between groups)

Anova: Two-factors With Replication Anova: Two-Factors Without Replication

Excel: ANOVA

14

Page 15: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Three groups of preschoolers and their language scores, whether they are overall different?

Example (one-way ANOVA)

Group 1 Scores Group 2 Scores Group 3 Scores87 87 8986 85 9176 99 9656 85 8778 79 8998 81 9077 82 8966 78 9675 85 9667 91 93

15

Page 16: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Step1: a statement of the null and research hypothesis One-tailed or two-tailed (there is no

such thing in ANOVA)

F test steps

3210 : H

different is oneleast at :1 H

16

Page 17: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Step2: Setting the level of risk (or the level of significance or Type I error) associated with the null hypothesis 0.05

F test steps

17

Page 18: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Step3: Selection of the appropriate test statistics

ANOVA: Single factor

F test steps

Groups Count Sum Average Variance1 10 766 76.6 143.15562 10 852 85.2 38.43 10 916 91.6 11.6

18

Page 19: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

F test steps

Group 1 Scores x square Group 2 Scores x square Group 3 Scores x square87 7569 87 7569 89 792186 7396 85 7225 91 828176 5776 99 9801 96 921656 3136 85 7225 87 756978 6084 79 6241 89 792198 9604 81 6561 90 810077 5929 82 6724 89 792166 4356 78 6084 96 921675 5625 85 7225 96 921667 4489 91 8281 93 8649

n 10 10 10 N 30∑x 766 852 916 ∑∑X 2534

76.6 85.2 91.6 214038.5333

59964 72936 84010

216910 58675.6 72590.4 83905.6 215171.6

X)( 2 X

nX /)( 2

NX /)( 2 2)(X

nX /)( 2

Page 20: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

F-test

Between sum of squares

215171.6-214038.53 1133.07

within sum of squares 216910-215171.60 1738.40total sum of squares 216910-214038.53 2871.47

NXnX /)(/)( 22

nXX /)()( 22

NXX /)()( 22

Page 21: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

F test steps

Between-group degree of freedom=k-1 k: number of groups

Within-group degree of freedom=N-k N: total sample size

sourcesums of squares df

mean sums of squares F

Between groups 1133.07 2 566.53 8.799Within gruops 1738.40 27 64.39 Total 2871.47 29

Page 22: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Between-group degree of freedom=k-1 k: number of groups

Within-group degree of freedom=N-k N: total sample size

F test steps

22

Page 23: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Step4: (cont.) df for the denominator = n-k=30-3=27 df for the numerator = k-1=3-1=2

F test steps

23

Page 24: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Step4: determination of the value needed for rejection of the null hypothesis using the appropriate table of critical values for the particular statistic

Table-Distribution of F (http://www.socr.ucla.edu/applets.dir/f_table.html)

F test steps

24

Page 25: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Step5: comparison of the obtained value and the critical value If obtained value > the critical value,

reject the null hypothesis If obtained value < the critical value,

accept the null hypothesis 8.80 and 3.36

F test steps

25

Page 26: 2  How to compare the difference on >2 groups on one or more variables  If it is only one variable, we could compare three groups with multiple ttests:

Step6 and 7: decision time What is your conclusion? Why?

How do you interpret F(2, 27)=8.80, p<0.05

F test steps

26