22
1 Chapter 6. Experiments with One Factor

Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

1

Chapter 6. Experiments with One Factor

Page 2: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

2

An Introduction to Experimental Design

Statistical studies can be classified as being either experimental or observational.

In an experimental study, one or more factors are controlled so that data can be obtained about how the factors influence the variables of interest.

In an observational study, no attempt is made to control the factors.

Cause-and-effect relationships are easier to establish in experimental studies than in observational studies.

Page 3: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

3

Basic Concepts

A factor is a variable that the experimenter has selected for investigation.

A treatment is a level of a factor. Experimental units are the objects of interest in the

experiment. A completely randomized design is an experimental

design in which the treatments are randomly assigned to the experimental units.

Page 4: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

4

Page 5: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

5

Page 6: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

6

Page 7: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

7

One-Way ANOVA Table

Page 8: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

One Factor Experiment

8

1 1

1 1 ,...,,

1 1

1 1 ,...,,

1 1

1 1 ,...,, 1

DF anceSampleVari SampleMean nsObservatio Trt.

1

22

121

1

22

121

11

211

1

21

11

1111211

11

1

k

n

jiij

kk

n

jij

kkknkk

i

n

jiij

ii

n

jij

iiinii

n

jj

n

jjn

nYYn

sYn

YYYYk

nYYn

sYn

YYYYi

nYYn

sYn

YYYY

kk

k

ii

i

Page 9: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

9

Section 6. 1 Completely Randomized One-factor Design

Model (with k treatments or k factor levels)

where iid error

,

,...,1;,...,1, .

ijiij

iijiij

Y

njkiY

.,,0~ 12 k

i iij nNN

nsobservatio ofnumber total:

levelnt th treatme-at nsobservatio ofnumber :levels treatmentofnumber :

effect) treatment:(nt th treatme-at nsobservatio ofmean :

levelnt th treatme-at replicateth - of response :

1

k

ii

i

ii

ij

nN

ink

i

ijY

Page 10: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

10

Section 6. 1 Completely Randomized One-factor Design

Sum Square Decomposition: SSTO = SSTR + SSE

in

jij

iii

k

k

Yn

YY

YYXXX

1

11

1

1ˆor ''ˆ

:)',...,(for estimator squareLeast

ii

i

ii

n

jiij

ii

k

iii

k

i

n

jiij

n

jij

iii

k

ii

k

i

n

jij

k

i

n

jij

YYn

ssnYYSSE

kiYn

YYYnSSTR

YN

YYYSSTO

1

22

1

2

1 1

2

1

2

1

1 11 1

2

11,1

,...,1,1,

1,

Page 11: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

11

Testing main effects

Null hypothesis to compare k treatment effects:

given that . It can be shown that

Reject H0 (treatment effects are significantly different) when p-value is less than given level α. or reject H0 if F > Fα(k-1, N-k)

0...:...: 1010 kk HH

kNkF kNSSE

kSSTR MSE

MSTR F

E(MSE)E(MSTR) H

nk

MSTREMSEEk

iii

,1~/

1/

is statistic-F theand , ,Under

,1

1,

0

1

222

ki iin1 0

Page 12: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

12

Analysis of Variance Table (ANOVA)

Completely Randomized Design

kNSSEMSE

kSSTRMSTR

1

Source ofVariation

Sum ofSquares

Degrees ofFreedom

MeanSquares F

Treatments

Error

Total

k - 1

N - 1

SSTR

SSE

SST

N - k

MSEMSTRF

Page 13: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

13

Example - Etch Rate and RF Experiment

An engineer is interested in investigating the relationship between the RF power setting and the etch rate for his tool.

The objective of an experiment like this is to model the relationship between etch rate and RF power and to specify the power setting that will give a desired target etch rate. He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to test five wafers at each level of RF power.

ObservationsPower __________________________________________(W) 1 2 3 4 5 Total Averages

160 575 542 530 539 570180 565 593 590 578 610200 600 651 610 637 629220 725 700 715 685 710

SAS code (with boxplot) and R code

Page 14: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

14

SAS Code - ANOVAods html; /* Output Delivery System */

data ratedata;input Power Rate @@;datalines ;

160 575160 542...220 685220 710;

proc print data=ratedata; run;

proc anova data=ratedata;class Power; /* Specify factor(s) */model Rate=Power;

run;

title 'Box Plot for Etch Data';

proc boxplot data=ratedata;plot Rate * Power ; /* Compare Boxplots at different power levels */

run;

ods html close;

Page 15: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

15

Section 6.2 Inferences in One-Factor Experiments

ANOVA model

100(1-α)% Confidence Interval of μi :

XY

njkieY

Y

NY

iijiij

ijkiij

diiijijiij

,...,1;,...,1,'

0...1...0

),0(~,

1

2...

kikNt

nMSE

Yn

NY

Yn

YYXXX

i

ii

iii

ni ij

iii

i

,...,1,,~,~

:onDistributi Reference

1ˆ,''ˆ :Estimator SquareLeast

2

11

i

i nMSEkNtY

2

Page 16: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

16

Pairwise Comparison H0: μi = μj vs H1: μi ≠ μj

100(1-α)% Confidence Interval of (μi – μj) :

Fisher’s Least Significant Difference (LSD) For a balanced design (n1 = n2 =…= nk= n),

Reject H0 if

jiji nn

MSEkNtYY 11

2

nMSEkNtLSD

2

2

jiji nn

MSEkNtLSDYY 11||2

Page 17: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

17

Bonferroni Test (Multiple Pairwise Comparison)

Test H0: μi = μj for any pair (I, j) vs H1: at least one pair is not the same

Additive Law

A factor has k levels, # of pairwise comparisons is k(k-1)/2

Bonferroni Confidence Interval for (μi – μj)

Reject H0 if there is at least one C.I. doesn’t include 0.

m

RPRP mj j

mj j

*11 ,

kjikknn

MSEkNtYYji

ji ,...,1,,2/1

*,11

2*

Page 18: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

18

Tukey’s Multiple Comparison of Pairwise Difference

Test H0: μi = μj for any pair (I, j) vs H1: at least one pair is not the same

Studentized range statistic

Under H0, for balanced design

Tukey’s Simultaneous Confidence Interval for (μi – μj)

Reject H0 if there is at least one simultaneous C.I. doesn’t include 0.

kNkq

nnMSE

YYT

ji

jjiikjiu

,~

112

max ,1

nMSE

YYTuminmax

kjinn

MSEkNkqYYji

ji ,...,1,,112

,

Page 19: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

19

Page 20: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

20

Example (Deflection of Beams)

Type Observations Average A 82,86,79,83,85,84,86,87 84B 74,82,78,75,76,77 77C 79,79,77,78,82,79 79

k, N, n1 , n2 , n3 , MSE

95% C.I. for individual treatment μi

Pairwise C.I. for μi- μi

Bonferroni C.I. for all (μi- μi)

Tukey’s Simultaneous C.I. for all (μi- μi)

Page 21: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

21

Model Checking

Normality Check -- histogram and QQ plot

SAS code (proc univariate normal) R code (qqnorm)Note: Use nonparametric alternative if normality is violated, e.g. a rank test like the Kruskal-Wallis Test (follows a Chi-square distribution under condition that there is no treatment difference).

Homogeneity of Variance – Levene’s Test

Levene’s Test is not sensitive to the normality.

Other comparison – Contrast

For example,

same. theare allnot : vs....: 21

222

210 ik HH

.0 where0: vs.0: 11110 ki i

ki ii

ki ii ccHcH

.04321

Page 22: Chapter 6. Experiments with One Factorhomepages.math.uic.edu/~wangjing/stat481/Stat481-Lecture...He wants to test four levels of RF power: 160W, 180W, 200W, and 220W. He decided to

22

Example:Suppose you are comparing the time to relief of three headache medicines -- brands 1, 2, and 3. The time to relief data is reported in minutes. For this experiment, 15 subjects were randomly placed on one of the three medicines. Which medicine (if any) is the most effective? (SAS output)

DATA ACHE;INPUT BRAND RELIEF;CARDS;1 24.51 23.51 26.41 27.11 29.92 28.42 34.22 29.52 32.22 30.13 26.13 28.33 24.33 26.23 27.8;

PROC ANOVA DATA=ACHE;CLASS BRAND;MODEL RELIEF=BRAND;MEANS BRAND / BON TUKEY LSD CLDIFF HOVTEST=LEVENE;TITLE 'COMPARE RELIEF ACROSS MEDICINES ';RUN;

PROC BOXPLOT DATA=ACHE;PLOT RELIEF*BRAND;TITLE 'ANOVA RESULTS';RUN;