anova.pdf

40
One-way ANOVA by Damai Nasution

description

Anova Example

Transcript of anova.pdf

One-way ANOVA

by

Damai Nasution

Introduction

Two variables: 1 Categorical variable (factor/IV), 1 Quantitative variable (response/DV)

Main Question: Do (the means of) the quantitative variables depend on which group (given by categorical variable) the individual is in?

ANOVA looks at differences between groups.

Note: We usually refer to the sub-populations or the same population but with different treatments as “groups” when doing ANOVA.

Introduction

At its simplest ANOVA tests the following

hypotheses:

H0: The means of all the groups are equal

μ1 = μ2 = μ3 = μi

Ha: Not all the means are equal

Introduction

Usefulness:

◦ Similar to t-test

◦ More versatile than t-test

◦ Compare one parameter (response variable) between two or more groups

Introduction

Why Not Just Use t-tests?

◦ Tedious when many groups are present

◦ Using all data increases stability

◦ Large number of comparisons some may appear significant by chance

©Damai Nasution

Introduction

Examples:

◦ ”An organization has three different branches. Turnover level

differs accross the three branches and management wants to

know whether this may be explained by the extent to which

employees are satisfied with their working environment across

the branches. Fifity employees are randomly selected at each

branch and given a questionnaire measuring how satisfied they

currently are with the working environment”.

©Damai Nasution

Introduction

◦ Researchers investigate the effects of control type on firm

performance. The research question is whether a real difference

exists in performance between owner- and manager-controlled

firms (McKean and Kania, 1978).

◦ Investigators want to investigate whether demographic factors

(e.g. age groups, races, education level, annual income level, and

employment status) and investment experience (novice,

intermediate, advance) have influence on retirement planning

intention.

©Damai Nasution

Introduction

◦ Researchers investigate the behavior of noise traders and their

impact on the market. There are three groups in the experiment

(accordingly with researchers’ treatments): informed traders

(who possess fundamental information), liquidity traders (who

have to trade for exogenous reasons), and noise traders (who

do not possess fundamental information and have no exogenous

reasons to trade); (Bloomfield, O’Hara, and Saar, 2007).

◦ Researchers investigate the impact of moods (i.e. Negative,

positive, and neutral) on ethical judgment of auditors (Cianci and

Bierstaket, 2009).

©Damai Nasution

Introduction

The researchers investigate the effects of

advertising models’ eye color (blue, green,

and brown) in ad viewers responses to

the ad (Simpson, Sturgen, and Tanguma)

©Damai Nasution

Introduction

What can we conclude from the examples?

ANOVA Assumptions

There are Three basic assumptions used in

ANOVA:

The populations from which the samples

were taken are normally distributed.

Homogeneity of variance

Random sampling.

Notation for ANOVA

• n = number of individuals all together

• i = number of groups

• = mean for entire data set is

Group i has

• ni = # of individuals in group i

• xij = value for individual j in group i

• = mean for group i

• si = standard deviation for group iix

x

How ANOVA works

ANOVA measures two sources of variation in the data and

compares their relative sizes

• variation BETWEEN groups

• for each data value look at the difference between its group

mean and the overall mean

• variation WITHIN groups

• for each data value we look at the difference between that

value and the mean of its group

2)-( xxi

2)-( iij xx

The ANOVA F-statistic is a ratio of the Between Group Variation divided

to the Within Group Variation:

MSE

MSG

Within

BetweenF

This compares the variation between groups (group means to overall mean)

to the variation within groups (individual values to group means). This is

what gives it the name “Analysis of Variance.”

A large F is evidence against H0, since it indicates that there is more

difference between groups than within groups.

Note: it is easier to look at the P-value to indicate whether the H0 is

rejected or not If the P-value is less than or equal to a, reject H0. If the P-

value is greater than a, fail to reject H0.

How ANOVA works

How ANOVA works

Step 1: The null hypothesis is

3210 :H

• Step 2: The alternative hypothesis is

equal are theof allnot :H ia

• Step 3: The significance level is = ?

(usually is set to one of the values {0.01, 0.05, 0.1}

How ANOVA works

Step 4: Calculate the F-statistic:

MSE

MSGor

Error SquareMean

Group SquareMean F

MSG, MSE and the F-statistic are found in the ANOVA table when

the analysis is run on the SPSS

How ANOVA works

Step 5: Find the P-value

Step 6. Reject or fail to reject H0 based on the

P-value.

Step 7. State your conclusion.

How ANOVA works

Levene’s test:

H0: σ12 =σ2

2 = σ32 = σi

2 → Homogeneity

of variance

Ha: σ12 ≠ σ2

2 ≠ σ32 ≠ σi

2

◦ Homogeniety fulfilled → Equal variances assumed.

◦ Homogeneity rejected → Equal variances not assumed.

Note: •ANOVA is still robust even when the homogeneity assumption is not fulfilled, as long as the sample sizes are roughly equal or the deviation is only of a moderate level. As a rule of thumb, if the largest std.dev < (2 x the smallest std.dev) then we need not to be concerned about this assumption.•Equal variance assumed or not assumed will affect to Post Hoc test methods (p.20)

How to perform ANOVA in SPSS?

One-way ANOVA◦ Choose Analyze > General Linear Model >

Univariate

◦ Click the DV (only one click) to highlight it and then transfer it to Dependent Variable box by clicking the corresponding arrow.

◦ Doing a similar procedure for IV and transfer it to Fixed Factor(s) box by clicking the corresponding arrow.

◦ After that, click the option button and check for Homogeneity of Variance. Note: SPSS uses a Levene’s test of homogeneity of variance.

◦ Back to the former box.

How to perform ANOVA in SPSS?

Post Hoc Test: The results from the ANOVA do not

indicate which of the three groups differ from one another.

To locate the source of this difference we use a post hoc

test (commonly Tukey test and the more conservative is

Scheffé test; equal variance is assumed in these tests).

◦ Click Post Hoc and check Tukey box, click Continue button.

◦ Last, click OK button and wait a moment while SPSS analyzes the

data.

Note:

• Tukey performs all of the pairwise comparisons between groups.

• Scheffe performs simultaneous joint pairwise comparisons for all

possible pairwise combinations of means. Can be used to examine all

possible linear combinations of group means, not just pairwise

comparisons.

How to perform ANOVA in SPSS?

If equal variance is not assumed, some

post hoc tests could be used:

◦ Tamhane's T2. Conservative pairwise

comparisons test based on a t-test.

◦ Dunnett's T3. Pairwise comparison test based

on the Studentized maximum modulus.

◦ Games-Howell. Pairwise comparison test that

is sometimes liberal.

◦ Dunnett's C. Pairwise comparison test based

on the Studentized range.

How to perform ANOVA in SPSS?

One IV or Factor

Is F-value significant?

Yes

Are there more than 2

groups?

Yes

Do Post Hoc

comparison

No

Stop

No

Stop

How to perform ANOVA in SPSS?

Exercise 1:

Open job satisfaction.sav

An organization has three branches in three different region. Management wishes to know whether employees are satisfied with their job differs across regions. A total of 218 employees are randomly selected at the regions and given a questionnaire measuring how satisfied they currently are with their job”.

How to perform ANOVA in SPSS?

Does management find evidence that

employees’ job satisfaction differs across

regions? Which branch differs from the

others?

How to perform ANOVA in SPSS?

This is how

the data set

is shown

How to perform ANOVA in SPSS?

How to perform ANOVA in SPSS?

Transfer Satisfaction

variable to

dependent variable

box and region

variable to Fixed

Factor(s) box. After

that click Options

How to perform ANOVA in SPSS?

Check the

homogeneity

check-box and

after that click

Continue

How to perform ANOVA in SPSS?

Click Post Hoc…

How to perform ANOVA in SPSS?

1. Transfer Location

variable from

factor(s) to Pos

Hoc Tests for:

2. Check the Tukey

Check-box

3. Click Continue

How to perform ANOVA in SPSS?

Click OK and wait a minute

How to perform ANOVA in SPSS?

The number of sample

in each region

Homogeneity test’s

result

P-value for Levene’s Test

Ho: σ1 = σ2 = σ3Ha: At least one σ is different than

the others

How to perform ANOVA in SPSS?

Result of ANOVA

Conclusion: There is a difference in

employees’ job satisfaction across

regions.

P-Value for ANOVA

Ho: μ1 = μ2 = μ3Ha: At least one μ is

different than the others

How to perform ANOVA in SPSS?

South region is significantly

different from others

How to perform ANOVA in SPSS?

Exercise 2:

Open Training.xlsx file.

Read the instruction in the Training.xlsx file and the raw data.

Open Training.sav file.

Observe how we handle the raw data and convert it into three treatments in order to analysis it using ANOVA.

Perform the ANOVA test using file Training.sav.

Answer the questions.

Report this exercise 2 in written form by the end of this course week with reference to at least one thoroughly studied international article where ANOVA has been applied on a research problem in business economics.

Test yourself

What is ANOVA?

Why do we use ANOVA?

What are ANOVA assumptions?

How to test ANOVA assumptions?

What do we do when the equal variance is not fulfilled?

What does it mean when the F value in ANOVA result is statistically significant?

What does the post hoc test answer?

©Damai Nasution

References

Agresti, A. (2007) Ch 12: Comparing group: Analysis of Variance (ANOVA) method, Retrieved on 26/04/2012, from http://www.stat.ufl.edu/~aa/sta6127/ch12.pdf.

Bloomfield, R., O’Hara M., and Saar G. (2007) ” How Noise Trading Affects Markets: An Experimental Analysis”, Available at SSRN: http://ssrn.com/abstract=994379 or http://dx.doi.org/10.2139/ssrn.994379.

Cianci, A. and Bierstaker, J. 2009. "The Effect of Client Importance and Performance Feedback on Auditors' Technical and Ethical Judgments." Managerial Auditing Journal, Vol. 24 Iss: 5, pp.455 – 474.

Ghozali, I. (2005) Multivariate analysis application with SPSS, Diponegoro University Publishing, Semarang.

Ho, R. (2006) Handbook of univariate and multivariate data analysis and interpretation with SPSS, Taylor & Francis Group, Boca Raton, FL.

McKean, J. R., and Kania, J. J. (1978) “An Industry approach to

owner-manager control and profit performance”, Journal of

Business, Vol. 51 No. 2, pp. 327-342.

Murray, J. (2010) Analysis of Variance – Homework and Exam,

Retrieved on 27/04/2012, from

http://www.murraylax.org/bus735/fall2010.

Pruim, R. (nd) ANOVA: Analysis of Variance, Retrieved on

30/04/2012, from

http://www.calvin.edu/~rpruim/courses/m243/F03.