1 g89.2228 lect 11a g89.2228 lecture 11a example: comparing variances anova table anova linear model...

11
1 G89.2228 Lect 11a G89.2228 Lecture 11a • Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes and power

Upload: denis-tucker

Post on 05-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 G89.2228 Lect 11a G89.2228 Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes

1G89.2228 Lect 11a

G89.2228Lecture 11a

• Example:• Comparing variances• ANOVA table• ANOVA linear model• ANOVA assumptions• Data transformations• Effect sizes and power

Page 2: 1 G89.2228 Lect 11a G89.2228 Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes

2G89.2228 Lect 11a

Comparing 3 or more means: Examples

• Okasaki reported that Asian-American students had higher depression than Anglo students– Suppose she had wanted to compare

second generation "Anglo" students of Italian, Irish, British and Jewish heritage

• Henderson-King and Nisbett constructed three experimental social experiences– Angry disruption

– Disappointed disruption

– Minimal disruption

• Under the null hypothesis in these cases, all k means vary only due to sampling fluctuations

Page 3: 1 G89.2228 Lect 11a G89.2228 Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes

3G89.2228 Lect 11a

Implications of Null Hypothesis when k>2

• Suppose also that n subjects are sampled in each of the k groups.

• Under H0– All groups estimate a common grand mean

– Group means, , differ due to sampling variation

– Var( )=2/n

– Var( ) can be studied empirically with

– Note that under H0, the variation of individual Y values, 2, can be estimated using n*S2

Y.

• Regardless of H0, an independent estimate of 2 can be obtained from the variation within groups.

11

2•

2

k

YYS

k

ii

Y

Y

Y

Y

Page 4: 1 G89.2228 Lect 11a G89.2228 Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes

4G89.2228 Lect 11a

Analyzing Variance• Under H0, both

and

estimate the same variance term, 2 (what Howell calls, 2

e).

• The ratio of MSB/MSE will be approximately unity on the average, if H0 is true. Fisher described the distribution of the variance ratio under H0. It is called the central F distribution on (k-1) and k(n-1) degrees of freedom.

nSY 2 n

Y j Y • 2

j1

k

k 1MSB

SY2

Yij Y j 2

i1

n

j1

k

k n 1 MSE

Page 5: 1 G89.2228 Lect 11a G89.2228 Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes

5G89.2228 Lect 11a

The ANOVA Table

• The ANOVA table shows how the variability of the study can be partitioned. The degrees of freedom and the total Sums of Squares (SS) can be neatly broken down into Between Groups and Within Groups.

• The MS column shows how the SS and df terms are used to estimate the variance.

• The F statistic is the ratio of MS terms, and it is distributed with degrees of freedom given by the df of the MS components.

S ou rc e d f S S M S FB e tw e e nG ro u p s

1k

k

jjB YYnSS

1

2

1

k

SSMS B

BE

B

MS

MS

W ith inG ro u p s

)1( nk

k

j

n

ijijE YYSS

1 1

2

)1(

nk

SSMS E

E

T o ta l 1kn

k

j

n

iijT YYSS

1 1

2

Page 6: 1 G89.2228 Lect 11a G89.2228 Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes

6G89.2228 Lect 11a

A Numerical Example of the Null Hypothesis

• The data below are modeled after Table 11.2 in Howell, except that all scores are sampled from a normal distribution with mean 10 and variance 16

GroupsSubject A B C

1 9 11 9 Source df SS MS F(2,27)2 14 7 12 Between 2 83.27 41.63 2.433 8 10 12 Within 27 461.70 17.104 7 11 6 Total 29 544.97 18.795 13 7 106 14 11 87 9 1 88 11 0 99 8 15 13

10 21 1 14Mean 11.40 7.40 10.10 Grand mean 9.63

S^2 18.04 26.71 6.54 Total MS 18.79

Page 7: 1 G89.2228 Lect 11a G89.2228 Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes

7G89.2228 Lect 11a

Modeling group differences• The alternative to the null hypothesis is

that the groups have different means.• Suppose that each group comes from

different populations with means,

• It is often useful to write these group-specific means as deviations from some grand mean:

• j reflects how much different µj is from µ, the grand mean.

• The groups usually represent some FIXED comparisons. Then

• Later we consider RANDOM effects.• Without expectations we write

.,,,, 321 k

jjjYE ) group|(

01

k

jj

ijjijY

Page 8: 1 G89.2228 Lect 11a G89.2228 Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes

8G89.2228 Lect 11a

ANOVA assumptions

• The assumptions behind this ANOVA analysis (simple, one-way ANOVA) include:– Normally distributed observations in each

cell of the design– Independent observations– Equal variances in each cell

• The rule of thumb is that ANOVA tolerates some violations of its assumptions. It can handle unequal sample sizes in each cell (with the calculations described in Howell), unequal variance or non-normality, but not multiple, strong violations

• Independence does matter!

Page 9: 1 G89.2228 Lect 11a G89.2228 Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes

9G89.2228 Lect 11a

Data transformations

• Sometimes, your data violate an assumption of the ANOVA analysis but that is ameliorated by transforming your data:– arcsin transformation for probabilities

(note: some suggest values of 0 and 1 be treated specially)

– log transformation for strong positive skew (e.g. salaries)

– square root for Poisson (e.g., counts of events that are plausibly independent)

– reciprocal

– Winsorizing (robust statistics)

Page 10: 1 G89.2228 Lect 11a G89.2228 Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes

10G89.2228 Lect 11a

Effect sizes for ANOVA• Eta-squared is the proportion of

the total sums of squares that is attributable to the treatment groups (like a proportion of variance accounted for). As the number of groups k increases, 2 increases. It is a biased estimate of the underlying proportion.

• Omega-squared (2) is a relatively unbiased estimate of the proportion of total variance that is attributable to the variance of j. Slightly different forms are used when the groups are construed as a random sample of treatments rather than a fixed set of treatments.

T

B

SS

SS2

Page 11: 1 G89.2228 Lect 11a G89.2228 Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes

11G89.2228 Lect 11a

Effect sizes for ANOVA - 2• Cohen suggests using the square root of

the expected ratio of 2to2

e. He calls this f (Howell calls it ). It is one half the size of the effect d for t-tests.

• One then computesand then uses the power tables (for the noncentral F distribution indexed by the degrees of freedom) to calculate power

• Cohen categorizes the effect sizes as– small: f=.1

– medium: f=.25

– large: f=.4

ee

k

jj k

f

2

1

2 /

nf