analysis of variance: inferences about 2 or more means chapter 13 homework: 1, 2, 7, 8, 9

24
Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Post on 20-Dec-2015

226 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Analysis of Variance:Inferences about 2 or More Means

Chapter 13

Homework: 1, 2, 7, 8, 9

Page 2: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Analysis of Variance

or ANOVA Procedure for testing hypotheses about 2 or

more means simultaneously e.g., amount of sleep effects on test scores

group 1: 0 hrs

group 2: 4 hrs

group 3: 8 hrs ~

Page 3: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

ANOVA: Null Hypothesis

Omnibus H0: all possible H0

H0: 1 = 2 = 3

Pairwise H0: compare each pair of means

H0: 1 = 2

H0: 1 = 3

H0: 2 = 3

ANOVA: assume H0 true for all comparisons ~

Page 4: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

ANOVA: Alternative Null Hypothesis

Best way to state: the null hypothesis is false at least one of all the possible H0 is

false Does not tell us which one is false

Post hoc tests (Ch 14) ~

Page 5: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Experimentwise Error

Why can’t we just use t tests? Type 1 error: incorrectly rejecting H0 each comparison = .05 but we have multiple comparisons

Experimentwise probability of type 1 error P (1 or more Type 1 errors)

ANOVA: only one H0 ~

Page 6: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Experimentwise Error

H0: 1 = 2 = 3

Approximate experimentwise error H0: 1 = 2 = .05

H0: 1 = 3 = .05

H0: 2 = 3 = .05

experimentwise .15

Page 7: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

ANOVA Notation

Test scores

0 hrs 4 hrs 8 hrs

10 14 22

8 16 14

8 18 16

6 16 20

32 64 72

Page 8: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

ANOVA Notation columns = groups

jth group j = 2 = 2d column = group 2 (4hrs)

k = total # groups (columns) k = 3

nj = # observations in group j

n3 = # observations in group 3 ~

Page 9: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

ANOVA Notation

sj2 = variance of group j

Xi = ith observation in group

X4 = 4th observation in group

Xij = ith observation in group j

X31 = 3d observation in group 1 ~

Page 10: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

ANOVA Notation

subscript G = grand refers to all data points in all groups

taken together Grand mean:

G

ijG

n

XX

Xij = sum of all Xi in all groups = 168

nG = n3 + n2 + n3 = 12 ~

Page 11: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Logic of ANOVA

Assume all groups from same population with same and 2

Comparing means are they far enough apart to reject H0? ask same question for ANOVA

MORE THAN 2 MEANS ~

Page 12: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Logic of ANOVA

ANOVA: 2 point estimates of

Between groups variance of means

Within groups pooled variance of all individual

scores s2

pooled ~

Page 13: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Logic of ANOVA

Are differences between groups (means)

bigger than difference between individuals? If is H0 false then distance between groups should be

larger We will work with groups of equal size

n1 = n2 = n3 Unequal n

different formulas same logic & overall method ~

Page 14: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Mean Square Between Groups also called MSB

Mean Square Between Groups

1

2

2

k

XXs

Gj

X

variance of the group means find deviations from grand mean

)(2 nsMSXB

Page 15: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Mean Square Within Groups

also MSW: Within Groups Variance Pooled variance

pool variances of all groups similar to s2 pooled for t test

k

sssspooled

23

22

212

formula for equal n only different formula for unequal n ~

Page 16: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

F ratio

F test Compare the 2 point estimates of 2

W

B

MS

MSF

Page 17: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

F ratio

If H0 is true then MSB = MSW then F = 1 if means are far apart then MSB > MSW

F > 1

Set criterion to reject H0

determine how much greater than 1 Test statistic: Fobs

compare to FCV Table A.4 (p 478) ~

Page 18: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

F ratio: degrees of freedom

Required to determine FCV ~ df for numerator and denominator of F

dfB = (k - 1) (number of groups) - 1

dfW = (nG - k)

df1 + df2 + df3 +.... + dfk ~ ANOVA nondirectional

even though shade only right tail F is always positive ~

Page 19: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

TABLE A.4: Critical values of F (a = .05)

Page 20: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Partitioning Sums of Squares

Sums of Squares sum of squared deviations

2)( GjB XXSS

2)( jijW XXSS

1kdfB

kndf GW

2)( GijT XXSS 1 GT ndf

Page 21: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Partitioning Sums of Squares

Finding Mean Squares MS = variance

B

BB df

SSMS

W

WW df

SSMS

Page 22: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

Partitioning Sums of Squares

Calculating observed value of F

W

Bobs MS

MSF

Page 23: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9

ANOVA Summary Table

Output of most computer programs partitioned SS

_________________________________

Source SS df MS F

Between SSB dfB MSB Fobs

Within SSW dfW MSW

Total SST dfT

Page 24: Analysis of Variance: Inferences about 2 or More Means Chapter 13 Homework: 1, 2, 7, 8, 9