© Copyright McGraw-Hill 2000 12-1 CHAPTER 12 Analysis of Variance (ANOVA)

35
© Copyright McGraw-Hill 2000 12-1 CHAPTER 12 Analysis of Variance (ANOVA)

Transcript of © Copyright McGraw-Hill 2000 12-1 CHAPTER 12 Analysis of Variance (ANOVA)

© Copyright McGraw-Hill 200012-1

CHAPTER 12

Analysis of Variance(ANOVA)

© Copyright McGraw-Hill 200012-2

Objectives

Use the one-way ANOVA technique to determine if there is a significant difference among three or more means.

Determine which means differ using Scheffe or Tukey test if the the null hypothesis is rejected in the ANOVA.

Use the two-way ANOVA technique to determine if there is a significant difference in the main effects or interaction.

© Copyright McGraw-Hill 200012-3

Introduction

The F-test, used to compare two variances, can also be used to compare three of more means.

This technique is called analysis of variance or ANOVA.

For three groups, the F-test can only show whether or not a difference exists among the three means, not where the difference lies.

Other statistical tests, Scheffé test and the Tukey test, are used to find where the difference exists.

© Copyright McGraw-Hill 200012-4

Analysis of Variance

When an F-test is used to test a hypothesis concerning the means of three or more populations, the technique is called analysis of variance (commonly abbreviated as ANOVA).

Although the t-test is commonly used to compare two means, it should not be used to compare three or more.

© Copyright McGraw-Hill 200012-5

Assumptions for the F-test

The following assumptions apply when using the F-test to compare three or more means.

1. The populations from which the samples were obtained must be normally or approximately normally distributed.

2. The samples must be independent of each other.

3. The variances of the populations must be equal.

© Copyright McGraw-Hill 200012-6

F-Test

In the F-test, two different estimates of the population variance are made.

The first estimate is called the between-group variance, and it involves finding the variance of the means.

The second estimate, the within-group variance, is made by computing the variance using all the data and is not affected by differences in the means.

© Copyright McGraw-Hill 200012-7

F-Test (cont’d.)

If there is no difference in the means, the between-group variance will be approximately equal to the within-group variance, and the F test value will be close to 1—the null hypothesis will not be rejected.

However, when the means differ significantly, the between-group variance will be much larger than the within-group variance; the F-test will be significantly greater than 1—the null hypothesis will be rejected.

© Copyright McGraw-Hill 200012-8

Hypotheses

For a test of the difference among three or more means, the following hypotheses should be used:

H0: 1 2 • • • k, where k is the number of groups

H1: At least one mean is different from the others.

A significant test value means that there is a high probability that this difference in the means is not due to chance.

© Copyright McGraw-Hill 200012-9

Degrees of Freedom

The degrees of freedom for this F-test are d.f.N. k 1,

where k is the number of groups,

And d.f.D. N k

where N is the sum of the sample sizes of the groups, N n1 n2 • • • nk.

The sample sizes do not need to be equal.

The F-test to compare means is always right-tailed.

© Copyright McGraw-Hill 200012-10

Procedure for Finding F-Test Value

Step 1 Find the mean and variance of each sample.

Step 2 Find the grand mean.

Step 3 Find the between-group variance.

Step 4 Find the within-group variance.

Step 5 Find the F-test value.

© Copyright McGraw-Hill 200012-11

Analysis of Variance Summary Table

Total

MSB

MSW

k 1

N k

SSB

SSW

Between

Within

FMean Square

s

d.f.Sum of squares

Source

B

W

MSMS

© Copyright McGraw-Hill 200012-12

Sum of Squares Between Groups

The sum of the squares between groups, denoted SSB, is found using the following formula:

Where the grand mean, denoted by , is the mean of all values in the samples.

22

1

i i GMB

n X XS

k

GMX

GM

XX

N

© Copyright McGraw-Hill 200012-13

Sum of Squares Within Groups

The sum of the squares within groups, denoted SSW, is found using the following formula:

Note: This formula finds an overall variance by calculating a weighted average of the individual variances. It does not involve using differences of the means.

2

2 11

i iW

i

n sS

n

© Copyright McGraw-Hill 200012-14

The Mean Squares

The mean square values are equal to the sum of the squares divided by the degrees of freedom.

1

B

B

SSMS

k

W

W

SSMS

N k

© Copyright McGraw-Hill 200012-15

Scheffé Test

In order to conduct the Scheffé test, one must compare the means two at a time, using all possible combinations of means.

For example, if there are three means, the following comparisons must be done:

1 1 22 3 3 versus X versus X versus XX X X

© Copyright McGraw-Hill 200012-16

Formula for Scheffé Test

where and are the means of the samples being compared, ni and nj are the respective sample sizes, and is the within-group variance.

2

2 1 1

i j

s

w i j

X XF

s n n

2ws

iX jX

© Copyright McGraw-Hill 200012-17

F Value for Scheffé Test

To find the critical value F for the Scheffé test, multiply the critical value for the F-test by k 1:

There is a significant difference between the two means being compared when Fs is greater than F.

' 1 . . F k CV

© Copyright McGraw-Hill 200012-18

Tukey Test

The Tukey test can also be used after the analysis of variance has been completed to make pair-wise comparisons between means when the groups have the same sample size.

The symbol for the test value in the Tukey test is q.

© Copyright McGraw-Hill 200012-19

Formula for Tukey Test

where and are the means of the samples being compared, n is the size of the sample and is the within-group variance.

2

i j

w

X Xq

s n

2ws

iX jX

© Copyright McGraw-Hill 200012-20

Tukey Test Results

When the absolute value of q is greater than the critical value for the Tukey test, there is a significant difference between the two means being compared.

© Copyright McGraw-Hill 200012-21

Two-Way Analysis of Variance

The two-way analysis of variance is an extension of the one-way analysis of variance already discussed; it involves two independent variables.

The independent variables are also called factors.

© Copyright McGraw-Hill 200012-22

Two-Way Analysis of Variance (cont’d.)

Using the two-way analysis of variance, the researcher is able to test the effects of two independent variables or factors on one dependent variable.

In addition, the interaction effect of the two variables can be tested.

© Copyright McGraw-Hill 200012-23

Two-Way ANOVA Terms

Variables or factors are changed between two levels (i.e., two different treatments).

The groups for a two-way ANOVA are sometimes called treatment groups.

© Copyright McGraw-Hill 200012-24

Two-Way ANOVA Designs

A3

B2B1

A1

A2

3 2 design

B3B1

A3

A1

A2

B2

3 3 design

© Copyright McGraw-Hill 200012-25

Two-Way ANOVA Null Hypothesis

A two-way ANOVA has several null hypotheses.

There is one for each independent variable and one for the interaction.

© Copyright McGraw-Hill 200012-26

Two-Way ANOVA Summary Table

Source Sum ofsquares

d.f. Meansquare

F

A SSA a 1 MSA FA

B SSB b 1 MSB FB

A B SSA B (a 1)(b 1) MSA B FA B

Within(error)

SSW ab(n 1) MSW

Total

© Copyright McGraw-Hill 200012-27

Assumptions for the Two-Way ANOVA

The population from which the samples were obtained must be normally or approximately normally distributed.

The samples must be independent.

The variances of the population from which the samples were selected must be equal.

The groups must be equal in sample size.

© Copyright McGraw-Hill 200012-28

Graphing Interactions

To interpret the results of a two-way analysis of variance, researchers suggest drawing a graph, plotting the means of each group, analyzing the graph, and interpreting the results.

© Copyright McGraw-Hill 200012-29

Disordinal Interaction

If the graph of the means has lines that intersect each other, the interaction is said to be disordinal.

When there is a disordinal interaction, one should not interpret the main effects without considering the interaction effect.

y

x

© Copyright McGraw-Hill 200012-30

Ordinal Interaction

An ordinal interaction is evident when the lines of the graph do not cross nor are they parallel.

If the F-test value for the interaction is significant and the lines do not cross each other, then the interaction is said to be ordinal and the main effects can be interpreted independently of each other.

y

x

© Copyright McGraw-Hill 200012-31

No Interaction

When there is no significant interaction effect, the lines in the graph will be parallel or approximately parallel.

When this situation occurs, the main effects can be interpreted independently of each other because there is no significant interaction.

y

x

© Copyright McGraw-Hill 200012-32

Summary

The F-test can be used to compare two sample variances to determine whether they are equal.

It can also be used to compare three or more means—this procedure is called an analysis of variance, or ANOVA.

When there is one independent variable, the analysis of variance is called a one-way ANOVA; when there are two independent variables—a two-way ANOVA.

© Copyright McGraw-Hill 200012-33

Summary (cont’d.)

The ANOVA technique uses two estimates of the population variance.

The between-group variance is the variance of the sample means; the within-group variance is the overall variance of all the values.

When there is no significant difference among the means, the two estimates will be approximately equal, and the F-test value will be close to 1.

© Copyright McGraw-Hill 200012-34

Summary (cont’d.)

If there is a significant difference among the means, the between-group variance will be larger than the within-group and a significant test value will result.

If there is a significant difference among the means and the sample sizes are the same, the Tukey test can be used to find where the difference lies.

The Scheffé test is more general and can be used even if the sample sizes are not equal.

© Copyright McGraw-Hill 200012-35

Conclusions

The two-way ANOVA enables the researcher to test the effects of two independent variables and a possible interactions effect on one dependent variable.