one-factor analysis of variance a method to compare two or more (normal) population means

28
One-Factor Analysis of Variance A method to compare two or more (normal) population means

Upload: helena-hancock

Post on 31-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: One-Factor Analysis of Variance A method to compare two or more (normal) population means

One-Factor Analysis of Variance

A method to compare two or more (normal) population means

Page 2: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Does distance it takes to stop car at 60 mph depend on tire brand?

Brand1 Brand2 Brand3 Brand4 Brand5 194 189 185 183 195 184 204 183 193 197 189 190 186 184 194 189 190 183 186 202 188 189 179 194 200 186 207 191 199 211 195 203 188 196 203 186 193 196 188 206 183 181 189 193 202 188 206 194 196 195

Page 3: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Comparison of five tire brands(stopping distance at 60 mph)

180 190 200 210

1

2

3

4

5

Distance (feet)

Bra

nd

Page 4: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Sample descriptive statistics

Brand N MEAN SD 1 10 188.20 3.88 2 10 195.20 9.02 3 10 187.40 5.27 4 10 191.20 5.55 5 10 200.50 5.44

Page 5: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Hypotheses

• The null hypothesis is that the group population means are all the same. That is:– H0: 1 = 2 = 3 = 4 = 5

• The alternative hypothesis is that at least one group population mean differs from the others. That is:– HA: at least one i differs from the others

Page 6: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Analysis of Variance

Analysis of Variance for comparing all 5 brands

Source DF SS MS F PBrand 4 1174.8 293.7 7.95 0.000Error 45 1661.7 36.9Total 49 2836.5

The P-value is small (0.000, to three decimal places), so reject the null hypothesis. There is sufficient evidence to conclude that at least one brand is different from the others.

Page 7: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Does learning method affect student’s exam scores?

• Consider 3 methods:– standard– osmosis– shock therapy

• Convince 15 students to take part. Assign 5 students randomly to each method.

• Wait eight weeks. Then, test students to get exam scores.

Page 8: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Suppose … Study #1

Is there a reasonable conclusion?

Page 9: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Suppose … Study #2

Is there a reasonable conclusion?

Page 10: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Suppose … Study #3

Is there a reasonable conclusion?

Page 11: One-Factor Analysis of Variance A method to compare two or more (normal) population means

“Analysis of Variance”

The variation between the group means and the grand mean is larger than the variation within the groups.

Page 12: One-Factor Analysis of Variance A method to compare two or more (normal) population means

“Analysis of Variance”

The variation between the group means and the grand mean is smaller than the variation within the groups.

Page 13: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Analysis of Variance

• A division of the overall variability in data values in order to compare means.

• Overall (or “total”) variability is divided into two components:– the variability “between” groups, and– the variability “within” groups

• Summarized in an “ANOVA” table.

Page 14: One-Factor Analysis of Variance A method to compare two or more (normal) population means

ANOVA Table for Study #1

One-way Analysis of Variance

Source DF SS MS F PFactor 2 2510.5 1255.3 93.44 0.000Error 12 161.2 13.4Total 14 2671.7

“Source” means “the source of the variation in the data”

“DF” means “the degrees of freedom”

“SS” means “the sum of squares”

“F” means “F test statistic”

“MS” means “mean sum of squares”

P-Value

Page 15: One-Factor Analysis of Variance A method to compare two or more (normal) population means

ANOVA Table for Study #1

One-way Analysis of Variance

Source DF SS MS F PFactor 2 2510.5 1255.3 93.44 0.000Error 12 161.2 13.4Total 14 2671.7

“Factor” means “Variability between groups” or “Variability due to the factor (or treatment) of interest”

“Error” means “Variability within groups” or “unexplained random error”

“Total” means “Total variation from the grand mean”

Page 16: One-Factor Analysis of Variance A method to compare two or more (normal) population means

ANOVA Notation

Group Data Means

1

2

m

Grand Mean

11X 12X 11nX 1X

21X 21X

22nX

mmnX

2X

mX1mX 2mX

X

Page 17: One-Factor Analysis of Variance A method to compare two or more (normal) population means

General ANOVA TableOne-way Analysis of Variance

Source DF SS MS F PFactor m-1 SS(Between) MSB MSB/MSEError n-m SS(Error) MSE Total n-1 SS(Total)

MSB = SS(Between)/(m-1)MSE = SS(Error)/(n-m)n-1 = (m-1) + (n-m)

SS(Total) = SS(Between) + SS(Error)

From F-distribution with m-1 numerator and n-m denominator d.f.

Page 18: One-Factor Analysis of Variance A method to compare two or more (normal) population means

ANOVA Table for Study #1

One-way Analysis of Variance

Source DF SS MS F PFactor 2 2510.5 1255.3 93.44 0.000Error 12 161.2 13.4Total 14 2671.7

14 = 2 + 12

2671.7 = 2510.5 + 161.2

1255.3 = 2510.5/2 13.4 = 161.2/12

93.44 = 1255.3/13.4

Page 19: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Total sum of squares SS(TO)

m

i

n

jij

i

XXTOSS1 1

2)(

m

i

n

jijij

i

XXXXTOSS1 1

22 2)(

2

1 1 1 1

2 2)(

XnXXXTOSSm

i

n

j

m

i

n

jijij

i i

2

1 1

2)( XnXTOSSm

i

n

jij

i

Definition:

Shortcut:

Page 20: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Treatment sum of squares SS(T)

m

i

n

ji

i

XXTSS1 1

2)(

m

ii

m

i

m

iiiii nXXnXXnTSS

1

2

1 1

2 2)(

2

1

2)(

XnXnTSSm

iii

Definition:

Shortcut:

m

iiii

m

iii XXXXnXXnTSS

1

22

1

22)(

Page 21: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Error sum of squares SS(E)

m

i

n

jiij

i

XXESS1 1

2)(

)()()( TSSTOSSESS

Definition:

Shortcut:

Page 22: One-Factor Analysis of Variance A method to compare two or more (normal) population means

SS(TO) = SS(T) + SS(E)

m

i

n

jiiij

m

i

n

jij

ii

XXXXXXTOSS1 1

2

1 1

2)(

m

i

n

ji

i

m

i

n

jiij

m

i

n

jiij

i

ii

XX

XXXXXX

1 1

2

1 11 1

22

)()()( ESSTSSTOSS

We’ve broken down the TOTAL variation into a component due to TREATMENT and a component due to random ERROR.

Page 23: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Recall Study #3

Page 24: One-Factor Analysis of Variance A method to compare two or more (normal) population means

ANOVA Table for Study #3

One-way Analysis of Variance

Source DF SS MS F PFactor 2 80.1 40.1 0.46 0.643Error 12 1050.8 87.6Total 14 1130.9

The P-value is large so we cannot reject the null hypothesis. There is insufficient evidence to conclude that the average exam scores differ for the three learning methods.

Page 25: One-Factor Analysis of Variance A method to compare two or more (normal) population means

One-Way ANOVA with Unstacked Data

std1 osm1 shk1 51 58 77 45 68 72 40 64 78 41 63 73 41 62 75

1. Select Stat. 2. Select ANOVA.3. Select One-way (Unstacked).4. Select the columns containing the

data.5. If you want boxplots or dotplots of the

data, select Graphs...6. Select OK.

DATA: IN MINITAB:

Page 26: One-Factor Analysis of Variance A method to compare two or more (normal) population means

One-Way ANOVA with Stacked Data

Method Score 1 51 1 45 1 40 1 41 1 41 2 58 2 68 2 64 2 63 2 62 3 77 3 72 3 78 3 73 3 75

1. Select Stat. 2. Select ANOVA.3. Select One-way.4. Select the “response.” (Score)5. Select the “factor.” (Method)5. If you want boxplots or dotplots of the

data, select Graphs...6. Select OK.

DATA:

IN MINITAB:

Page 27: One-Factor Analysis of Variance A method to compare two or more (normal) population means

Do Holocaust survivors have more sleep problems than others?

Page 28: One-Factor Analysis of Variance A method to compare two or more (normal) population means

ANOVA Table for Sleep Study

One-way Analysis of Variance

Source DF SS MS F PFactor 2 1723.8 861.9 61.69 0.000Error 117 1634.8 14.0Total 119 3358.6