Presentation is loading. Please wait.

Presentation is loading. Please wait.

STT 511-STT411: DESIGN OF EXPERIMENTS AND ANALYSIS OF VARIANCE Dr. Cuixian Chen Chapter 4: Randomized Blocks, Latin Squares, and Related Designs Design.

Similar presentations


Presentation on theme: "STT 511-STT411: DESIGN OF EXPERIMENTS AND ANALYSIS OF VARIANCE Dr. Cuixian Chen Chapter 4: Randomized Blocks, Latin Squares, and Related Designs Design."— Presentation transcript:

1 STT 511-STT411: DESIGN OF EXPERIMENTS AND ANALYSIS OF VARIANCE Dr. Cuixian Chen Chapter 4: Randomized Blocks, Latin Squares, and Related Designs Design & Analysis of Experiments 8E 2012 Montgomery 1 Chapter 4

2 Example 1-- Review: Design Of Experiments (Chap2) Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 2 Random Allocation Compare Response Repeat Completely randomized designs (CRD)

3 Example2 -- Review: Design Of Experiments (Chap2) Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 3 Randomized complete block design (RCBD) Completely randomized designs (CRD)

4 4 Matched pairs: Choose pairs of subjects that are closely matched—e.g., same sex, height, weight, age, and race. Within each pair, randomly assign who will receive which treatment. It is also possible to just use a single person, and give the two treatments to this person over time in random order. In this case, the “matched pair” is just the same person at different points in time. The most closely matched pair studies use identical twins. Review: Design Of Experiments (Matched pairs designs)

5 Randomized complete block design (RCBD)

6 Design of Engineering Experiments – The Blocking Principle  Text Reference, Chapter 4  Blocking and nuisance factors  The randomized complete block design or the RCBD  Extension of the ANOVA to the RCBD  Other blocking scenarios…Latin square designs Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 6

7 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 7 The Blocking Principle  Blocking is a technique for dealing with nuisance factors  A nuisance factor is a factor that probably has some effect on the response, but it’s of no interest to the experimenter… however, the variability it transmits to the response needs to be minimized  Typical nuisance factors include batches of raw material, operators, pieces of test equipment, time (shifts, days, etc.), different experimental units, or locations.  Many industrial experiments involve blocking (or should)  Failure to block is a common flaw in designing an experiment (consequences?)

8 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 8 The Hardness Testing Example  Text reference, pg 139, 140  We wish to determine whether 4 different tips produce different (mean) hardness reading on a Rockwell hardness tester  Gauge & measurement systems capability studies are frequent areas for applying DOE  Assignment of the tips to an experimental unit; that is, a test coupon  Structure of a completely randomized experiment  The test coupons are a source of nuisance variability  Alternatively, the experimenter may want to test the tips across coupons of various hardness levels  The need for blocking

9 The Hardness Testing Example Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 9 Test coupon Tips https://www.youtube.com/watch?v=RJXJpeH78iU

10 The Hardness Testing Example Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 10

11 The Hardness Testing Example Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 11  Determine whether 4 different tips produce different (mean) hardness reading on a Rockwell hardness tester.  Test coupons are a source of nuisance variability.  Alternatively, experimenter may want to test tips across coupons of various hardness levels.  The need for blocking.

12 The Hardness Testing Example Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 12  Determine whether 4 different tips produce different (mean) hardness reading on a Rockwell hardness tester.  Test coupons are a source of nuisance variability.  Alternatively, experimenter may want to test tips across coupons of various hardness levels.  The need for blocking.

13 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 13 The Hardness Testing Example  To conduct this experiment as a RCBD, assign all 4 tips to each coupon  Each coupon is called a “block”; that is, it’s a more homogenous experimental unit on which to test the tips  Variability between blocks can be large, variability within a block should be relatively small  In general, a block is a specific level of the nuisance factor  A complete replicate of the basic experiment is conducted in each block  A block represents a restriction on randomization  All runs within a block are randomized

14 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 14 The Hardness Testing Example  Suppose that we use b = 4 blocks:  Notice the two-way structure of the experiment  Once again, we are interested in testing the equality of treatment means, but now we have to remove the variability associated with the nuisance factor (the blocks)

15 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 15 Coded Data=(#-9.5)*10

16 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 16 Extension of the ANOVA to the RCBD  Suppose single factor, a treatments (factor levels) and b blocks  A statistical model (effects model) for the RCBD is  The relevant (fixed effects) hypotheses are  Model Assumption: Constraints:

17 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 17 Extension of the ANOVA to the RCBD ANOVA partitioning of total variability: Let’s add and subtract three terms:

18 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 18 Extension of the ANOVA to the RCBD ANOVA partitioning of total variability: Let’s add and subtract three terms here…

19 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 19 The degrees of freedom for the sums of squares in are as follows: Therefore, ratios of sums of squares to their degrees of freedom result in mean squares and the ratio of the mean square for treatments to the error mean square is an F statistic that can be used to test the hypothesis of equal treatment means Extension of the ANOVA to the RCBD

20 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 20 ANOVA Display for the RCBD Manual computing (ugh!)…see Equations (4-9) – (4-12), page 144 Use software to analyze the RCBD (Design-Expert, JMP)  Manual computing (ugh!)…see Equations (4-9) – (4-12), page 144  The reference distribution for F 0 is the F (a-1, (a-1)(b-1)) distribution  Reject the null hypothesis (equal treatment means) if

21 Chapter 4 Design & Analysis of Experiments 8E 2012 Montgomery 21 Manual computing: ANOVA Display for the RCBD

22 Example 4.1: CRBD Analysis with vascular grafts Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 22

23 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 23 Vascular Graft Example (pg. 145 )  To conduct this experiment as a RCBD, assign all 4 pressures to each of the 6 batches of resin  Each batch of resin is called a “block”; that is, it’s a more homogenous experimental unit on which to test the extrusion pressures Q: SS Total = , SS treat = , SS block = , first find SS error ; then find MS treat, MS error, F0 and p-value.

24 Example 4.1: CRBD Analysis with vascular grafts  we conclude that extrusion pressure affects the mean yield. The P- value for the test is also quite small.  Also, the resin batches (blocks) seem to differ significantly, because the mean square for blocks is large relative to error. Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 24

25 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 25 Vascular Graft Example (pg. 145 ) p-value=1-pf(8.1067,3,15) =

26 Example 4.1: Incorrect approach to vascular grafts  The incorrect analysis of these data as a completely randomized single-factor design is shown in Table 4.5. Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 26 MS error has more than doubled, from 7.33 in RCBD to in CRD. All variability due to blocks is now in error term. Call RCBD a noise-reducing design technique; It effectively increases signal-to-noise ratio, or it improves precision with which treatment means are compared.

27 Example 4.1: CRBD Analysis with vascular grafts  Note that the square for error has more than doubled, increasing from 7.33 in the RCBD to  All of the variability due to blocks is now in the error term. This makes it easy to see why we sometimes call the RCBD a noise- reducing design technique; it effectively increases the signal-to- noise ratio in the data, or it improves the precision with which treatment means are compared.  This example also illustrates an important point. If an experimenter fails to block when he or she should have, the effect may be to inflate the experimental error, and it would be possible to inflate the error so much that important differences among the treatment means could not be identified. Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 27

28 Vascular Graft Example: Input data and ANOVA for CRBD Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 28 ################ The Vascular Graft example #################### batch=rep(1:6, 4); pressure=c(rep(8500, 6), rep(8700, 6), rep(8900, 6), rep(9100, 6)); y=c(90.3,89.2,98.2,93.9,87.4,97.9,92.5,89.5,90.6,94.7,87.0,95.8,85.5,90.8,89.6,86.2,88.0,93.4,82.5,89.5,85.6,87.4,78.9,90.7) anova(lm(y~as.factor(pressure)+as.factor(batch))); ### or tab4.3<-read.table("\\\\bearsrv\\classrooms\\Math\\wangy\\stt4511\\Vascular-Graft.TXT",header=TRUE); anova(lm(tab4.3$Yield~as.factor(tab4.3$Pressure)+as.factor(tab4.3$Batch))); ### or anova(lm(tab4.3[,3]~as.factor(tab4.3[,2])+as.factor(tab4.3[,1])));

29 Vascular Graft Example Design-Expert Output Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 29

30 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 30 Vascular Graft Example JMP output

31 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 31 Residual Analysis for the Vascular Graft Example  Basic residual plots to check whether normality, constant/equal variance assumptions are satisfied  Check randomization  Check: ideally No patterns in residuals vs. block  Can also plot residuals versus pressure (i.e. residuals vs. factor)  These plots provide more information about the constant variance assumption, possible outliers

32 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 32 Residual Analysis for the Vascular Graft Example A normal probability plot of residuals Model fits well and model assumptions are Satisfied. No severe indication of non-normality, nor is there any evidence pointing to possible outliers. If model is correct and the assumptions are satisfied, this plot should be structureless.

33 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 33 Residual Analysis for the Vascular Graft Example Plots of the residuals by treatment (extrusion pressure) and by batch of resin or block. If there is more scatter in residuals for a particular treatment, it indicates this treatment produces more erratic response readings than others. More scatter in residuals for a particular block could indicate that block is not homogeneous. However, Figure 4.6 gives no indication of inequality of variance by treatment but there is an indication that there is less variability in yield for batch 6. However, since all other residual plots are satisfactory, we will ignore this.

34 ANOVA for CRBD for the Vascular Graft Example: Residual Analysis in R Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 34 ################ The Vascular Graft example #################### batch=rep(1:6, 4); pressure=c(rep(8500, 6), rep(8700, 6), rep(8900, 6), rep(9100, 6)); y=c(90.3,89.2,98.2,93.9,87.4,97.9,92.5,89.5,90.6,94.7,87.0,95.8,85.5,90.8,89.6,86.2,88.0,93.4,82.5,89.5,8 5.6,87.4,78.9,90.7); anova(lm(y~as.factor(pressure)+as.factor(batch))); ### analysis after CRBD: #### Residual analysis model.4.3<-lm(y~as.factor(pressure)+as.factor(batch)); res.4.3<-resid(model.4.3); pred.4.3<-model.4.3$fitted; par(mfrow=c(3,2)) qqnorm(res.4.3); qqline(res.4.3); ##for residuals## plot(c(1:24),res.4.3); plot(pred.4.3,res.4.3); plot(pressure, res.4.3); plot(batch,res.4.3); dev.off();

35 Residual Analysis for the Vascular Graft Example Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 35

36 Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 36 Post-ANOVA Comparison of Means for RCBD  Determining which specific means differ, following an ANOVA is called the multiple pairwise comparisons b/w all a populations means.  Suppose we are interesting in comparing all pairs of a treatment means and that the null hypothesis that we wish to test H0: µi=µj v.s. Ha: µi ≠ µj for all i≠j.  We will use pairwise t-tests on means…sometimes called Fisher’s Least Significant Difference (or Fisher’s LSD) Method

37 Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 37 Multiple Comparisons: Fisher’s Least Significant Difference for RCBD with exact p-value Test H0: µi=µj v.s. Ha: µi ≠ µj, for all i≠j. If ANOVA for RCBD indicates a significant difference in treatment means, we are usually interested in multiple comparisons to discover which treatment means differ. Any of multiple comparison procedures discussed in Section 3.5 may be used, by simply replacing # of replicates (n) in single-factor CRD by the number of blocks (b) in RCBD. Also, remember to use # of error df for RCBD with [(a-1)(b-1)] instead of those for CRB [a(n-1)]. ~t( df=(a-1)(b-1) ) Then we can find exact p-value from this approach. b b

38 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 38 Fisher’s LSD for Vascular Graft Example (yi.)-bar’s are given: Use Fisher’ LSD method to make comparison among all 4 pressure treatments to determine specially which designs differ in the mean response rate.

39 Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 39 Multiple Comparisons: Fisher’s Least Significant Difference Test H0: µi=µj v.s. Ha: µi ≠ µj, for all i≠j. If ANOVA for RCBD indicates a significant difference in treatment means, we are usually interested in multiple comparisons to discover which treatment means differ. Any of multiple comparison procedures discussed in Section 3.5 may be used, by simply replacing # of replicates (n) in single-factor CRD by the number of blocks (b) in RCBD. Also, remember to use # of error df for RCBD with [(a-1)(b-1)] instead of those for CRB [a(n-1)]. b b b df df=(a-1)(b-1)

40 ANOVA for CRBD for the Vascular Graft Example: Fisher's ‘Least Significant Difference’ method Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 40 ################ The Vascular Graft example #################### batch=rep(1:6, 4); pressure=c(rep(8500, 6), rep(8700, 6), rep(8900, 6), rep(9100, 6)); y=c(90.3,89.2,98.2,93.9,87.4,97.9,92.5,89.5,90.6,94.7,87.0,95.8,85.5,90.8,89.6,86.2,88.0,93.4,82.5,89.5,8 5.6,87.4,78.9,90.7); anova(lm(y~as.factor(pressure)+as.factor(batch))); #### post RBCD analysis tapply(y, pressure, mean) pairwise.t.test(y, as.factor(pressure), p.adjust.method ="none") By Fisher’s LSD µ1≠ µ4 µ2≠ µ4

41 ANOVA for CRBD for the Vascular Graft Example: STT511: Tukey's ‘Honest Significant Difference’ method Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 41 ################ The Vascular Graft example #################### batch=rep(1:6, 4); pressure=c(rep(8500, 6), rep(8700, 6), rep(8900, 6), rep(9100, 6)); y=c(90.3,89.2,98.2,93.9,87.4,97.9,92.5,89.5,90.6,94.7,87.0,95.8,85.5,90.8,89.6,86.2,88.0,93.4,82.5,89.5,8 5.6,87.4,78.9,90.7); anova(lm(y~as.factor(pressure)+as.factor(batch))); #### post RBCD analysis ### analysis after RBD: #### Residual analysis model.4.3<-lm(y~as.factor(pressure)+as.factor(batch)); tapply(y, pressure, mean) TukeyHSD(aov(model.4.3), "as.factor(pressure)") ## Create a set of confidence intervals on differences between means of levels of a factor with specified ## family-wise probability of coverage. ## The intervals are based on the Studentized range statistic, Tukey's ‘Honest Significant Difference’ method. ## Each component is a matrix with columns diff giving the difference in the observed means, ## lwr giving the lower end point of the interval, ## upr giving the upper end point and ## p adj giving the p-value after adjustment for the multiple comparisons. ## It will list all possible pairwise comparison within different groups ##

42 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 42 Multiple Comparisons for the Vascular Graft Example – Which Pressure is Different with Fisher’s LSD? Also see Figure 4.2, Design-Expert output By Design Expert package µ1≠ µ3 µ1≠ µ4 µ2≠ µ4 By Tukey’s HSD: µ1≠ µ4 µ2≠ µ4

43 ANOVA for RCBD: Example 2

44 Example 2: RCBD analysis in R Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 44 ######## another example dat4.4<-read.table("\\\\bearsrv\\classrooms\\Math\\wangy\\stt4511\\BHH2- Data\\tab0404.dat",skip=1)[,2:4]; names(dat4.4)<-c("blend","treatment","value"); ##### a$blend<-factor(a$blend); #When R read the data file, it automatically take ##### character as factor, but it is not the case for numbers. We are suppose to ### transform it "by hand"##### summary(aov(value~blend+treatment,data=dat4.4)); summary(aov(value~factor(blend)+treatment,data=dat4.4)); anova(lm(value~factor(blend)+treatment,data=dat4.4));

45 Example 2: RCBD analysis in SAS Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 45 data tab4p4; infile '\\bearsrv\classrooms\Math\wangy\stt4511\BHH2-Data\tab0404.dat' firstobs=2; input run blend$ treat$ value; run; proc print data=tab4p4; run; proc anova data=tab4p4 ; /* instead of "anova", people also use "glm" */ class blend treat; model value = blend treat; run;

46 ANOVA for RCBD: Example 3 (for students’ practice)

47 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 47 Example 3: Review: The Hardness Testing Example  Suppose that we use b = 4 blocks:  Notice the two-way structure of the experiment  Once again, we are interested in testing the equality of treatment means, but now we have to remove the variability associated with the nuisance factor (the blocks)

48 Example 3: ANOVA for the RCBD in R Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 48 ############## How to code the data??? ######### Tip=c(rep(1,4), rep(2,4), rep(3,4), rep(4,4)); print(Tip) Coupon=rep(1:4, 4); print(Coupon) Hardness=c(9.3,9.4,9.6,10.0,9.4,9.3,9.8,9.9,9.2,9.4,9.5,9.7,9.7,9.6,10.0,10.2); print(Hardness); cbind(Tip, Coupon, Hardness) h.data = data.frame(cbind(Tip, Coupon, Hardness)) ## for more complicated operation ## OR read in the table: h.data<-read.table("\\\\bearsrv\\classrooms\\Math\\wangy\\stt4511\\Hardness- Testing1.TXT", header=TRUE);

49 Example 3: ANOVA for the RCBD in R Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 49 ############## Randomized block design in R ######### h.data<-read.table("\\\\bearsrv\\classrooms\\Math\\wangy\\stt4511\\Hardness- Testing1.TXT", header=TRUE); anova(lm(h.data[,3]~as.factor(h.data[,2])+as.factor(h.data[,1]))); ## or ## anova(lm(h.data$Hardness~as.factor(h.data$Coupon)+as.factor(h.data$Tip))); ### the connection with one way anova when the block effect is ignored.... anova(lm(h.data$Hardness~as.factor(h.data$Tip)));

50 Chapter 4 Design & Analysis of Experiments 8E 2012 Montgomery 50 How are the numbers calculated? Which p-value is the more important one that we should consider? Are the degrees of freedom correct? May we ignore the block effect? What would be the ANOVA table if we want to ignore the block effect no matter what? Q:What will be the conclusion then, if we ignore blocking? Example 3: ANOVA for the RCBD in R

51 Example 3: ANOVA for the RCBD in R – Residual Analysis for CRBD Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 51 #### Residual analysis h.data<- read.table("\\\\bearsrv\\classrooms\\Math\\wangy\\stt4511\\Hardness- Testing1.TXT",header=TRUE); model.h<-lm(h.data$Hardness~as.factor(h.data$Coupon)+as.factor(h.data$Tip)); res.h<-resid(model.h); pred.h<-model.h$fitted; par(mfrow=c(3,2)) qqnorm(res.h);qqline(res.h); plot(c(1:16),res.h); plot(pred.h,res.h); plot(h.data$Coupon,res.h); plot(h.data$Tip,res.h); dev.off(); ## Or you can do the following ## par(mfrow=c(2,2)) plot(model.h)

52 Example 3: Residual analysis Chapter 4 Design & Analysis of Experiments 8E 2012 Montgomery 52 Equal variance?

53  Example 3:  Post RCBD analysis Chapter 4 Design & Analysis of Experiments 8E 2012 Montgomery 53 Verify:

54 Example 3: Post RBCD analysis Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 54 h.data<- read.table("\\\\bearsrv\\classrooms\\Math\\wangy\\stt4511\\Hardness- Testing1.TXT",header=TRUE); model.h<-lm(h.data$Hardness~as.factor(h.data$Coupon)+as.factor(h.data$Tip)); #### post RBCD analysis tapply(h.data$Hardness,h.data$Tip, mean) TukeyHSD(aov(model.h),"as.factor(h.data$Tip)") #library(agricolae); #out=LSD.test(h.data$Hardness, as.factor(h.data$Tip), 9, ) #### verify #print(out);

55 Example 4 of blocking: more than two treatment levels Chapter 4 Design & Analysis of Experiments 8E 2012 Montgomery 55 Note: 88 is the response, while (2) is the random order of RCBD.

56 Connection b/w one-sample paired t- test with RCBD

57  Subjects are matched in “pairs” and outcomes are compared within each unit  Example: Pre-test and post-test studies look at data collected on the same sample elements before and after some experiment is performed.  Example: Twin studies often try to sort out the influence of genetic factors by comparing a variable between sets of twins. Matched pairs t procedures for dependent sample  We perform hypothesis testing on the difference in each unit

58 The variable studied becomes X difference = (X 1 − X 2 ). The null hypothesis of NO difference between the two paired groups. H 0 : µ difference = 0 ; H a : µ difference >0 (or <0, or ≠0) When stating the alternative, be careful how you are calculating the difference (after – before or before – after). Conceptually, this is not different from tests on one population. Matched pairs t test

59 Matched Pairs t-test (one-sample t-test after finding differences)  If we take diff=After – Before, and we want to show that the “After group” has increased over the “Before group” H a :  > 0  “After group” has decreased H a :  < 0  The two groups are different H a :  ≠0 Note: we have n-pairs of observations!

60 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 60 Blocking: with matched pairs two treatment levels

61 Example: The paired sample t-test in R Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 61 ################# The paired sample t-test ############# paired.data<-read.table("\\\\bearsrv\\classrooms\\Math\\wangy\\stt4511\\BHH2- Data\\tab0305.dat",header=TRUE); t.test(paired.data$diff, mu=0); ## Or do Matched pairs t test manually ## d<-paired.data$diff; t.val<-mean(d)/(sd(d)/sqrt(10)) p.val<-2*(1-pt(abs(t.val),9))

62 Connection b/w one-sample paired t-test with RCBD Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 62 Q: what is the connection between two-sample paired t-test with RCBD Q: what would be the data transformation?

63 Connection b/w one-sample paired t-test with RCBD in R Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 63 ####### link with two sample paired t-test paired.data<-read.table("\\\\bearsrv\\classrooms\\Math\\wangy\\stt4511\\BHH2- Data\\tab0305.dat",header=TRUE); boy<-c(c(1:10),c(1:10)); mat<-c(rep('A',10),rep('B',10)) wear<-c(paired.data[,2], paired.data[,4]) wear.dat<-data.frame(wear,boy,mat) anova(lm(wear.dat$wear~as.factor(wear.dat$boy)+as.factor(wear.dat$mat))); ## For one sample matched pair t-test ## t.test(paired.data$diff)

64 Connection b/w one-sample paired t-test with RCBD in R Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 64

65 Latin Square Design: other type of block design

66 Review: The Hardness Testing Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 66 Tips https://www.youtube.com/watch?v=RJXJpeH78iU Test coupon

67 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 67 §4.2: Latin Square Design: other type of block design  Text reference, Section 4.2, pg. 158  These designs are used to simultaneously control (or eliminate) two sources of nuisance variability/blocks  (eg: batches of raw materials and operators)  Use Latin Square Design to eliminate two nuisance sources of variability: Use blocking in rows and columns.  A significant assumption is that the three factors (treatments, TWO nuisance factors) do not interact  If this assumption is violated, the Latin square design will not produce valid results  Latin squares are not used as much as the RCBD in industrial experimentation

68 The Rocket Propellant Problem – A Latin Square Design  Suppose that an experimenter is studying effects of five different formulations of a rocket propellant used in aircrew escape systems. Each formulation is mixed from a batch of raw material that is only large enough for five formulations to be tested.  Furthermore, the formulations are prepared by several operators, and there may be substantial differences in the skills and experience of the operators. Thus, it would seem that there are two nuisance factors: batches of raw material and operators.  The appropriate design for this problem consists of testing each formulation exactly once in each batch of raw material and for each formulation to be prepared exactly once by each of five operators. The resulting design is called a Latin square design.  Notice that the design is a square arrangement and that five formulations (or treatments) are denoted by the Latin letters A, B, C, D, and E; hence the name Latin square. Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 68

69 Chapter 4 Design & Analysis of Experiments 8E 2012 Montgomery 69 The Rocket Propellant Problem – A Latin Square Design Both batches of raw material (rows) and operators (columns) are orthogonal to treatments

70 Chapter 4 Design & Analysis of Experiments 8E 2012 Montgomery 70 The Rocket Propellant Problem – A Latin Square Design  This is a  Page 159 shows some other Latin squares  Table 4-13 (page 162) contains properties of Latin squares  Statistical analysis? Both batches of raw material (rows) and operators (columns) are orthogonal to treatments Column factor Row factor Treatment factor

71 The Latin Square Design  One treatment and two block factors! Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 71 How do we denote the r.v.?

72 Chapter 4 Design & Analysis of Experiments 8E 2012 Montgomery 72 The Rocket Propellant Problem – A Latin Square Design

73 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 73 Statistical Analysis of the Latin Square Design  The statistical (effects) model is  y ijk is the observation in ith row and kth column for jth treatment, µ is the overall mean, α i is the ith row effect, Tj is the jth treatment effect, β k is the kth column effect, and Eijk is the random error.  statistical analysis (ANOVA) is much like analysis for RCBD.  See the ANOVA table, page 160 (Table 4.10)  The analysis for the rocket propellant example follows

74 Chapter 4 Design & Analysis of Experiments 8E 2012 Montgomery 74 Statistical Analysis of the Latin Square Design ~

75 Latin Square Design for the Rocket Propellant Problem Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 75 Q: ANOVA for Latin Square: We have SS Total = 676, SS Batches = 68, SS Operators = 150, SS treat = 330, first find SS error ; then find MS treat, MS error, F0 and p-value.

76 Chapter 4 Design & Analysis of Experiments 8E 2012 Montgomery 76 Q: what would be the output if Batches is not considered as a block? Statistical Analysis of the Latin Square Design P-value=1-pf(7.734,4,12)=

77 Chapter 4 Design & Analysis of Experiments 8E 2012 Montgomery 77 How to input data for Rocket Propellant Problem Operator=rep(1:5, 5); print(Operator); Batches=c(rep(1, 5), rep(2, 5), rep(3, 5), rep(4, 5), rep(5, 5)); print(Batches); Treat=c("A","B","C","D","E","B","C","D","E","A","C","D","E","A","B","D","E","A","B","C","E","A","B","C","D"); print(Treat); y=c(24, 20, 19, 24, 24, 17, 24, 30, 27, 36, 18, 38, 26, 27, 21, 26, 31, 26, 23, 22, 22, 30, 20, 29, 31); anova(lm(y ~ as.factor(Treat)+as.factor(Batches)+factor(Operator)));

78 Statistical Analysis of the Latin Square Design Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 78 ## Latin Square ## ## Latin Square in R ## rocket<- read.table("\\\\bearsrv\\classrooms\\Math\\wangy\\stt4511\\ Rocket-Propellant.TXT",header = TRUE); anova(lm(rocket$BRate~rocket$Formulation+as.factor(rocket$Batch es)+factor(rocket$Operator)));

79 Eg2: Automobile Emissions Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 79 Use ANOVA for Latin Square Method to analyze this dataset

80 Example 2: Statistical Analysis of Latin Square Design Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 80 ## Latin Square in R ## dat4.8<- read.table("\\\\bearsrv\\classrooms\\Math\\wangy\\stt4511\\BHH2- Data\\tab0408.dat",header = TRUE); y=dat4.8$y; additive=dat4.8$additive; cars=dat4.8$cars; driver=dat4.8$driver; anova(lm(y ~ as.factor(additive) + as.factor(cars)+as.factor(driver))) ## Or ## summary(aov(y~(additive)+factor(cars)+factor(driver),data=dat4.8)); # anova(lm(y~(additive)+factor(cars)+factor(driver),data=dat4.8));

81 Statistical Analysis of the Latin Square Design Chapter 3Design & Analysis of Experiments 8E 2012 Montgomery 81 data tab4p8; infile '\\bearsrv\classrooms\Math\wangy\stt4511\BHH2-Data\tab0408.dat' firstobs=2; input driver cars additive $ y; run; proc print data=tab4p8; run; proc anova data=tab4p8 ; /* instead of "anova", people also use "glm" */ class driver cars additive; model y = driver cars additive; run;

82  The post ANOVA analysis is the same with ANOVA for CRB and ANOVA for RCBD! Chapter 4 Design & Analysis of Experiments 8E 2012 Montgomery 82 Statistical Analysis of the Latin Square Design

83 Chapter 4Design & Analysis of Experiments 8E 2012 Montgomery 83 Other Topics  Missing values in blocked designs  RCBD  Latin square  Replication of Latin Squares  Crossover designs  Graeco-Latin Squares  Incomplete block designs


Download ppt "STT 511-STT411: DESIGN OF EXPERIMENTS AND ANALYSIS OF VARIANCE Dr. Cuixian Chen Chapter 4: Randomized Blocks, Latin Squares, and Related Designs Design."

Similar presentations


Ads by Google