Statistical Analysis

40
1 Statistical Analysis Professor Lynne Stokes Department of Statistical Science Lecture 8 Analysis of Variance

description

Statistical Analysis. Professor Lynne Stokes Department of Statistical Science Lecture 8 Analysis of Variance. Flow Rate Experiment. MGH Fig 6.1. Uncontrolled Error. Assignable Cause (Factor Changes). Flow Rate Experiment. What is an appropriate statistical comparison - PowerPoint PPT Presentation

Transcript of Statistical Analysis

Page 1: Statistical Analysis

1

Statistical Analysis

Professor Lynne StokesDepartment of Statistical Science

Lecture 8Analysis of Variance

Page 2: Statistical Analysis

2

Flow Rate Experiment

Filter Flow RatesA 0.233 0.197 0.259 0.244B 0.259 0.258 0.343 0.305C 0.183 0.284 0.264 0.258D 0.233 0.328 0.267 0.269

MGH Fig 6.1

Page 3: Statistical Analysis

3

Flow Rate Experiment

A B C D

0.30

0.25

0.20

AverageFlowRate

Filter Type

0.35

AssignableCause

(Factor Changes)

UncontrolledUncontrolledErrorError

What is an What is an appropriate statistical comparisonappropriate statistical comparison

of the filter means?of the filter means?

Page 4: Statistical Analysis

4

Page 5: Statistical Analysis

5

What is an What is an appropriate statistical comparisonappropriate statistical comparison

of the diet means?of the diet means?

Does not accountDoes not accountfor multiple comparisonsfor multiple comparisons

Page 6: Statistical Analysis

6

5 Comparisons,

Some averages used

more than once (e.g.,

N/R50)

Page 7: Statistical Analysis

7

Analysis of Variance for Single-Factor Experiments

Total Sum of Squares

TSS = (y - y )ij2

j=1

r

i=1

a i

Modelyij = + i + eij i = 1, ..., a; j = 1, ..., ri

Total Adjusted Sum of SquaresCorrected Sum of Squares

(Numerator of the Sample Variance)

Page 8: Statistical Analysis

8

Analysis of Variance for Single-Factor Experiments

Total Sum of Squares

TSS = (y - y )ij2

j=1

r

i=1

a i

Modelyij = + i + eij i = 1, ..., a; j = 1, ..., ri

Goal Partition TSS into Components Associated with

Assignable Causes: Controllable Factors and Measured Covariates

Experimental Error: Uncontrolled Variation, Measurement Error, Unknown Systematic Causes

Page 9: Statistical Analysis

9

Analysis of Variance for Single-Factor Experiments

TSS = (y - y )

(y - y + y - y )

ij2

j=1

r

i=1

a

ij2

j=1

r

i=1

a

i

i

i i

Page 10: Statistical Analysis

10

Analysis of Variance for Single-Factor Experiments

TSS = (y - y )

(y - y + y - y )

(y - y ) (y - y )

ij2

j=1

r

i=1

a

ij2

j=1

r

i=1

a

2

i=1

a

ij2

j=1

r

i=1

a

i

i

i

i i

i i irShowShow

Page 11: Statistical Analysis

11

Analysis of Variance for Single-Factor Experiments

TSS = (y - y )

(y - y + y - y )

(y - y ) (y - y )

ij2

j=1

r

i=1

a

ij2

j=1

r

i=1

a

2

i=1

a

ij2

j=1

r

i=1

a

i

i

i

i i

i i i

A E

r

SS SS

Page 12: Statistical Analysis

12

Estimating Factor Effects

Modelyij = + i + eij i = 1, ..., a; j = 1, ..., ri

E y E e( ) ( )

E y E ei i i i( ) ( )

E y y E e ei i i i i( ) {( ) ( )}

0)ee(E)yy(E iijiij

Estimation

Assumption

E(eij ) = 0

Parameter Constraint i 0

Page 13: Statistical Analysis

13

Analysis of Variance for Single-Factor Experiments

Main Effect Sum of Squares: SSA

Main Effects:

SSA : ri i(y - y )2

i=1

a

y - yi

Sum of Squares attributable tovariation in the effects of Factor A

Sum of Squares attributable tovariation in the effects of Factor A

Page 14: Statistical Analysis

14

Is a pooled estimate of the error variance correct,Is a pooled estimate of the error variance correct,or just ad-hoc?or just ad-hoc?

Page 15: Statistical Analysis

15

Analysis of Variance for Single-Factor Experiments

Error Sum of Squares: SSE

Residuals:

SSE : (y - y )2

i=1

a

ij ij

ri

1

y - yij i

Sum of Squares attributable touncontrolled variation

Sum of Squares attributable touncontrolled variation

Page 16: Statistical Analysis

16

Analysis of Variance for Single-Factor Experiments

Error Sum of Squares: SSE

Factor Levels: i = 1, 2, ... , a

Sample Variances: 1r 1r

)y-(y

s iii

r

1=j

2iij

2i

i

Page 17: Statistical Analysis

17

Analysis of Variance for Single-Factor Experiments

Error Sum of Squares: SSE

Factor Levels: i = 1, 2, ... , a

Sample Variances:

Pooled Variance Estimate:

s

s

n a

SS

n ap

ii

a

i

ii

a

ij ij

r

E

i

2 1

2

1

1

(y - y )2

i=1

a

1r 1r

)y-(y

s iii

r

1=j

2iij

2i

i

Page 18: Statistical Analysis

18

Degrees of Freedom

Total Sum of Squares

a

1=i

r

1=j

2ij )y-(y=TSS

Constraint

a

1=i

r

1=jij 0=)y-(y

Degrees of Freedom

n -1 = ar - 1

ShowShow

Page 19: Statistical Analysis

19

Degrees of Freedom

Main Effect Sum of Squares

Constraint

Degrees of Freedom

a -1

ShowShow

a

1=i

2iA )y-y(rSS

a

1=ii 0=)y-y(r

Page 20: Statistical Analysis

20

Degrees of Freedom

Error Sum of Squares

Constraints

Degrees of Freedom

n – a = a(r – 1)

ShowShow

a

1=i

r

1j

2iijE )y-y(SS

a , ... 2, 1, = i 0=)y-y(r

1jiij

Page 21: Statistical Analysis

21

Analysis of Variance Table

Source dfSum ofSquares

MeanSquares F

Factor A a-1 SSA MSA=SSA / (a-1) MSA/MSE

Error n-a SSE MSE=SSE / (n-a)Total n-1 TSS

Page 22: Statistical Analysis

22

Analysis of Variance for the Flow Rate Data

Source dfSum ofSquares

MeanSquares F

Filters 3 0.00820 0.00273 1.86Error 12 0.01765 0.00147Total 15 0.02585

Assumptions ?Conclusions ?

Assumptions ?Conclusions ?

Page 23: Statistical Analysis

23

Individual Individual confidence intervalsconfidence intervals

and tests are not appropriateand tests are not appropriateunlessunless

SIMULTANEOUS SIMULTANEOUS significancesignificance

levels or confidence levelslevels or confidence levelsare usedare used

(Multiple Comparisons)(Multiple Comparisons)

Page 24: Statistical Analysis

24

Viscosity of a Chemical Process

Reactant FeedConcentration Rate I II III IV

15% 20 lb/hr 145 148 147 14025% 20 lb/hr 158 152 155 15215% 30 lb/hr 135 138 141 13925% 30 lb/hr 150 152 146 149

ReplicateTwo Factors

Page 25: Statistical Analysis

25

Viscosity of a Chemical Process

130

140

150

160

Viscosity

15%20 lb/hr

25%20 lb/hr

15%30 lb/hr

25%30 lb/hr

Reactant Concentration / Flow Rate

Assignable causes:Assignable causes:two factor maintwo factor maineffects and theireffects and their

interactioninteraction

UncontrolledUncontrolledexperimentalexperimental

errorerror

Page 26: Statistical Analysis

26

Viscosity of a Chemical Process

Feed RateConcentration 20 lb/ hr 30 lb/ hr Average

15% 145.00 138.25 141.6225% 154.25 149.25 151.75

Average 149.62 143.75 146.69

Average Viscosity

Main EffectsInteraction

Page 27: Statistical Analysis

27

Viscosity of a Chemical Process :Main Effect for Concentration

130

140

150

160

Viscosity

15%20 lb/hr

25%20 lb/hr

15%30 lb/hr

25%30 lb/hr

Reactant Concentration / Flow Rate

MainEffect

Page 28: Statistical Analysis

28

Viscosity of a Chemical Process :Main Effect for Flow Rate

130

140

150

160

Viscosity

15%20 lb/hr

25%20 lb/hr

15%30 lb/hr

25%30 lb/hr

Reactant Concentration / Flow Rate

MainEffect

Page 29: Statistical Analysis

29

Viscosity of a Chemical Process :Flow Rate & Concentration Interaction

130

140

150

160

Viscosity

15% 25%

Reactant Concentration

20 lb/hr30 lb/hr

Interaction ?Interaction ?

Page 30: Statistical Analysis

30

Analysis of Variance for Multi-Factor Experiments

Total Sum of Squares

TSS = (y - y )ijk2

k=1

r

i=1

a

j

b

1

Model

Goal Partition TSS into components associated with

Assignable Causes: main effects for Factors A &B, interaction between Factors A & B

Experimental Error: uncontrolled variation, measurement error, unknown systematic causes

yijk = + i + j + ()ij + eijk

BalancedDesign

BalancedDesign

Page 31: Statistical Analysis

31

Analysis of Variance for Multi-Factor Experiments

TSS = (y - y )ijk2

k=1

r

i=1

a

j

b

1

Page 32: Statistical Analysis

32

Analysis of Variance for Multi-Factor Experiments

TSS = (y - y )

(y - y + y - y )

ijk2

k=1

r

i=1

a

ijk i i2

k=1

r

i=1

a

j

b

j

b

1

1

Page 33: Statistical Analysis

33

Analysis of Variance for Multi-Factor Experiments

TSS = (y - y )

(y - y + y - y )

(y - y ) (y - y )

ijk2

k=1

r

i=1

a

ijk i i2

k=1

r

i=1

a

i2

i=1

a

ijk2

k=1

r

i=1

a

j

b

j

b

ij

b

br

1

1

1 ShowShow

Page 34: Statistical Analysis

34

Analysis of Variance for Multi-Factor Experiments

TSS = (y - y )

(y - y ) (y - y )

(y - y - y + y )

ijk2

k=1

r

i=1

a

i2

i=1

a2

j=1

b

ijk2

k=1

r

i=1

a

j

b

j

i jj

b

br ar

1

1 ShowShow

Page 35: Statistical Analysis

35

Analysis of Variance for Multi-Factor Experiments

TSS = (y - y )

(y - y ) (y - y )

(y - y - y + y ) (y - y )

ijk2

k=1

r

i=1

a

i2

i=1

a2

j=1

b

ij2

i=1

a

ijk2

k=1

r

i=1

a

j

b

j

i jj

b

ijj

b

br ar

r

1

1 1

ShowShow

Page 36: Statistical Analysis

36

Analysis of Variance for Multi-Factor Experiments

TSS = (y - y )

(y - y ) (y - y )

(y - y - y + y ) (y - y )

ijk2

k=1

r

i=1

a

i2

i=1

a2

j=1

b

ij2

i=1

a

ijk2

k=1

r

i=1

a

j

b

j

i jj

b

ijj

b

A B AB E

br ar

r

SS SS SS SS

1

1 1

Don’t memorize the formulas,understand what they measureDon’t memorize the formulas,

understand what they measure

Page 37: Statistical Analysis

37

Analysis of Variance Table

Source dfSum ofSquares

MeanSquares F

Factor A a-1 SSA MSA=SSA / (a-1) MSA/MSE

Factor B b-1 SSB MSB=SSB/(b-1) MSB/MSE

AB (a-1)(b-1) SSAB MSAB=SSAB/(a-1)(b-1) MSAB/MSE

Error ab(r-1) SSE MSE=SSE / ab(r-1)Total n-1 TSS

Understand thedegrees of freedom

Understand thedegrees of freedom

Page 38: Statistical Analysis

38

Viscosity Data

Source df SS MS F pConcentration 1 410.06 410.06 49.08 0.000Feed Rate 1 138.06 138.06 16.53 0.002Conc x Rate 1 3.06 3.06 0.37 0.556Error 12 100.25 8.35Total 15 651.43

Conclusions ?Conclusions ?

Page 39: Statistical Analysis

39

Sums of Squares:Connections to Model Parameters

kjikjiijjk

kjiijjkE

jiij

jijijAB

iiA

rSS

etc

rrSS

brbrSS

,,

2

ijk,,

2i

,,

2i

,

2

,

2i

2

i2

i

ijk

2ijk

)ˆ-y()y-y(

.

)()y+y-y-y(

ˆ)y-y(

)y-(y=TSS

Page 40: Statistical Analysis

40

Unbalanced Experiments(including rij = 0)

Calculation formulas are not correctCalculation formulas are not correct

“Sums of Squares” in computer-generated ANOVA Tables

are NOT sums of squares (can be negative)usually are not additive;

need not equal the usual calculation formula values

“Sums of Squares” in computer-generated ANOVA Tables

are NOT sums of squares (can be negative)usually are not additive;

need not equal the usual calculation formula values